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.LayoutSetBranchServiceUtil;
025
026
054 @ProviderType
055 public class LayoutSetBranchServiceHttp {
056 public static com.liferay.portal.model.LayoutSetBranch addLayoutSetBranch(
057 HttpPrincipal httpPrincipal, long groupId, boolean privateLayout,
058 java.lang.String name, java.lang.String description, boolean master,
059 long copyLayoutSetBranchId,
060 com.liferay.portal.service.ServiceContext serviceContext)
061 throws com.liferay.portal.kernel.exception.PortalException {
062 try {
063 MethodKey methodKey = new MethodKey(LayoutSetBranchServiceUtil.class,
064 "addLayoutSetBranch", _addLayoutSetBranchParameterTypes0);
065
066 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
067 privateLayout, name, description, master,
068 copyLayoutSetBranchId, serviceContext);
069
070 Object returnObj = null;
071
072 try {
073 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
074 }
075 catch (Exception e) {
076 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
077 throw (com.liferay.portal.kernel.exception.PortalException)e;
078 }
079
080 throw new com.liferay.portal.kernel.exception.SystemException(e);
081 }
082
083 return (com.liferay.portal.model.LayoutSetBranch)returnObj;
084 }
085 catch (com.liferay.portal.kernel.exception.SystemException se) {
086 _log.error(se, se);
087
088 throw se;
089 }
090 }
091
092 public static void deleteLayoutSetBranch(HttpPrincipal httpPrincipal,
093 long layoutSetBranchId)
094 throws com.liferay.portal.kernel.exception.PortalException {
095 try {
096 MethodKey methodKey = new MethodKey(LayoutSetBranchServiceUtil.class,
097 "deleteLayoutSetBranch",
098 _deleteLayoutSetBranchParameterTypes1);
099
100 MethodHandler methodHandler = new MethodHandler(methodKey,
101 layoutSetBranchId);
102
103 try {
104 TunnelUtil.invoke(httpPrincipal, methodHandler);
105 }
106 catch (Exception e) {
107 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
108 throw (com.liferay.portal.kernel.exception.PortalException)e;
109 }
110
111 throw new com.liferay.portal.kernel.exception.SystemException(e);
112 }
113 }
114 catch (com.liferay.portal.kernel.exception.SystemException se) {
115 _log.error(se, se);
116
117 throw se;
118 }
119 }
120
121 public static java.util.List<com.liferay.portal.model.LayoutSetBranch> getLayoutSetBranches(
122 HttpPrincipal httpPrincipal, long groupId, boolean privateLayout) {
123 try {
124 MethodKey methodKey = new MethodKey(LayoutSetBranchServiceUtil.class,
125 "getLayoutSetBranches", _getLayoutSetBranchesParameterTypes2);
126
127 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
128 privateLayout);
129
130 Object returnObj = null;
131
132 try {
133 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
134 }
135 catch (Exception e) {
136 throw new com.liferay.portal.kernel.exception.SystemException(e);
137 }
138
139 return (java.util.List<com.liferay.portal.model.LayoutSetBranch>)returnObj;
140 }
141 catch (com.liferay.portal.kernel.exception.SystemException se) {
142 _log.error(se, se);
143
144 throw se;
145 }
146 }
147
148 public static com.liferay.portal.model.LayoutSetBranch mergeLayoutSetBranch(
149 HttpPrincipal httpPrincipal, long layoutSetBranchId,
150 long mergeLayoutSetBranchId,
151 com.liferay.portal.service.ServiceContext serviceContext)
152 throws com.liferay.portal.kernel.exception.PortalException {
153 try {
154 MethodKey methodKey = new MethodKey(LayoutSetBranchServiceUtil.class,
155 "mergeLayoutSetBranch", _mergeLayoutSetBranchParameterTypes3);
156
157 MethodHandler methodHandler = new MethodHandler(methodKey,
158 layoutSetBranchId, mergeLayoutSetBranchId, serviceContext);
159
160 Object returnObj = null;
161
162 try {
163 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
164 }
165 catch (Exception e) {
166 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
167 throw (com.liferay.portal.kernel.exception.PortalException)e;
168 }
169
170 throw new com.liferay.portal.kernel.exception.SystemException(e);
171 }
172
173 return (com.liferay.portal.model.LayoutSetBranch)returnObj;
174 }
175 catch (com.liferay.portal.kernel.exception.SystemException se) {
176 _log.error(se, se);
177
178 throw se;
179 }
180 }
181
182 public static com.liferay.portal.model.LayoutSetBranch updateLayoutSetBranch(
183 HttpPrincipal httpPrincipal, long groupId, long layoutSetBranchId,
184 java.lang.String name, java.lang.String description,
185 com.liferay.portal.service.ServiceContext serviceContext)
186 throws com.liferay.portal.kernel.exception.PortalException {
187 try {
188 MethodKey methodKey = new MethodKey(LayoutSetBranchServiceUtil.class,
189 "updateLayoutSetBranch",
190 _updateLayoutSetBranchParameterTypes4);
191
192 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
193 layoutSetBranchId, name, description, serviceContext);
194
195 Object returnObj = null;
196
197 try {
198 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
199 }
200 catch (Exception e) {
201 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
202 throw (com.liferay.portal.kernel.exception.PortalException)e;
203 }
204
205 throw new com.liferay.portal.kernel.exception.SystemException(e);
206 }
207
208 return (com.liferay.portal.model.LayoutSetBranch)returnObj;
209 }
210 catch (com.liferay.portal.kernel.exception.SystemException se) {
211 _log.error(se, se);
212
213 throw se;
214 }
215 }
216
217 private static Log _log = LogFactoryUtil.getLog(LayoutSetBranchServiceHttp.class);
218 private static final Class<?>[] _addLayoutSetBranchParameterTypes0 = new Class[] {
219 long.class, boolean.class, java.lang.String.class,
220 java.lang.String.class, boolean.class, long.class,
221 com.liferay.portal.service.ServiceContext.class
222 };
223 private static final Class<?>[] _deleteLayoutSetBranchParameterTypes1 = new Class[] {
224 long.class
225 };
226 private static final Class<?>[] _getLayoutSetBranchesParameterTypes2 = new Class[] {
227 long.class, boolean.class
228 };
229 private static final Class<?>[] _mergeLayoutSetBranchParameterTypes3 = new Class[] {
230 long.class, long.class,
231 com.liferay.portal.service.ServiceContext.class
232 };
233 private static final Class<?>[] _updateLayoutSetBranchParameterTypes4 = new Class[] {
234 long.class, long.class, java.lang.String.class,
235 java.lang.String.class,
236 com.liferay.portal.service.ServiceContext.class
237 };
238 }