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 set remote service. This utility wraps {@link com.liferay.portal.service.impl.LayoutSetServiceImpl} 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 LayoutSetService
030     * @see com.liferay.portal.service.base.LayoutSetServiceBaseImpl
031     * @see com.liferay.portal.service.impl.LayoutSetServiceImpl
032     * @generated
033     */
034    public class LayoutSetServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.LayoutSetServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040    
041            /**
042            * @deprecated {@link #updateLayoutSetPrototypeLinkEnabled(long, boolean,
043            boolean, String)}
044            */
045            public static void updateLayoutSetPrototypeLinkEnabled(long groupId,
046                    boolean privateLayout, boolean layoutSetPrototypeLinkEnabled)
047                    throws com.liferay.portal.kernel.exception.PortalException,
048                            com.liferay.portal.kernel.exception.SystemException {
049                    getService()
050                            .updateLayoutSetPrototypeLinkEnabled(groupId, privateLayout,
051                            layoutSetPrototypeLinkEnabled);
052            }
053    
054            /**
055            * Updates the state of the layout set prototype link.
056            *
057            * <p>
058            * <strong>Important:</strong> Setting
059            * <code>layoutSetPrototypeLinkEnabled</code> to <code>true</code> and
060            * <code>layoutSetPrototypeUuid</code> to <code>null</code> when the layout
061            * set prototype's current uuid is <code>null</code> will result in an
062            * <code>IllegalStateException</code>.
063            * </p>
064            *
065            * @param groupId the primary key of the group
066            * @param privateLayout whether the layout set is private to the group
067            * @param layoutSetPrototypeLinkEnabled whether the layout set prototype is
068            link enabled
069            * @param layoutSetPrototypeUuid the uuid of the layout set prototype to
070            link with
071            * @throws PortalException if a portal exception occurred
072            * @throws SystemException if a system exception occurred
073            */
074            public static void updateLayoutSetPrototypeLinkEnabled(long groupId,
075                    boolean privateLayout, boolean layoutSetPrototypeLinkEnabled,
076                    java.lang.String layoutSetPrototypeUuid)
077                    throws com.liferay.portal.kernel.exception.PortalException,
078                            com.liferay.portal.kernel.exception.SystemException {
079                    getService()
080                            .updateLayoutSetPrototypeLinkEnabled(groupId, privateLayout,
081                            layoutSetPrototypeLinkEnabled, layoutSetPrototypeUuid);
082            }
083    
084            public static void updateLogo(long groupId, boolean privateLayout,
085                    boolean logo, java.io.InputStream inputStream)
086                    throws com.liferay.portal.kernel.exception.PortalException,
087                            com.liferay.portal.kernel.exception.SystemException {
088                    getService().updateLogo(groupId, privateLayout, logo, inputStream);
089            }
090    
091            public static void updateLogo(long groupId, boolean privateLayout,
092                    boolean logo, java.io.InputStream inputStream, boolean cleanUpStream)
093                    throws com.liferay.portal.kernel.exception.PortalException,
094                            com.liferay.portal.kernel.exception.SystemException {
095                    getService()
096                            .updateLogo(groupId, privateLayout, logo, inputStream, cleanUpStream);
097            }
098    
099            public static com.liferay.portal.model.LayoutSet updateLookAndFeel(
100                    long groupId, boolean privateLayout, java.lang.String themeId,
101                    java.lang.String colorSchemeId, java.lang.String css, boolean wapTheme)
102                    throws com.liferay.portal.kernel.exception.PortalException,
103                            com.liferay.portal.kernel.exception.SystemException {
104                    return getService()
105                                       .updateLookAndFeel(groupId, privateLayout, themeId,
106                            colorSchemeId, css, wapTheme);
107            }
108    
109            public static com.liferay.portal.model.LayoutSet updateSettings(
110                    long groupId, boolean privateLayout, java.lang.String settings)
111                    throws com.liferay.portal.kernel.exception.PortalException,
112                            com.liferay.portal.kernel.exception.SystemException {
113                    return getService().updateSettings(groupId, privateLayout, settings);
114            }
115    
116            public static com.liferay.portal.model.LayoutSet updateVirtualHost(
117                    long groupId, boolean privateLayout, java.lang.String virtualHost)
118                    throws com.liferay.portal.kernel.exception.PortalException,
119                            com.liferay.portal.kernel.exception.SystemException {
120                    return getService()
121                                       .updateVirtualHost(groupId, privateLayout, virtualHost);
122            }
123    
124            public static LayoutSetService getService() {
125                    if (_service == null) {
126                            _service = (LayoutSetService)PortalBeanLocatorUtil.locate(LayoutSetService.class.getName());
127    
128                            ReferenceRegistry.registerReference(LayoutSetServiceUtil.class,
129                                    "_service");
130                            MethodCache.remove(LayoutSetService.class);
131                    }
132    
133                    return _service;
134            }
135    
136            public void setService(LayoutSetService service) {
137                    MethodCache.remove(LayoutSetService.class);
138    
139                    _service = service;
140    
141                    ReferenceRegistry.registerReference(LayoutSetServiceUtil.class,
142                            "_service");
143                    MethodCache.remove(LayoutSetService.class);
144            }
145    
146            private static LayoutSetService _service;
147    }