001
014
015 package com.liferay.portal.service.http;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.log.Log;
020 import com.liferay.portal.kernel.log.LogFactoryUtil;
021 import com.liferay.portal.kernel.util.MethodHandler;
022 import com.liferay.portal.kernel.util.MethodKey;
023 import com.liferay.portal.security.auth.HttpPrincipal;
024 import com.liferay.portal.service.LayoutBranchServiceUtil;
025
026
054 @ProviderType
055 public class LayoutBranchServiceHttp {
056 public static com.liferay.portal.model.LayoutBranch addLayoutBranch(
057 HttpPrincipal httpPrincipal, long layoutRevisionId,
058 java.lang.String name, java.lang.String description, boolean master,
059 com.liferay.portal.service.ServiceContext serviceContext)
060 throws com.liferay.portal.kernel.exception.PortalException {
061 try {
062 MethodKey methodKey = new MethodKey(LayoutBranchServiceUtil.class,
063 "addLayoutBranch", _addLayoutBranchParameterTypes0);
064
065 MethodHandler methodHandler = new MethodHandler(methodKey,
066 layoutRevisionId, name, description, master, serviceContext);
067
068 Object returnObj = null;
069
070 try {
071 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
072 }
073 catch (Exception e) {
074 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
075 throw (com.liferay.portal.kernel.exception.PortalException)e;
076 }
077
078 throw new com.liferay.portal.kernel.exception.SystemException(e);
079 }
080
081 return (com.liferay.portal.model.LayoutBranch)returnObj;
082 }
083 catch (com.liferay.portal.kernel.exception.SystemException se) {
084 _log.error(se, se);
085
086 throw se;
087 }
088 }
089
090 public static void deleteLayoutBranch(HttpPrincipal httpPrincipal,
091 long layoutBranchId)
092 throws com.liferay.portal.kernel.exception.PortalException {
093 try {
094 MethodKey methodKey = new MethodKey(LayoutBranchServiceUtil.class,
095 "deleteLayoutBranch", _deleteLayoutBranchParameterTypes1);
096
097 MethodHandler methodHandler = new MethodHandler(methodKey,
098 layoutBranchId);
099
100 try {
101 TunnelUtil.invoke(httpPrincipal, methodHandler);
102 }
103 catch (Exception e) {
104 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
105 throw (com.liferay.portal.kernel.exception.PortalException)e;
106 }
107
108 throw new com.liferay.portal.kernel.exception.SystemException(e);
109 }
110 }
111 catch (com.liferay.portal.kernel.exception.SystemException se) {
112 _log.error(se, se);
113
114 throw se;
115 }
116 }
117
118 public static com.liferay.portal.model.LayoutBranch updateLayoutBranch(
119 HttpPrincipal httpPrincipal, long layoutBranchId,
120 java.lang.String name, java.lang.String description,
121 com.liferay.portal.service.ServiceContext serviceContext)
122 throws com.liferay.portal.kernel.exception.PortalException {
123 try {
124 MethodKey methodKey = new MethodKey(LayoutBranchServiceUtil.class,
125 "updateLayoutBranch", _updateLayoutBranchParameterTypes2);
126
127 MethodHandler methodHandler = new MethodHandler(methodKey,
128 layoutBranchId, name, description, serviceContext);
129
130 Object returnObj = null;
131
132 try {
133 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
134 }
135 catch (Exception e) {
136 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
137 throw (com.liferay.portal.kernel.exception.PortalException)e;
138 }
139
140 throw new com.liferay.portal.kernel.exception.SystemException(e);
141 }
142
143 return (com.liferay.portal.model.LayoutBranch)returnObj;
144 }
145 catch (com.liferay.portal.kernel.exception.SystemException se) {
146 _log.error(se, se);
147
148 throw se;
149 }
150 }
151
152 private static Log _log = LogFactoryUtil.getLog(LayoutBranchServiceHttp.class);
153 private static final Class<?>[] _addLayoutBranchParameterTypes0 = new Class[] {
154 long.class, java.lang.String.class, java.lang.String.class,
155 boolean.class, com.liferay.portal.service.ServiceContext.class
156 };
157 private static final Class<?>[] _deleteLayoutBranchParameterTypes1 = new Class[] {
158 long.class
159 };
160 private static final Class<?>[] _updateLayoutBranchParameterTypes2 = new Class[] {
161 long.class, java.lang.String.class, java.lang.String.class,
162 com.liferay.portal.service.ServiceContext.class
163 };
164 }