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