001
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
034 public class LayoutBranchServiceUtil {
035
040 public static com.liferay.portal.model.LayoutBranch addLayoutBranch(
041 long layoutRevisionId, java.lang.String name,
042 java.lang.String description, boolean master,
043 com.liferay.portal.service.ServiceContext serviceContext)
044 throws com.liferay.portal.kernel.exception.PortalException,
045 com.liferay.portal.kernel.exception.SystemException {
046 return getService()
047 .addLayoutBranch(layoutRevisionId, name, description,
048 master, serviceContext);
049 }
050
051 public static void deleteLayoutBranch(long layoutBranchId)
052 throws com.liferay.portal.kernel.exception.PortalException,
053 com.liferay.portal.kernel.exception.SystemException {
054 getService().deleteLayoutBranch(layoutBranchId);
055 }
056
057 public static com.liferay.portal.model.LayoutBranch updateLayoutBranch(
058 long layoutBranchId, java.lang.String name,
059 java.lang.String description,
060 com.liferay.portal.service.ServiceContext serviceContext)
061 throws com.liferay.portal.kernel.exception.PortalException,
062 com.liferay.portal.kernel.exception.SystemException {
063 return getService()
064 .updateLayoutBranch(layoutBranchId, name, description,
065 serviceContext);
066 }
067
068 public static LayoutBranchService getService() {
069 if (_service == null) {
070 _service = (LayoutBranchService)PortalBeanLocatorUtil.locate(LayoutBranchService.class.getName());
071
072 ReferenceRegistry.registerReference(LayoutBranchServiceUtil.class,
073 "_service");
074 MethodCache.remove(LayoutBranchService.class);
075 }
076
077 return _service;
078 }
079
080 public void setService(LayoutBranchService service) {
081 MethodCache.remove(LayoutBranchService.class);
082
083 _service = service;
084
085 ReferenceRegistry.registerReference(LayoutBranchServiceUtil.class,
086 "_service");
087 MethodCache.remove(LayoutBranchService.class);
088 }
089
090 private static LayoutBranchService _service;
091 }