001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.MethodCache;
019    import com.liferay.portal.kernel.util.ReferenceRegistry;
020    
021    /**
022     * The utility for the layout revision remote service. This utility wraps {@link com.liferay.portal.service.impl.LayoutRevisionServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
023     *
024     * <p>
025     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see LayoutRevisionService
030     * @see com.liferay.portal.service.base.LayoutRevisionServiceBaseImpl
031     * @see com.liferay.portal.service.impl.LayoutRevisionServiceImpl
032     * @generated
033     */
034    public class LayoutRevisionServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.LayoutRevisionServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static com.liferay.portal.model.LayoutRevision addLayoutRevision(
041                    long userId, long layoutSetBranchId, long layoutBranchId,
042                    long parentLayoutRevisionId, boolean head, long plid,
043                    boolean privateLayout, java.lang.String name, java.lang.String title,
044                    java.lang.String description, java.lang.String keywords,
045                    java.lang.String robots, java.lang.String typeSettings,
046                    boolean iconImage, long iconImageId, java.lang.String themeId,
047                    java.lang.String colorSchemeId, java.lang.String wapThemeId,
048                    java.lang.String wapColorSchemeId, java.lang.String css,
049                    com.liferay.portal.service.ServiceContext serviceContext)
050                    throws com.liferay.portal.kernel.exception.PortalException,
051                            com.liferay.portal.kernel.exception.SystemException {
052                    return getService()
053                                       .addLayoutRevision(userId, layoutSetBranchId,
054                            layoutBranchId, parentLayoutRevisionId, head, plid, privateLayout,
055                            name, title, description, keywords, robots, typeSettings,
056                            iconImage, iconImageId, themeId, colorSchemeId, wapThemeId,
057                            wapColorSchemeId, css, serviceContext);
058            }
059    
060            public static LayoutRevisionService getService() {
061                    if (_service == null) {
062                            _service = (LayoutRevisionService)PortalBeanLocatorUtil.locate(LayoutRevisionService.class.getName());
063    
064                            ReferenceRegistry.registerReference(LayoutRevisionServiceUtil.class,
065                                    "_service");
066                            MethodCache.remove(LayoutRevisionService.class);
067                    }
068    
069                    return _service;
070            }
071    
072            public void setService(LayoutRevisionService service) {
073                    MethodCache.remove(LayoutRevisionService.class);
074    
075                    _service = service;
076    
077                    ReferenceRegistry.registerReference(LayoutRevisionServiceUtil.class,
078                            "_service");
079                    MethodCache.remove(LayoutRevisionService.class);
080            }
081    
082            private static LayoutRevisionService _service;
083    }