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