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