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.LayoutPrototypeServiceUtil;
023
024
052 public class LayoutPrototypeServiceHttp {
053 public static com.liferay.portal.model.LayoutPrototype addLayoutPrototype(
054 HttpPrincipal httpPrincipal,
055 java.util.Map<java.util.Locale, java.lang.String> nameMap,
056 java.lang.String description, boolean active)
057 throws com.liferay.portal.kernel.exception.PortalException,
058 com.liferay.portal.kernel.exception.SystemException {
059 try {
060 MethodKey methodKey = new MethodKey(LayoutPrototypeServiceUtil.class,
061 "addLayoutPrototype", _addLayoutPrototypeParameterTypes0);
062
063 MethodHandler methodHandler = new MethodHandler(methodKey, nameMap,
064 description, active);
065
066 Object returnObj = null;
067
068 try {
069 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
070 }
071 catch (Exception e) {
072 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
073 throw (com.liferay.portal.kernel.exception.PortalException)e;
074 }
075
076 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
077 throw (com.liferay.portal.kernel.exception.SystemException)e;
078 }
079
080 throw new com.liferay.portal.kernel.exception.SystemException(e);
081 }
082
083 return (com.liferay.portal.model.LayoutPrototype)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 com.liferay.portal.model.LayoutPrototype addLayoutPrototype(
093 HttpPrincipal httpPrincipal,
094 java.util.Map<java.util.Locale, java.lang.String> nameMap,
095 java.lang.String description, boolean active,
096 com.liferay.portal.service.ServiceContext serviceContext)
097 throws com.liferay.portal.kernel.exception.PortalException,
098 com.liferay.portal.kernel.exception.SystemException {
099 try {
100 MethodKey methodKey = new MethodKey(LayoutPrototypeServiceUtil.class,
101 "addLayoutPrototype", _addLayoutPrototypeParameterTypes1);
102
103 MethodHandler methodHandler = new MethodHandler(methodKey, nameMap,
104 description, active, serviceContext);
105
106 Object returnObj = null;
107
108 try {
109 returnObj = 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 return (com.liferay.portal.model.LayoutPrototype)returnObj;
124 }
125 catch (com.liferay.portal.kernel.exception.SystemException se) {
126 _log.error(se, se);
127
128 throw se;
129 }
130 }
131
132 public static void deleteLayoutPrototype(HttpPrincipal httpPrincipal,
133 long layoutPrototypeId)
134 throws com.liferay.portal.kernel.exception.PortalException,
135 com.liferay.portal.kernel.exception.SystemException {
136 try {
137 MethodKey methodKey = new MethodKey(LayoutPrototypeServiceUtil.class,
138 "deleteLayoutPrototype",
139 _deleteLayoutPrototypeParameterTypes2);
140
141 MethodHandler methodHandler = new MethodHandler(methodKey,
142 layoutPrototypeId);
143
144 try {
145 TunnelUtil.invoke(httpPrincipal, methodHandler);
146 }
147 catch (Exception e) {
148 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
149 throw (com.liferay.portal.kernel.exception.PortalException)e;
150 }
151
152 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
153 throw (com.liferay.portal.kernel.exception.SystemException)e;
154 }
155
156 throw new com.liferay.portal.kernel.exception.SystemException(e);
157 }
158 }
159 catch (com.liferay.portal.kernel.exception.SystemException se) {
160 _log.error(se, se);
161
162 throw se;
163 }
164 }
165
166 public static com.liferay.portal.model.LayoutPrototype getLayoutPrototype(
167 HttpPrincipal httpPrincipal, long layoutPrototypeId)
168 throws com.liferay.portal.kernel.exception.PortalException,
169 com.liferay.portal.kernel.exception.SystemException {
170 try {
171 MethodKey methodKey = new MethodKey(LayoutPrototypeServiceUtil.class,
172 "getLayoutPrototype", _getLayoutPrototypeParameterTypes3);
173
174 MethodHandler methodHandler = new MethodHandler(methodKey,
175 layoutPrototypeId);
176
177 Object returnObj = null;
178
179 try {
180 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
181 }
182 catch (Exception e) {
183 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
184 throw (com.liferay.portal.kernel.exception.PortalException)e;
185 }
186
187 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
188 throw (com.liferay.portal.kernel.exception.SystemException)e;
189 }
190
191 throw new com.liferay.portal.kernel.exception.SystemException(e);
192 }
193
194 return (com.liferay.portal.model.LayoutPrototype)returnObj;
195 }
196 catch (com.liferay.portal.kernel.exception.SystemException se) {
197 _log.error(se, se);
198
199 throw se;
200 }
201 }
202
203 public static java.util.List<com.liferay.portal.model.LayoutPrototype> search(
204 HttpPrincipal httpPrincipal, long companyId, java.lang.Boolean active,
205 com.liferay.portal.kernel.util.OrderByComparator obc)
206 throws com.liferay.portal.kernel.exception.PortalException,
207 com.liferay.portal.kernel.exception.SystemException {
208 try {
209 MethodKey methodKey = new MethodKey(LayoutPrototypeServiceUtil.class,
210 "search", _searchParameterTypes4);
211
212 MethodHandler methodHandler = new MethodHandler(methodKey,
213 companyId, active, obc);
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 (java.util.List<com.liferay.portal.model.LayoutPrototype>)returnObj;
233 }
234 catch (com.liferay.portal.kernel.exception.SystemException se) {
235 _log.error(se, se);
236
237 throw se;
238 }
239 }
240
241 public static com.liferay.portal.model.LayoutPrototype updateLayoutPrototype(
242 HttpPrincipal httpPrincipal, long layoutPrototypeId,
243 java.util.Map<java.util.Locale, java.lang.String> nameMap,
244 java.lang.String description, boolean active)
245 throws com.liferay.portal.kernel.exception.PortalException,
246 com.liferay.portal.kernel.exception.SystemException {
247 try {
248 MethodKey methodKey = new MethodKey(LayoutPrototypeServiceUtil.class,
249 "updateLayoutPrototype",
250 _updateLayoutPrototypeParameterTypes5);
251
252 MethodHandler methodHandler = new MethodHandler(methodKey,
253 layoutPrototypeId, nameMap, description, active);
254
255 Object returnObj = null;
256
257 try {
258 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
259 }
260 catch (Exception e) {
261 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
262 throw (com.liferay.portal.kernel.exception.PortalException)e;
263 }
264
265 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
266 throw (com.liferay.portal.kernel.exception.SystemException)e;
267 }
268
269 throw new com.liferay.portal.kernel.exception.SystemException(e);
270 }
271
272 return (com.liferay.portal.model.LayoutPrototype)returnObj;
273 }
274 catch (com.liferay.portal.kernel.exception.SystemException se) {
275 _log.error(se, se);
276
277 throw se;
278 }
279 }
280
281 public static com.liferay.portal.model.LayoutPrototype updateLayoutPrototype(
282 HttpPrincipal httpPrincipal, long layoutPrototypeId,
283 java.util.Map<java.util.Locale, java.lang.String> nameMap,
284 java.lang.String description, boolean active,
285 com.liferay.portal.service.ServiceContext serviceContext)
286 throws com.liferay.portal.kernel.exception.PortalException,
287 com.liferay.portal.kernel.exception.SystemException {
288 try {
289 MethodKey methodKey = new MethodKey(LayoutPrototypeServiceUtil.class,
290 "updateLayoutPrototype",
291 _updateLayoutPrototypeParameterTypes6);
292
293 MethodHandler methodHandler = new MethodHandler(methodKey,
294 layoutPrototypeId, nameMap, description, active,
295 serviceContext);
296
297 Object returnObj = null;
298
299 try {
300 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
301 }
302 catch (Exception e) {
303 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
304 throw (com.liferay.portal.kernel.exception.PortalException)e;
305 }
306
307 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
308 throw (com.liferay.portal.kernel.exception.SystemException)e;
309 }
310
311 throw new com.liferay.portal.kernel.exception.SystemException(e);
312 }
313
314 return (com.liferay.portal.model.LayoutPrototype)returnObj;
315 }
316 catch (com.liferay.portal.kernel.exception.SystemException se) {
317 _log.error(se, se);
318
319 throw se;
320 }
321 }
322
323 private static Log _log = LogFactoryUtil.getLog(LayoutPrototypeServiceHttp.class);
324 private static final Class<?>[] _addLayoutPrototypeParameterTypes0 = new Class[] {
325 java.util.Map.class, java.lang.String.class, boolean.class
326 };
327 private static final Class<?>[] _addLayoutPrototypeParameterTypes1 = new Class[] {
328 java.util.Map.class, java.lang.String.class, boolean.class,
329 com.liferay.portal.service.ServiceContext.class
330 };
331 private static final Class<?>[] _deleteLayoutPrototypeParameterTypes2 = new Class[] {
332 long.class
333 };
334 private static final Class<?>[] _getLayoutPrototypeParameterTypes3 = new Class[] {
335 long.class
336 };
337 private static final Class<?>[] _searchParameterTypes4 = new Class[] {
338 long.class, java.lang.Boolean.class,
339 com.liferay.portal.kernel.util.OrderByComparator.class
340 };
341 private static final Class<?>[] _updateLayoutPrototypeParameterTypes5 = new Class[] {
342 long.class, java.util.Map.class, java.lang.String.class,
343 boolean.class
344 };
345 private static final Class<?>[] _updateLayoutPrototypeParameterTypes6 = new Class[] {
346 long.class, java.util.Map.class, java.lang.String.class,
347 boolean.class, com.liferay.portal.service.ServiceContext.class
348 };
349 }