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.getName(),
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.getName(),
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.getName(),
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.getName(),
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.getName(),
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.getName(),
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> search(
280 HttpPrincipal httpPrincipal, long companyId, long[] groupIds,
281 java.lang.String keywords, int start, int end,
282 com.liferay.portal.kernel.util.OrderByComparator obc)
283 throws com.liferay.portal.kernel.exception.SystemException {
284 try {
285 MethodKey methodKey = new MethodKey(JournalStructureServiceUtil.class.getName(),
286 "search", _searchParameterTypes6);
287
288 MethodHandler methodHandler = new MethodHandler(methodKey,
289 companyId, groupIds, keywords, start, end, obc);
290
291 Object returnObj = null;
292
293 try {
294 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
295 }
296 catch (Exception e) {
297 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
298 throw (com.liferay.portal.kernel.exception.SystemException)e;
299 }
300
301 throw new com.liferay.portal.kernel.exception.SystemException(e);
302 }
303
304 return (java.util.List<com.liferay.portlet.journal.model.JournalStructure>)returnObj;
305 }
306 catch (com.liferay.portal.kernel.exception.SystemException se) {
307 _log.error(se, se);
308
309 throw se;
310 }
311 }
312
313 public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> search(
314 HttpPrincipal httpPrincipal, long companyId, long[] groupIds,
315 java.lang.String structureId, java.lang.String name,
316 java.lang.String description, boolean andOperator, int start, int end,
317 com.liferay.portal.kernel.util.OrderByComparator obc)
318 throws com.liferay.portal.kernel.exception.SystemException {
319 try {
320 MethodKey methodKey = new MethodKey(JournalStructureServiceUtil.class.getName(),
321 "search", _searchParameterTypes7);
322
323 MethodHandler methodHandler = new MethodHandler(methodKey,
324 companyId, groupIds, structureId, name, description,
325 andOperator, start, end, obc);
326
327 Object returnObj = null;
328
329 try {
330 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
331 }
332 catch (Exception e) {
333 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
334 throw (com.liferay.portal.kernel.exception.SystemException)e;
335 }
336
337 throw new com.liferay.portal.kernel.exception.SystemException(e);
338 }
339
340 return (java.util.List<com.liferay.portlet.journal.model.JournalStructure>)returnObj;
341 }
342 catch (com.liferay.portal.kernel.exception.SystemException se) {
343 _log.error(se, se);
344
345 throw se;
346 }
347 }
348
349 public static int searchCount(HttpPrincipal httpPrincipal, long companyId,
350 long[] groupIds, java.lang.String keywords)
351 throws com.liferay.portal.kernel.exception.SystemException {
352 try {
353 MethodKey methodKey = new MethodKey(JournalStructureServiceUtil.class.getName(),
354 "searchCount", _searchCountParameterTypes8);
355
356 MethodHandler methodHandler = new MethodHandler(methodKey,
357 companyId, groupIds, keywords);
358
359 Object returnObj = null;
360
361 try {
362 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
363 }
364 catch (Exception e) {
365 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
366 throw (com.liferay.portal.kernel.exception.SystemException)e;
367 }
368
369 throw new com.liferay.portal.kernel.exception.SystemException(e);
370 }
371
372 return ((Integer)returnObj).intValue();
373 }
374 catch (com.liferay.portal.kernel.exception.SystemException se) {
375 _log.error(se, se);
376
377 throw se;
378 }
379 }
380
381 public static int searchCount(HttpPrincipal httpPrincipal, long companyId,
382 long[] groupIds, java.lang.String structureId, java.lang.String name,
383 java.lang.String description, boolean andOperator)
384 throws com.liferay.portal.kernel.exception.SystemException {
385 try {
386 MethodKey methodKey = new MethodKey(JournalStructureServiceUtil.class.getName(),
387 "searchCount", _searchCountParameterTypes9);
388
389 MethodHandler methodHandler = new MethodHandler(methodKey,
390 companyId, groupIds, structureId, name, description,
391 andOperator);
392
393 Object returnObj = null;
394
395 try {
396 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
397 }
398 catch (Exception e) {
399 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
400 throw (com.liferay.portal.kernel.exception.SystemException)e;
401 }
402
403 throw new com.liferay.portal.kernel.exception.SystemException(e);
404 }
405
406 return ((Integer)returnObj).intValue();
407 }
408 catch (com.liferay.portal.kernel.exception.SystemException se) {
409 _log.error(se, se);
410
411 throw se;
412 }
413 }
414
415 public static com.liferay.portlet.journal.model.JournalStructure updateStructure(
416 HttpPrincipal httpPrincipal, long groupId,
417 java.lang.String structureId, java.lang.String parentStructureId,
418 java.util.Map<java.util.Locale, java.lang.String> nameMap,
419 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
420 java.lang.String xsd,
421 com.liferay.portal.service.ServiceContext serviceContext)
422 throws com.liferay.portal.kernel.exception.PortalException,
423 com.liferay.portal.kernel.exception.SystemException {
424 try {
425 MethodKey methodKey = new MethodKey(JournalStructureServiceUtil.class.getName(),
426 "updateStructure", _updateStructureParameterTypes10);
427
428 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
429 structureId, parentStructureId, nameMap, descriptionMap,
430 xsd, serviceContext);
431
432 Object returnObj = null;
433
434 try {
435 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
436 }
437 catch (Exception e) {
438 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
439 throw (com.liferay.portal.kernel.exception.PortalException)e;
440 }
441
442 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
443 throw (com.liferay.portal.kernel.exception.SystemException)e;
444 }
445
446 throw new com.liferay.portal.kernel.exception.SystemException(e);
447 }
448
449 return (com.liferay.portlet.journal.model.JournalStructure)returnObj;
450 }
451 catch (com.liferay.portal.kernel.exception.SystemException se) {
452 _log.error(se, se);
453
454 throw se;
455 }
456 }
457
458 private static Log _log = LogFactoryUtil.getLog(JournalStructureServiceHttp.class);
459 private static final Class<?>[] _addStructureParameterTypes0 = new Class[] {
460 long.class, java.lang.String.class, boolean.class,
461 java.lang.String.class, java.util.Map.class, java.util.Map.class,
462 java.lang.String.class,
463 com.liferay.portal.service.ServiceContext.class
464 };
465 private static final Class<?>[] _copyStructureParameterTypes1 = new Class[] {
466 long.class, java.lang.String.class, java.lang.String.class,
467 boolean.class
468 };
469 private static final Class<?>[] _deleteStructureParameterTypes2 = new Class[] {
470 long.class, java.lang.String.class
471 };
472 private static final Class<?>[] _getStructureParameterTypes3 = new Class[] {
473 long.class, java.lang.String.class
474 };
475 private static final Class<?>[] _getStructureParameterTypes4 = new Class[] {
476 long.class, java.lang.String.class, boolean.class
477 };
478 private static final Class<?>[] _getStructuresParameterTypes5 = new Class[] {
479 long.class
480 };
481 private static final Class<?>[] _searchParameterTypes6 = new Class[] {
482 long.class, long[].class, java.lang.String.class, int.class,
483 int.class, com.liferay.portal.kernel.util.OrderByComparator.class
484 };
485 private static final Class<?>[] _searchParameterTypes7 = new Class[] {
486 long.class, long[].class, java.lang.String.class,
487 java.lang.String.class, java.lang.String.class, boolean.class,
488 int.class, int.class,
489 com.liferay.portal.kernel.util.OrderByComparator.class
490 };
491 private static final Class<?>[] _searchCountParameterTypes8 = new Class[] {
492 long.class, long[].class, java.lang.String.class
493 };
494 private static final Class<?>[] _searchCountParameterTypes9 = new Class[] {
495 long.class, long[].class, java.lang.String.class,
496 java.lang.String.class, java.lang.String.class, boolean.class
497 };
498 private static final Class<?>[] _updateStructureParameterTypes10 = new Class[] {
499 long.class, java.lang.String.class, java.lang.String.class,
500 java.util.Map.class, java.util.Map.class, java.lang.String.class,
501 com.liferay.portal.service.ServiceContext.class
502 };
503 }