001    /**
002     * Copyright (c) 2000-2012 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                    long portletPreferencesPlid, boolean privateLayout,
044                    java.lang.String name, java.lang.String title,
045                    java.lang.String description, java.lang.String keywords,
046                    java.lang.String robots, java.lang.String typeSettings,
047                    boolean iconImage, long iconImageId, java.lang.String themeId,
048                    java.lang.String colorSchemeId, java.lang.String wapThemeId,
049                    java.lang.String wapColorSchemeId, java.lang.String css,
050                    com.liferay.portal.service.ServiceContext serviceContext)
051                    throws com.liferay.portal.kernel.exception.PortalException,
052                            com.liferay.portal.kernel.exception.SystemException {
053                    return getService()
054                                       .addLayoutRevision(userId, layoutSetBranchId,
055                            layoutBranchId, parentLayoutRevisionId, head, plid,
056                            portletPreferencesPlid, privateLayout, name, title, description,
057                            keywords, robots, typeSettings, iconImage, iconImageId, themeId,
058                            colorSchemeId, wapThemeId, wapColorSchemeId, css, serviceContext);
059            }
060    
061            public static LayoutRevisionService getService() {
062                    if (_service == null) {
063                            _service = (LayoutRevisionService)PortalBeanLocatorUtil.locate(LayoutRevisionService.class.getName());
064    
065                            ReferenceRegistry.registerReference(LayoutRevisionServiceUtil.class,
066                                    "_service");
067                            MethodCache.remove(LayoutRevisionService.class);
068                    }
069    
070                    return _service;
071            }
072    
073            public void setService(LayoutRevisionService service) {
074                    MethodCache.remove(LayoutRevisionService.class);
075    
076                    _service = service;
077    
078                    ReferenceRegistry.registerReference(LayoutRevisionServiceUtil.class,
079                            "_service");
080                    MethodCache.remove(LayoutRevisionService.class);
081            }
082    
083            private static LayoutRevisionService _service;
084    }