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