001
014
015 package com.liferay.portlet.dynamicdatamapping.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.http.TunnelUtil;
023
024 import com.liferay.portlet.dynamicdatamapping.service.DDMStructureServiceUtil;
025
026
056 public class DDMStructureServiceHttp {
057 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure addStructure(
058 HttpPrincipal httpPrincipal, long groupId, long parentStructureId,
059 long classNameId, java.lang.String structureKey,
060 java.util.Map<java.util.Locale, java.lang.String> nameMap,
061 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
062 java.lang.String xsd, java.lang.String storageType, int type,
063 com.liferay.portal.service.ServiceContext serviceContext)
064 throws com.liferay.portal.kernel.exception.PortalException,
065 com.liferay.portal.kernel.exception.SystemException {
066 try {
067 MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class.getName(),
068 "addStructure", _addStructureParameterTypes0);
069
070 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
071 parentStructureId, classNameId, structureKey, nameMap,
072 descriptionMap, xsd, storageType, type, serviceContext);
073
074 Object returnObj = null;
075
076 try {
077 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
078 }
079 catch (Exception e) {
080 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
081 throw (com.liferay.portal.kernel.exception.PortalException)e;
082 }
083
084 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
085 throw (com.liferay.portal.kernel.exception.SystemException)e;
086 }
087
088 throw new com.liferay.portal.kernel.exception.SystemException(e);
089 }
090
091 return (com.liferay.portlet.dynamicdatamapping.model.DDMStructure)returnObj;
092 }
093 catch (com.liferay.portal.kernel.exception.SystemException se) {
094 _log.error(se, se);
095
096 throw se;
097 }
098 }
099
100 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure copyStructure(
101 HttpPrincipal httpPrincipal, long structureId,
102 java.util.Map<java.util.Locale, java.lang.String> nameMap,
103 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
104 com.liferay.portal.service.ServiceContext serviceContext)
105 throws com.liferay.portal.kernel.exception.PortalException,
106 com.liferay.portal.kernel.exception.SystemException {
107 try {
108 MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class.getName(),
109 "copyStructure", _copyStructureParameterTypes1);
110
111 MethodHandler methodHandler = new MethodHandler(methodKey,
112 structureId, nameMap, descriptionMap, serviceContext);
113
114 Object returnObj = null;
115
116 try {
117 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
118 }
119 catch (Exception e) {
120 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
121 throw (com.liferay.portal.kernel.exception.PortalException)e;
122 }
123
124 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
125 throw (com.liferay.portal.kernel.exception.SystemException)e;
126 }
127
128 throw new com.liferay.portal.kernel.exception.SystemException(e);
129 }
130
131 return (com.liferay.portlet.dynamicdatamapping.model.DDMStructure)returnObj;
132 }
133 catch (com.liferay.portal.kernel.exception.SystemException se) {
134 _log.error(se, se);
135
136 throw se;
137 }
138 }
139
140 public static void deleteStructure(HttpPrincipal httpPrincipal,
141 long structureId)
142 throws com.liferay.portal.kernel.exception.PortalException,
143 com.liferay.portal.kernel.exception.SystemException {
144 try {
145 MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class.getName(),
146 "deleteStructure", _deleteStructureParameterTypes2);
147
148 MethodHandler methodHandler = new MethodHandler(methodKey,
149 structureId);
150
151 try {
152 TunnelUtil.invoke(httpPrincipal, methodHandler);
153 }
154 catch (Exception e) {
155 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
156 throw (com.liferay.portal.kernel.exception.PortalException)e;
157 }
158
159 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
160 throw (com.liferay.portal.kernel.exception.SystemException)e;
161 }
162
163 throw new com.liferay.portal.kernel.exception.SystemException(e);
164 }
165 }
166 catch (com.liferay.portal.kernel.exception.SystemException se) {
167 _log.error(se, se);
168
169 throw se;
170 }
171 }
172
173 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure fetchStructure(
174 HttpPrincipal httpPrincipal, long groupId, java.lang.String structureKey)
175 throws com.liferay.portal.kernel.exception.PortalException,
176 com.liferay.portal.kernel.exception.SystemException {
177 try {
178 MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class.getName(),
179 "fetchStructure", _fetchStructureParameterTypes3);
180
181 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
182 structureKey);
183
184 Object returnObj = null;
185
186 try {
187 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
188 }
189 catch (Exception e) {
190 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
191 throw (com.liferay.portal.kernel.exception.PortalException)e;
192 }
193
194 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
195 throw (com.liferay.portal.kernel.exception.SystemException)e;
196 }
197
198 throw new com.liferay.portal.kernel.exception.SystemException(e);
199 }
200
201 return (com.liferay.portlet.dynamicdatamapping.model.DDMStructure)returnObj;
202 }
203 catch (com.liferay.portal.kernel.exception.SystemException se) {
204 _log.error(se, se);
205
206 throw se;
207 }
208 }
209
210 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure(
211 HttpPrincipal httpPrincipal, long structureId)
212 throws com.liferay.portal.kernel.exception.PortalException,
213 com.liferay.portal.kernel.exception.SystemException {
214 try {
215 MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class.getName(),
216 "getStructure", _getStructureParameterTypes4);
217
218 MethodHandler methodHandler = new MethodHandler(methodKey,
219 structureId);
220
221 Object returnObj = null;
222
223 try {
224 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
225 }
226 catch (Exception e) {
227 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
228 throw (com.liferay.portal.kernel.exception.PortalException)e;
229 }
230
231 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
232 throw (com.liferay.portal.kernel.exception.SystemException)e;
233 }
234
235 throw new com.liferay.portal.kernel.exception.SystemException(e);
236 }
237
238 return (com.liferay.portlet.dynamicdatamapping.model.DDMStructure)returnObj;
239 }
240 catch (com.liferay.portal.kernel.exception.SystemException se) {
241 _log.error(se, se);
242
243 throw se;
244 }
245 }
246
247 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> search(
248 HttpPrincipal httpPrincipal, long companyId, long[] groupIds,
249 long[] classNameIds, java.lang.String keywords, int start, int end,
250 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
251 throws com.liferay.portal.kernel.exception.SystemException {
252 try {
253 MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class.getName(),
254 "search", _searchParameterTypes5);
255
256 MethodHandler methodHandler = new MethodHandler(methodKey,
257 companyId, groupIds, classNameIds, keywords, start, end,
258 orderByComparator);
259
260 Object returnObj = null;
261
262 try {
263 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
264 }
265 catch (Exception e) {
266 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
267 throw (com.liferay.portal.kernel.exception.SystemException)e;
268 }
269
270 throw new com.liferay.portal.kernel.exception.SystemException(e);
271 }
272
273 return (java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure>)returnObj;
274 }
275 catch (com.liferay.portal.kernel.exception.SystemException se) {
276 _log.error(se, se);
277
278 throw se;
279 }
280 }
281
282 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> search(
283 HttpPrincipal httpPrincipal, long companyId, long[] groupIds,
284 long[] classNameIds, java.lang.String name,
285 java.lang.String description, java.lang.String storageType, int type,
286 boolean andOperator, int start, int end,
287 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
288 throws com.liferay.portal.kernel.exception.SystemException {
289 try {
290 MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class.getName(),
291 "search", _searchParameterTypes6);
292
293 MethodHandler methodHandler = new MethodHandler(methodKey,
294 companyId, groupIds, classNameIds, name, description,
295 storageType, type, andOperator, start, end,
296 orderByComparator);
297
298 Object returnObj = null;
299
300 try {
301 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
302 }
303 catch (Exception e) {
304 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
305 throw (com.liferay.portal.kernel.exception.SystemException)e;
306 }
307
308 throw new com.liferay.portal.kernel.exception.SystemException(e);
309 }
310
311 return (java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure>)returnObj;
312 }
313 catch (com.liferay.portal.kernel.exception.SystemException se) {
314 _log.error(se, se);
315
316 throw se;
317 }
318 }
319
320 public static int searchCount(HttpPrincipal httpPrincipal, long companyId,
321 long[] groupIds, long[] classNameIds, java.lang.String keywords)
322 throws com.liferay.portal.kernel.exception.SystemException {
323 try {
324 MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class.getName(),
325 "searchCount", _searchCountParameterTypes7);
326
327 MethodHandler methodHandler = new MethodHandler(methodKey,
328 companyId, groupIds, classNameIds, keywords);
329
330 Object returnObj = null;
331
332 try {
333 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
334 }
335 catch (Exception e) {
336 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
337 throw (com.liferay.portal.kernel.exception.SystemException)e;
338 }
339
340 throw new com.liferay.portal.kernel.exception.SystemException(e);
341 }
342
343 return ((Integer)returnObj).intValue();
344 }
345 catch (com.liferay.portal.kernel.exception.SystemException se) {
346 _log.error(se, se);
347
348 throw se;
349 }
350 }
351
352 public static int searchCount(HttpPrincipal httpPrincipal, long companyId,
353 long[] groupIds, long[] classNameIds, java.lang.String name,
354 java.lang.String description, java.lang.String storageType, int type,
355 boolean andOperator)
356 throws com.liferay.portal.kernel.exception.SystemException {
357 try {
358 MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class.getName(),
359 "searchCount", _searchCountParameterTypes8);
360
361 MethodHandler methodHandler = new MethodHandler(methodKey,
362 companyId, groupIds, classNameIds, name, description,
363 storageType, type, andOperator);
364
365 Object returnObj = null;
366
367 try {
368 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
369 }
370 catch (Exception e) {
371 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
372 throw (com.liferay.portal.kernel.exception.SystemException)e;
373 }
374
375 throw new com.liferay.portal.kernel.exception.SystemException(e);
376 }
377
378 return ((Integer)returnObj).intValue();
379 }
380 catch (com.liferay.portal.kernel.exception.SystemException se) {
381 _log.error(se, se);
382
383 throw se;
384 }
385 }
386
387 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure(
388 HttpPrincipal httpPrincipal, long structureId, long parentStructureId,
389 java.util.Map<java.util.Locale, java.lang.String> nameMap,
390 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
391 java.lang.String xsd,
392 com.liferay.portal.service.ServiceContext serviceContext)
393 throws com.liferay.portal.kernel.exception.PortalException,
394 com.liferay.portal.kernel.exception.SystemException {
395 try {
396 MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class.getName(),
397 "updateStructure", _updateStructureParameterTypes9);
398
399 MethodHandler methodHandler = new MethodHandler(methodKey,
400 structureId, parentStructureId, nameMap, descriptionMap,
401 xsd, serviceContext);
402
403 Object returnObj = null;
404
405 try {
406 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
407 }
408 catch (Exception e) {
409 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
410 throw (com.liferay.portal.kernel.exception.PortalException)e;
411 }
412
413 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
414 throw (com.liferay.portal.kernel.exception.SystemException)e;
415 }
416
417 throw new com.liferay.portal.kernel.exception.SystemException(e);
418 }
419
420 return (com.liferay.portlet.dynamicdatamapping.model.DDMStructure)returnObj;
421 }
422 catch (com.liferay.portal.kernel.exception.SystemException se) {
423 _log.error(se, se);
424
425 throw se;
426 }
427 }
428
429 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure(
430 HttpPrincipal httpPrincipal, long groupId, long parentStructureId,
431 java.lang.String structureKey,
432 java.util.Map<java.util.Locale, java.lang.String> nameMap,
433 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
434 java.lang.String xsd,
435 com.liferay.portal.service.ServiceContext serviceContext)
436 throws com.liferay.portal.kernel.exception.PortalException,
437 com.liferay.portal.kernel.exception.SystemException {
438 try {
439 MethodKey methodKey = new MethodKey(DDMStructureServiceUtil.class.getName(),
440 "updateStructure", _updateStructureParameterTypes10);
441
442 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
443 parentStructureId, structureKey, nameMap, descriptionMap,
444 xsd, serviceContext);
445
446 Object returnObj = null;
447
448 try {
449 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
450 }
451 catch (Exception e) {
452 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
453 throw (com.liferay.portal.kernel.exception.PortalException)e;
454 }
455
456 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
457 throw (com.liferay.portal.kernel.exception.SystemException)e;
458 }
459
460 throw new com.liferay.portal.kernel.exception.SystemException(e);
461 }
462
463 return (com.liferay.portlet.dynamicdatamapping.model.DDMStructure)returnObj;
464 }
465 catch (com.liferay.portal.kernel.exception.SystemException se) {
466 _log.error(se, se);
467
468 throw se;
469 }
470 }
471
472 private static Log _log = LogFactoryUtil.getLog(DDMStructureServiceHttp.class);
473 private static final Class<?>[] _addStructureParameterTypes0 = new Class[] {
474 long.class, long.class, long.class, java.lang.String.class,
475 java.util.Map.class, java.util.Map.class, java.lang.String.class,
476 java.lang.String.class, int.class,
477 com.liferay.portal.service.ServiceContext.class
478 };
479 private static final Class<?>[] _copyStructureParameterTypes1 = new Class[] {
480 long.class, java.util.Map.class, java.util.Map.class,
481 com.liferay.portal.service.ServiceContext.class
482 };
483 private static final Class<?>[] _deleteStructureParameterTypes2 = new Class[] {
484 long.class
485 };
486 private static final Class<?>[] _fetchStructureParameterTypes3 = new Class[] {
487 long.class, java.lang.String.class
488 };
489 private static final Class<?>[] _getStructureParameterTypes4 = new Class[] {
490 long.class
491 };
492 private static final Class<?>[] _searchParameterTypes5 = new Class[] {
493 long.class, long[].class, long[].class, java.lang.String.class,
494 int.class, int.class,
495 com.liferay.portal.kernel.util.OrderByComparator.class
496 };
497 private static final Class<?>[] _searchParameterTypes6 = new Class[] {
498 long.class, long[].class, long[].class, java.lang.String.class,
499 java.lang.String.class, java.lang.String.class, int.class,
500 boolean.class, int.class, int.class,
501 com.liferay.portal.kernel.util.OrderByComparator.class
502 };
503 private static final Class<?>[] _searchCountParameterTypes7 = new Class[] {
504 long.class, long[].class, long[].class, java.lang.String.class
505 };
506 private static final Class<?>[] _searchCountParameterTypes8 = new Class[] {
507 long.class, long[].class, long[].class, java.lang.String.class,
508 java.lang.String.class, java.lang.String.class, int.class,
509 boolean.class
510 };
511 private static final Class<?>[] _updateStructureParameterTypes9 = new Class[] {
512 long.class, long.class, java.util.Map.class, java.util.Map.class,
513 java.lang.String.class,
514 com.liferay.portal.service.ServiceContext.class
515 };
516 private static final Class<?>[] _updateStructureParameterTypes10 = new Class[] {
517 long.class, long.class, java.lang.String.class, java.util.Map.class,
518 java.util.Map.class, java.lang.String.class,
519 com.liferay.portal.service.ServiceContext.class
520 };
521 }