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