001
014
015 package com.liferay.portlet.journal.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.journal.service.JournalStructureServiceUtil;
025
026
056 public class JournalStructureServiceHttp {
057 public static com.liferay.portlet.journal.model.JournalStructure addStructure(
058 HttpPrincipal httpPrincipal, long groupId,
059 java.lang.String structureId, boolean autoStructureId,
060 java.lang.String parentStructureId,
061 java.util.Map<java.util.Locale, java.lang.String> nameMap,
062 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
063 java.lang.String xsd,
064 com.liferay.portal.service.ServiceContext serviceContext)
065 throws com.liferay.portal.kernel.exception.PortalException,
066 com.liferay.portal.kernel.exception.SystemException {
067 try {
068 MethodKey methodKey = new MethodKey(JournalStructureServiceUtil.class,
069 "addStructure", _addStructureParameterTypes0);
070
071 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
072 structureId, autoStructureId, parentStructureId, nameMap,
073 descriptionMap, xsd, serviceContext);
074
075 Object returnObj = null;
076
077 try {
078 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
079 }
080 catch (Exception e) {
081 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
082 throw (com.liferay.portal.kernel.exception.PortalException)e;
083 }
084
085 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
086 throw (com.liferay.portal.kernel.exception.SystemException)e;
087 }
088
089 throw new com.liferay.portal.kernel.exception.SystemException(e);
090 }
091
092 return (com.liferay.portlet.journal.model.JournalStructure)returnObj;
093 }
094 catch (com.liferay.portal.kernel.exception.SystemException se) {
095 _log.error(se, se);
096
097 throw se;
098 }
099 }
100
101 public static com.liferay.portlet.journal.model.JournalStructure copyStructure(
102 HttpPrincipal httpPrincipal, long groupId,
103 java.lang.String oldStructureId, java.lang.String newStructureId,
104 boolean autoStructureId)
105 throws com.liferay.portal.kernel.exception.PortalException,
106 com.liferay.portal.kernel.exception.SystemException {
107 try {
108 MethodKey methodKey = new MethodKey(JournalStructureServiceUtil.class,
109 "copyStructure", _copyStructureParameterTypes1);
110
111 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
112 oldStructureId, newStructureId, autoStructureId);
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.journal.model.JournalStructure)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 groupId, java.lang.String structureId)
142 throws com.liferay.portal.kernel.exception.PortalException,
143 com.liferay.portal.kernel.exception.SystemException {
144 try {
145 MethodKey methodKey = new MethodKey(JournalStructureServiceUtil.class,
146 "deleteStructure", _deleteStructureParameterTypes2);
147
148 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
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.journal.model.JournalStructure getStructure(
174 HttpPrincipal httpPrincipal, long groupId, java.lang.String structureId)
175 throws com.liferay.portal.kernel.exception.PortalException,
176 com.liferay.portal.kernel.exception.SystemException {
177 try {
178 MethodKey methodKey = new MethodKey(JournalStructureServiceUtil.class,
179 "getStructure", _getStructureParameterTypes3);
180
181 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
182 structureId);
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.journal.model.JournalStructure)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.journal.model.JournalStructure getStructure(
211 HttpPrincipal httpPrincipal, long groupId,
212 java.lang.String structureId, boolean includeGlobalStructures)
213 throws com.liferay.portal.kernel.exception.PortalException,
214 com.liferay.portal.kernel.exception.SystemException {
215 try {
216 MethodKey methodKey = new MethodKey(JournalStructureServiceUtil.class,
217 "getStructure", _getStructureParameterTypes4);
218
219 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
220 structureId, includeGlobalStructures);
221
222 Object returnObj = null;
223
224 try {
225 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
226 }
227 catch (Exception e) {
228 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
229 throw (com.liferay.portal.kernel.exception.PortalException)e;
230 }
231
232 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
233 throw (com.liferay.portal.kernel.exception.SystemException)e;
234 }
235
236 throw new com.liferay.portal.kernel.exception.SystemException(e);
237 }
238
239 return (com.liferay.portlet.journal.model.JournalStructure)returnObj;
240 }
241 catch (com.liferay.portal.kernel.exception.SystemException se) {
242 _log.error(se, se);
243
244 throw se;
245 }
246 }
247
248 public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> getStructures(
249 HttpPrincipal httpPrincipal, long groupId)
250 throws com.liferay.portal.kernel.exception.SystemException {
251 try {
252 MethodKey methodKey = new MethodKey(JournalStructureServiceUtil.class,
253 "getStructures", _getStructuresParameterTypes5);
254
255 MethodHandler methodHandler = new MethodHandler(methodKey, groupId);
256
257 Object returnObj = null;
258
259 try {
260 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
261 }
262 catch (Exception e) {
263 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
264 throw (com.liferay.portal.kernel.exception.SystemException)e;
265 }
266
267 throw new com.liferay.portal.kernel.exception.SystemException(e);
268 }
269
270 return (java.util.List<com.liferay.portlet.journal.model.JournalStructure>)returnObj;
271 }
272 catch (com.liferay.portal.kernel.exception.SystemException se) {
273 _log.error(se, se);
274
275 throw se;
276 }
277 }
278
279 public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> getStructures(
280 HttpPrincipal httpPrincipal, long[] groupIds)
281 throws com.liferay.portal.kernel.exception.SystemException {
282 try {
283 MethodKey methodKey = new MethodKey(JournalStructureServiceUtil.class,
284 "getStructures", _getStructuresParameterTypes6);
285
286 MethodHandler methodHandler = new MethodHandler(methodKey, groupIds);
287
288 Object returnObj = null;
289
290 try {
291 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
292 }
293 catch (Exception e) {
294 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
295 throw (com.liferay.portal.kernel.exception.SystemException)e;
296 }
297
298 throw new com.liferay.portal.kernel.exception.SystemException(e);
299 }
300
301 return (java.util.List<com.liferay.portlet.journal.model.JournalStructure>)returnObj;
302 }
303 catch (com.liferay.portal.kernel.exception.SystemException se) {
304 _log.error(se, se);
305
306 throw se;
307 }
308 }
309
310 public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> search(
311 HttpPrincipal httpPrincipal, long companyId, long[] groupIds,
312 java.lang.String keywords, int start, int end,
313 com.liferay.portal.kernel.util.OrderByComparator obc)
314 throws com.liferay.portal.kernel.exception.SystemException {
315 try {
316 MethodKey methodKey = new MethodKey(JournalStructureServiceUtil.class,
317 "search", _searchParameterTypes7);
318
319 MethodHandler methodHandler = new MethodHandler(methodKey,
320 companyId, groupIds, keywords, start, end, obc);
321
322 Object returnObj = null;
323
324 try {
325 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
326 }
327 catch (Exception e) {
328 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
329 throw (com.liferay.portal.kernel.exception.SystemException)e;
330 }
331
332 throw new com.liferay.portal.kernel.exception.SystemException(e);
333 }
334
335 return (java.util.List<com.liferay.portlet.journal.model.JournalStructure>)returnObj;
336 }
337 catch (com.liferay.portal.kernel.exception.SystemException se) {
338 _log.error(se, se);
339
340 throw se;
341 }
342 }
343
344 public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> search(
345 HttpPrincipal httpPrincipal, long companyId, long[] groupIds,
346 java.lang.String structureId, java.lang.String name,
347 java.lang.String description, boolean andOperator, int start, int end,
348 com.liferay.portal.kernel.util.OrderByComparator obc)
349 throws com.liferay.portal.kernel.exception.SystemException {
350 try {
351 MethodKey methodKey = new MethodKey(JournalStructureServiceUtil.class,
352 "search", _searchParameterTypes8);
353
354 MethodHandler methodHandler = new MethodHandler(methodKey,
355 companyId, groupIds, structureId, name, description,
356 andOperator, start, end, obc);
357
358 Object returnObj = null;
359
360 try {
361 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
362 }
363 catch (Exception e) {
364 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
365 throw (com.liferay.portal.kernel.exception.SystemException)e;
366 }
367
368 throw new com.liferay.portal.kernel.exception.SystemException(e);
369 }
370
371 return (java.util.List<com.liferay.portlet.journal.model.JournalStructure>)returnObj;
372 }
373 catch (com.liferay.portal.kernel.exception.SystemException se) {
374 _log.error(se, se);
375
376 throw se;
377 }
378 }
379
380 public static int searchCount(HttpPrincipal httpPrincipal, long companyId,
381 long[] groupIds, java.lang.String keywords)
382 throws com.liferay.portal.kernel.exception.SystemException {
383 try {
384 MethodKey methodKey = new MethodKey(JournalStructureServiceUtil.class,
385 "searchCount", _searchCountParameterTypes9);
386
387 MethodHandler methodHandler = new MethodHandler(methodKey,
388 companyId, groupIds, keywords);
389
390 Object returnObj = null;
391
392 try {
393 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
394 }
395 catch (Exception e) {
396 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
397 throw (com.liferay.portal.kernel.exception.SystemException)e;
398 }
399
400 throw new com.liferay.portal.kernel.exception.SystemException(e);
401 }
402
403 return ((Integer)returnObj).intValue();
404 }
405 catch (com.liferay.portal.kernel.exception.SystemException se) {
406 _log.error(se, se);
407
408 throw se;
409 }
410 }
411
412 public static int searchCount(HttpPrincipal httpPrincipal, long companyId,
413 long[] groupIds, java.lang.String structureId, java.lang.String name,
414 java.lang.String description, boolean andOperator)
415 throws com.liferay.portal.kernel.exception.SystemException {
416 try {
417 MethodKey methodKey = new MethodKey(JournalStructureServiceUtil.class,
418 "searchCount", _searchCountParameterTypes10);
419
420 MethodHandler methodHandler = new MethodHandler(methodKey,
421 companyId, groupIds, structureId, name, description,
422 andOperator);
423
424 Object returnObj = null;
425
426 try {
427 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
428 }
429 catch (Exception e) {
430 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
431 throw (com.liferay.portal.kernel.exception.SystemException)e;
432 }
433
434 throw new com.liferay.portal.kernel.exception.SystemException(e);
435 }
436
437 return ((Integer)returnObj).intValue();
438 }
439 catch (com.liferay.portal.kernel.exception.SystemException se) {
440 _log.error(se, se);
441
442 throw se;
443 }
444 }
445
446 public static com.liferay.portlet.journal.model.JournalStructure updateStructure(
447 HttpPrincipal httpPrincipal, long groupId,
448 java.lang.String structureId, java.lang.String parentStructureId,
449 java.util.Map<java.util.Locale, java.lang.String> nameMap,
450 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
451 java.lang.String xsd,
452 com.liferay.portal.service.ServiceContext serviceContext)
453 throws com.liferay.portal.kernel.exception.PortalException,
454 com.liferay.portal.kernel.exception.SystemException {
455 try {
456 MethodKey methodKey = new MethodKey(JournalStructureServiceUtil.class,
457 "updateStructure", _updateStructureParameterTypes11);
458
459 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
460 structureId, parentStructureId, nameMap, descriptionMap,
461 xsd, serviceContext);
462
463 Object returnObj = null;
464
465 try {
466 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
467 }
468 catch (Exception e) {
469 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
470 throw (com.liferay.portal.kernel.exception.PortalException)e;
471 }
472
473 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
474 throw (com.liferay.portal.kernel.exception.SystemException)e;
475 }
476
477 throw new com.liferay.portal.kernel.exception.SystemException(e);
478 }
479
480 return (com.liferay.portlet.journal.model.JournalStructure)returnObj;
481 }
482 catch (com.liferay.portal.kernel.exception.SystemException se) {
483 _log.error(se, se);
484
485 throw se;
486 }
487 }
488
489 private static Log _log = LogFactoryUtil.getLog(JournalStructureServiceHttp.class);
490 private static final Class<?>[] _addStructureParameterTypes0 = new Class[] {
491 long.class, java.lang.String.class, boolean.class,
492 java.lang.String.class, java.util.Map.class, java.util.Map.class,
493 java.lang.String.class,
494 com.liferay.portal.service.ServiceContext.class
495 };
496 private static final Class<?>[] _copyStructureParameterTypes1 = new Class[] {
497 long.class, java.lang.String.class, java.lang.String.class,
498 boolean.class
499 };
500 private static final Class<?>[] _deleteStructureParameterTypes2 = new Class[] {
501 long.class, java.lang.String.class
502 };
503 private static final Class<?>[] _getStructureParameterTypes3 = new Class[] {
504 long.class, java.lang.String.class
505 };
506 private static final Class<?>[] _getStructureParameterTypes4 = new Class[] {
507 long.class, java.lang.String.class, boolean.class
508 };
509 private static final Class<?>[] _getStructuresParameterTypes5 = new Class[] {
510 long.class
511 };
512 private static final Class<?>[] _getStructuresParameterTypes6 = new Class[] {
513 long[].class
514 };
515 private static final Class<?>[] _searchParameterTypes7 = new Class[] {
516 long.class, long[].class, java.lang.String.class, int.class,
517 int.class, com.liferay.portal.kernel.util.OrderByComparator.class
518 };
519 private static final Class<?>[] _searchParameterTypes8 = new Class[] {
520 long.class, long[].class, java.lang.String.class,
521 java.lang.String.class, java.lang.String.class, boolean.class,
522 int.class, int.class,
523 com.liferay.portal.kernel.util.OrderByComparator.class
524 };
525 private static final Class<?>[] _searchCountParameterTypes9 = new Class[] {
526 long.class, long[].class, java.lang.String.class
527 };
528 private static final Class<?>[] _searchCountParameterTypes10 = new Class[] {
529 long.class, long[].class, java.lang.String.class,
530 java.lang.String.class, java.lang.String.class, boolean.class
531 };
532 private static final Class<?>[] _updateStructureParameterTypes11 = new Class[] {
533 long.class, java.lang.String.class, java.lang.String.class,
534 java.util.Map.class, java.util.Map.class, java.lang.String.class,
535 com.liferay.portal.service.ServiceContext.class
536 };
537 }