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 branch remote service. This utility wraps {@link com.liferay.portal.service.impl.LayoutSetBranchServiceImpl} 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 LayoutSetBranchService
030     * @see com.liferay.portal.service.base.LayoutSetBranchServiceBaseImpl
031     * @see com.liferay.portal.service.impl.LayoutSetBranchServiceImpl
032     * @generated
033     */
034    public class LayoutSetBranchServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.LayoutSetBranchServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static com.liferay.portal.model.LayoutSetBranch addLayoutSetBranch(
041                    long groupId, boolean privateLayout, java.lang.String name,
042                    java.lang.String description, boolean master,
043                    long copyLayoutSetBranchId,
044                    com.liferay.portal.service.ServiceContext serviceContext)
045                    throws com.liferay.portal.kernel.exception.PortalException,
046                            com.liferay.portal.kernel.exception.SystemException {
047                    return getService()
048                                       .addLayoutSetBranch(groupId, privateLayout, name,
049                            description, master, copyLayoutSetBranchId, serviceContext);
050            }
051    
052            public static void deleteLayoutSetBranch(long layoutSetBranchId)
053                    throws com.liferay.portal.kernel.exception.PortalException,
054                            com.liferay.portal.kernel.exception.SystemException {
055                    getService().deleteLayoutSetBranch(layoutSetBranchId);
056            }
057    
058            public static java.util.List<com.liferay.portal.model.LayoutSetBranch> getLayoutSetBranches(
059                    long groupId, boolean privateLayout)
060                    throws com.liferay.portal.kernel.exception.SystemException {
061                    return getService().getLayoutSetBranches(groupId, privateLayout);
062            }
063    
064            public static com.liferay.portal.model.LayoutSetBranch mergeLayoutSetBranch(
065                    long layoutSetBranchId, long mergeLayoutSetBranchId,
066                    com.liferay.portal.service.ServiceContext serviceContext)
067                    throws com.liferay.portal.kernel.exception.PortalException,
068                            com.liferay.portal.kernel.exception.SystemException {
069                    return getService()
070                                       .mergeLayoutSetBranch(layoutSetBranchId,
071                            mergeLayoutSetBranchId, serviceContext);
072            }
073    
074            public static com.liferay.portal.model.LayoutSetBranch updateLayoutSetBranch(
075                    long groupId, long layoutSetBranchId, java.lang.String name,
076                    java.lang.String description,
077                    com.liferay.portal.service.ServiceContext serviceContext)
078                    throws com.liferay.portal.kernel.exception.PortalException,
079                            com.liferay.portal.kernel.exception.SystemException {
080                    return getService()
081                                       .updateLayoutSetBranch(groupId, layoutSetBranchId, name,
082                            description, serviceContext);
083            }
084    
085            public static LayoutSetBranchService getService() {
086                    if (_service == null) {
087                            _service = (LayoutSetBranchService)PortalBeanLocatorUtil.locate(LayoutSetBranchService.class.getName());
088    
089                            ReferenceRegistry.registerReference(LayoutSetBranchServiceUtil.class,
090                                    "_service");
091                            MethodCache.remove(LayoutSetBranchService.class);
092                    }
093    
094                    return _service;
095            }
096    
097            public void setService(LayoutSetBranchService service) {
098                    MethodCache.remove(LayoutSetBranchService.class);
099    
100                    _service = service;
101    
102                    ReferenceRegistry.registerReference(LayoutSetBranchServiceUtil.class,
103                            "_service");
104                    MethodCache.remove(LayoutSetBranchService.class);
105            }
106    
107            private static LayoutSetBranchService _service;
108    }