001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.documentlibrary.service.http;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.document.library.kernel.service.DLFileEntryServiceUtil;
020    
021    import com.liferay.portal.kernel.log.Log;
022    import com.liferay.portal.kernel.log.LogFactoryUtil;
023    import com.liferay.portal.kernel.security.auth.HttpPrincipal;
024    import com.liferay.portal.kernel.service.http.TunnelUtil;
025    import com.liferay.portal.kernel.util.MethodHandler;
026    import com.liferay.portal.kernel.util.MethodKey;
027    
028    /**
029     * Provides the HTTP utility for the
030     * {@link DLFileEntryServiceUtil} service utility. The
031     * static methods of this class calls the same methods of the service utility.
032     * However, the signatures are different because it requires an additional
033     * {@link HttpPrincipal} parameter.
034     *
035     * <p>
036     * The benefits of using the HTTP utility is that it is fast and allows for
037     * tunneling without the cost of serializing to text. The drawback is that it
038     * only works with Java.
039     * </p>
040     *
041     * <p>
042     * Set the property <b>tunnel.servlet.hosts.allowed</b> in portal.properties to
043     * configure security.
044     * </p>
045     *
046     * <p>
047     * The HTTP utility is only generated for remote services.
048     * </p>
049     *
050     * @author Brian Wing Shun Chan
051     * @see DLFileEntryServiceSoap
052     * @see HttpPrincipal
053     * @see DLFileEntryServiceUtil
054     * @generated
055     */
056    @ProviderType
057    public class DLFileEntryServiceHttp {
058            public static com.liferay.document.library.kernel.model.DLFileEntry addFileEntry(
059                    HttpPrincipal httpPrincipal, long groupId, long repositoryId,
060                    long folderId, java.lang.String sourceFileName,
061                    java.lang.String mimeType, java.lang.String title,
062                    java.lang.String description, java.lang.String changeLog,
063                    long fileEntryTypeId,
064                    java.util.Map<java.lang.String, com.liferay.dynamic.data.mapping.kernel.DDMFormValues> ddmFormValuesMap,
065                    java.io.File file, java.io.InputStream is, long size,
066                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
067                    throws com.liferay.portal.kernel.exception.PortalException {
068                    try {
069                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
070                                            "addFileEntry", _addFileEntryParameterTypes0);
071    
072                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
073                                            repositoryId, folderId, sourceFileName, mimeType, title,
074                                            description, changeLog, fileEntryTypeId, ddmFormValuesMap,
075                                            file, is, size, serviceContext);
076    
077                            Object returnObj = null;
078    
079                            try {
080                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
081                            }
082                            catch (Exception e) {
083                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
084                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
085                                    }
086    
087                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
088                            }
089    
090                            return (com.liferay.document.library.kernel.model.DLFileEntry)returnObj;
091                    }
092                    catch (com.liferay.portal.kernel.exception.SystemException se) {
093                            _log.error(se, se);
094    
095                            throw se;
096                    }
097            }
098    
099            public static com.liferay.document.library.kernel.model.DLFileVersion cancelCheckOut(
100                    HttpPrincipal httpPrincipal, long fileEntryId)
101                    throws com.liferay.portal.kernel.exception.PortalException {
102                    try {
103                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
104                                            "cancelCheckOut", _cancelCheckOutParameterTypes1);
105    
106                            MethodHandler methodHandler = new MethodHandler(methodKey,
107                                            fileEntryId);
108    
109                            Object returnObj = null;
110    
111                            try {
112                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
113                            }
114                            catch (Exception e) {
115                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
116                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
117                                    }
118    
119                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
120                            }
121    
122                            return (com.liferay.document.library.kernel.model.DLFileVersion)returnObj;
123                    }
124                    catch (com.liferay.portal.kernel.exception.SystemException se) {
125                            _log.error(se, se);
126    
127                            throw se;
128                    }
129            }
130    
131            public static void checkInFileEntry(HttpPrincipal httpPrincipal,
132                    long fileEntryId, boolean major, java.lang.String changeLog,
133                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
134                    throws com.liferay.portal.kernel.exception.PortalException {
135                    try {
136                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
137                                            "checkInFileEntry", _checkInFileEntryParameterTypes2);
138    
139                            MethodHandler methodHandler = new MethodHandler(methodKey,
140                                            fileEntryId, major, changeLog, serviceContext);
141    
142                            try {
143                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
144                            }
145                            catch (Exception e) {
146                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
147                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
148                                    }
149    
150                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
151                            }
152                    }
153                    catch (com.liferay.portal.kernel.exception.SystemException se) {
154                            _log.error(se, se);
155    
156                            throw se;
157                    }
158            }
159    
160            public static void checkInFileEntry(HttpPrincipal httpPrincipal,
161                    long fileEntryId, java.lang.String lockUuid,
162                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
163                    throws com.liferay.portal.kernel.exception.PortalException {
164                    try {
165                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
166                                            "checkInFileEntry", _checkInFileEntryParameterTypes3);
167    
168                            MethodHandler methodHandler = new MethodHandler(methodKey,
169                                            fileEntryId, lockUuid, serviceContext);
170    
171                            try {
172                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
173                            }
174                            catch (Exception e) {
175                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
176                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
177                                    }
178    
179                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
180                            }
181                    }
182                    catch (com.liferay.portal.kernel.exception.SystemException se) {
183                            _log.error(se, se);
184    
185                            throw se;
186                    }
187            }
188    
189            public static com.liferay.document.library.kernel.model.DLFileEntry checkOutFileEntry(
190                    HttpPrincipal httpPrincipal, long fileEntryId,
191                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
192                    throws com.liferay.portal.kernel.exception.PortalException {
193                    try {
194                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
195                                            "checkOutFileEntry", _checkOutFileEntryParameterTypes4);
196    
197                            MethodHandler methodHandler = new MethodHandler(methodKey,
198                                            fileEntryId, serviceContext);
199    
200                            Object returnObj = null;
201    
202                            try {
203                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
204                            }
205                            catch (Exception e) {
206                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
207                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
208                                    }
209    
210                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
211                            }
212    
213                            return (com.liferay.document.library.kernel.model.DLFileEntry)returnObj;
214                    }
215                    catch (com.liferay.portal.kernel.exception.SystemException se) {
216                            _log.error(se, se);
217    
218                            throw se;
219                    }
220            }
221    
222            public static com.liferay.document.library.kernel.model.DLFileEntry checkOutFileEntry(
223                    HttpPrincipal httpPrincipal, long fileEntryId, java.lang.String owner,
224                    long expirationTime,
225                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
226                    throws com.liferay.portal.kernel.exception.PortalException {
227                    try {
228                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
229                                            "checkOutFileEntry", _checkOutFileEntryParameterTypes5);
230    
231                            MethodHandler methodHandler = new MethodHandler(methodKey,
232                                            fileEntryId, owner, expirationTime, serviceContext);
233    
234                            Object returnObj = null;
235    
236                            try {
237                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
238                            }
239                            catch (Exception e) {
240                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
241                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
242                                    }
243    
244                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
245                            }
246    
247                            return (com.liferay.document.library.kernel.model.DLFileEntry)returnObj;
248                    }
249                    catch (com.liferay.portal.kernel.exception.SystemException se) {
250                            _log.error(se, se);
251    
252                            throw se;
253                    }
254            }
255    
256            public static com.liferay.document.library.kernel.model.DLFileEntry copyFileEntry(
257                    HttpPrincipal httpPrincipal, long groupId, long repositoryId,
258                    long fileEntryId, long destFolderId,
259                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
260                    throws com.liferay.portal.kernel.exception.PortalException {
261                    try {
262                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
263                                            "copyFileEntry", _copyFileEntryParameterTypes6);
264    
265                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
266                                            repositoryId, fileEntryId, destFolderId, serviceContext);
267    
268                            Object returnObj = null;
269    
270                            try {
271                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
272                            }
273                            catch (Exception e) {
274                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
275                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
276                                    }
277    
278                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
279                            }
280    
281                            return (com.liferay.document.library.kernel.model.DLFileEntry)returnObj;
282                    }
283                    catch (com.liferay.portal.kernel.exception.SystemException se) {
284                            _log.error(se, se);
285    
286                            throw se;
287                    }
288            }
289    
290            public static void deleteFileEntry(HttpPrincipal httpPrincipal,
291                    long fileEntryId)
292                    throws com.liferay.portal.kernel.exception.PortalException {
293                    try {
294                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
295                                            "deleteFileEntry", _deleteFileEntryParameterTypes7);
296    
297                            MethodHandler methodHandler = new MethodHandler(methodKey,
298                                            fileEntryId);
299    
300                            try {
301                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
302                            }
303                            catch (Exception e) {
304                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
305                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
306                                    }
307    
308                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
309                            }
310                    }
311                    catch (com.liferay.portal.kernel.exception.SystemException se) {
312                            _log.error(se, se);
313    
314                            throw se;
315                    }
316            }
317    
318            public static void deleteFileEntry(HttpPrincipal httpPrincipal,
319                    long groupId, long folderId, java.lang.String title)
320                    throws com.liferay.portal.kernel.exception.PortalException {
321                    try {
322                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
323                                            "deleteFileEntry", _deleteFileEntryParameterTypes8);
324    
325                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
326                                            folderId, title);
327    
328                            try {
329                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
330                            }
331                            catch (Exception e) {
332                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
333                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
334                                    }
335    
336                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
337                            }
338                    }
339                    catch (com.liferay.portal.kernel.exception.SystemException se) {
340                            _log.error(se, se);
341    
342                            throw se;
343                    }
344            }
345    
346            public static void deleteFileVersion(HttpPrincipal httpPrincipal,
347                    long fileEntryId, java.lang.String version)
348                    throws com.liferay.portal.kernel.exception.PortalException {
349                    try {
350                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
351                                            "deleteFileVersion", _deleteFileVersionParameterTypes9);
352    
353                            MethodHandler methodHandler = new MethodHandler(methodKey,
354                                            fileEntryId, version);
355    
356                            try {
357                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
358                            }
359                            catch (Exception e) {
360                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
361                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
362                                    }
363    
364                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
365                            }
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 com.liferay.document.library.kernel.model.DLFileEntry fetchFileEntryByImageId(
375                    HttpPrincipal httpPrincipal, long imageId)
376                    throws com.liferay.portal.kernel.exception.PortalException {
377                    try {
378                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
379                                            "fetchFileEntryByImageId",
380                                            _fetchFileEntryByImageIdParameterTypes10);
381    
382                            MethodHandler methodHandler = new MethodHandler(methodKey, imageId);
383    
384                            Object returnObj = null;
385    
386                            try {
387                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
388                            }
389                            catch (Exception e) {
390                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
391                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
392                                    }
393    
394                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
395                            }
396    
397                            return (com.liferay.document.library.kernel.model.DLFileEntry)returnObj;
398                    }
399                    catch (com.liferay.portal.kernel.exception.SystemException se) {
400                            _log.error(se, se);
401    
402                            throw se;
403                    }
404            }
405    
406            public static java.io.InputStream getFileAsStream(
407                    HttpPrincipal httpPrincipal, long fileEntryId, java.lang.String version)
408                    throws com.liferay.portal.kernel.exception.PortalException {
409                    try {
410                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
411                                            "getFileAsStream", _getFileAsStreamParameterTypes11);
412    
413                            MethodHandler methodHandler = new MethodHandler(methodKey,
414                                            fileEntryId, version);
415    
416                            Object returnObj = null;
417    
418                            try {
419                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
420                            }
421                            catch (Exception e) {
422                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
423                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
424                                    }
425    
426                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
427                            }
428    
429                            return (java.io.InputStream)returnObj;
430                    }
431                    catch (com.liferay.portal.kernel.exception.SystemException se) {
432                            _log.error(se, se);
433    
434                            throw se;
435                    }
436            }
437    
438            public static java.io.InputStream getFileAsStream(
439                    HttpPrincipal httpPrincipal, long fileEntryId,
440                    java.lang.String version, boolean incrementCounter)
441                    throws com.liferay.portal.kernel.exception.PortalException {
442                    try {
443                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
444                                            "getFileAsStream", _getFileAsStreamParameterTypes12);
445    
446                            MethodHandler methodHandler = new MethodHandler(methodKey,
447                                            fileEntryId, version, incrementCounter);
448    
449                            Object returnObj = null;
450    
451                            try {
452                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
453                            }
454                            catch (Exception e) {
455                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
456                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
457                                    }
458    
459                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
460                            }
461    
462                            return (java.io.InputStream)returnObj;
463                    }
464                    catch (com.liferay.portal.kernel.exception.SystemException se) {
465                            _log.error(se, se);
466    
467                            throw se;
468                    }
469            }
470    
471            public static java.util.List<com.liferay.document.library.kernel.model.DLFileEntry> getFileEntries(
472                    HttpPrincipal httpPrincipal, long groupId, long folderId, int status,
473                    int start, int end,
474                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> obc)
475                    throws com.liferay.portal.kernel.exception.PortalException {
476                    try {
477                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
478                                            "getFileEntries", _getFileEntriesParameterTypes13);
479    
480                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
481                                            folderId, status, start, end, obc);
482    
483                            Object returnObj = null;
484    
485                            try {
486                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
487                            }
488                            catch (Exception e) {
489                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
490                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
491                                    }
492    
493                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
494                            }
495    
496                            return (java.util.List<com.liferay.document.library.kernel.model.DLFileEntry>)returnObj;
497                    }
498                    catch (com.liferay.portal.kernel.exception.SystemException se) {
499                            _log.error(se, se);
500    
501                            throw se;
502                    }
503            }
504    
505            public static java.util.List<com.liferay.document.library.kernel.model.DLFileEntry> getFileEntries(
506                    HttpPrincipal httpPrincipal, long groupId, long folderId, int start,
507                    int end,
508                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> obc)
509                    throws com.liferay.portal.kernel.exception.PortalException {
510                    try {
511                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
512                                            "getFileEntries", _getFileEntriesParameterTypes14);
513    
514                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
515                                            folderId, start, end, obc);
516    
517                            Object returnObj = null;
518    
519                            try {
520                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
521                            }
522                            catch (Exception e) {
523                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
524                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
525                                    }
526    
527                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
528                            }
529    
530                            return (java.util.List<com.liferay.document.library.kernel.model.DLFileEntry>)returnObj;
531                    }
532                    catch (com.liferay.portal.kernel.exception.SystemException se) {
533                            _log.error(se, se);
534    
535                            throw se;
536                    }
537            }
538    
539            public static java.util.List<com.liferay.document.library.kernel.model.DLFileEntry> getFileEntries(
540                    HttpPrincipal httpPrincipal, long groupId, long folderId,
541                    long fileEntryTypeId, int start, int end,
542                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> obc)
543                    throws com.liferay.portal.kernel.exception.PortalException {
544                    try {
545                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
546                                            "getFileEntries", _getFileEntriesParameterTypes15);
547    
548                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
549                                            folderId, fileEntryTypeId, start, end, obc);
550    
551                            Object returnObj = null;
552    
553                            try {
554                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
555                            }
556                            catch (Exception e) {
557                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
558                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
559                                    }
560    
561                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
562                            }
563    
564                            return (java.util.List<com.liferay.document.library.kernel.model.DLFileEntry>)returnObj;
565                    }
566                    catch (com.liferay.portal.kernel.exception.SystemException se) {
567                            _log.error(se, se);
568    
569                            throw se;
570                    }
571            }
572    
573            public static java.util.List<com.liferay.document.library.kernel.model.DLFileEntry> getFileEntries(
574                    HttpPrincipal httpPrincipal, long groupId, long folderId,
575                    java.lang.String[] mimeTypes, int start, int end,
576                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> obc)
577                    throws com.liferay.portal.kernel.exception.PortalException {
578                    try {
579                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
580                                            "getFileEntries", _getFileEntriesParameterTypes16);
581    
582                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
583                                            folderId, mimeTypes, start, end, obc);
584    
585                            Object returnObj = null;
586    
587                            try {
588                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
589                            }
590                            catch (Exception e) {
591                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
592                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
593                                    }
594    
595                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
596                            }
597    
598                            return (java.util.List<com.liferay.document.library.kernel.model.DLFileEntry>)returnObj;
599                    }
600                    catch (com.liferay.portal.kernel.exception.SystemException se) {
601                            _log.error(se, se);
602    
603                            throw se;
604                    }
605            }
606    
607            public static int getFileEntriesCount(HttpPrincipal httpPrincipal,
608                    long groupId, long folderId) {
609                    try {
610                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
611                                            "getFileEntriesCount", _getFileEntriesCountParameterTypes17);
612    
613                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
614                                            folderId);
615    
616                            Object returnObj = null;
617    
618                            try {
619                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
620                            }
621                            catch (Exception e) {
622                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
623                            }
624    
625                            return ((Integer)returnObj).intValue();
626                    }
627                    catch (com.liferay.portal.kernel.exception.SystemException se) {
628                            _log.error(se, se);
629    
630                            throw se;
631                    }
632            }
633    
634            public static int getFileEntriesCount(HttpPrincipal httpPrincipal,
635                    long groupId, long folderId, int status) {
636                    try {
637                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
638                                            "getFileEntriesCount", _getFileEntriesCountParameterTypes18);
639    
640                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
641                                            folderId, status);
642    
643                            Object returnObj = null;
644    
645                            try {
646                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
647                            }
648                            catch (Exception e) {
649                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
650                            }
651    
652                            return ((Integer)returnObj).intValue();
653                    }
654                    catch (com.liferay.portal.kernel.exception.SystemException se) {
655                            _log.error(se, se);
656    
657                            throw se;
658                    }
659            }
660    
661            public static int getFileEntriesCount(HttpPrincipal httpPrincipal,
662                    long groupId, long folderId, long fileEntryTypeId) {
663                    try {
664                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
665                                            "getFileEntriesCount", _getFileEntriesCountParameterTypes19);
666    
667                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
668                                            folderId, fileEntryTypeId);
669    
670                            Object returnObj = null;
671    
672                            try {
673                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
674                            }
675                            catch (Exception e) {
676                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
677                            }
678    
679                            return ((Integer)returnObj).intValue();
680                    }
681                    catch (com.liferay.portal.kernel.exception.SystemException se) {
682                            _log.error(se, se);
683    
684                            throw se;
685                    }
686            }
687    
688            public static int getFileEntriesCount(HttpPrincipal httpPrincipal,
689                    long groupId, long folderId, java.lang.String[] mimeTypes) {
690                    try {
691                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
692                                            "getFileEntriesCount", _getFileEntriesCountParameterTypes20);
693    
694                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
695                                            folderId, mimeTypes);
696    
697                            Object returnObj = null;
698    
699                            try {
700                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
701                            }
702                            catch (Exception e) {
703                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
704                            }
705    
706                            return ((Integer)returnObj).intValue();
707                    }
708                    catch (com.liferay.portal.kernel.exception.SystemException se) {
709                            _log.error(se, se);
710    
711                            throw se;
712                    }
713            }
714    
715            public static com.liferay.document.library.kernel.model.DLFileEntry getFileEntry(
716                    HttpPrincipal httpPrincipal, long fileEntryId)
717                    throws com.liferay.portal.kernel.exception.PortalException {
718                    try {
719                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
720                                            "getFileEntry", _getFileEntryParameterTypes21);
721    
722                            MethodHandler methodHandler = new MethodHandler(methodKey,
723                                            fileEntryId);
724    
725                            Object returnObj = null;
726    
727                            try {
728                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
729                            }
730                            catch (Exception e) {
731                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
732                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
733                                    }
734    
735                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
736                            }
737    
738                            return (com.liferay.document.library.kernel.model.DLFileEntry)returnObj;
739                    }
740                    catch (com.liferay.portal.kernel.exception.SystemException se) {
741                            _log.error(se, se);
742    
743                            throw se;
744                    }
745            }
746    
747            public static com.liferay.document.library.kernel.model.DLFileEntry getFileEntry(
748                    HttpPrincipal httpPrincipal, long groupId, long folderId,
749                    java.lang.String title)
750                    throws com.liferay.portal.kernel.exception.PortalException {
751                    try {
752                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
753                                            "getFileEntry", _getFileEntryParameterTypes22);
754    
755                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
756                                            folderId, title);
757    
758                            Object returnObj = null;
759    
760                            try {
761                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
762                            }
763                            catch (Exception e) {
764                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
765                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
766                                    }
767    
768                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
769                            }
770    
771                            return (com.liferay.document.library.kernel.model.DLFileEntry)returnObj;
772                    }
773                    catch (com.liferay.portal.kernel.exception.SystemException se) {
774                            _log.error(se, se);
775    
776                            throw se;
777                    }
778            }
779    
780            public static com.liferay.document.library.kernel.model.DLFileEntry getFileEntryByUuidAndGroupId(
781                    HttpPrincipal httpPrincipal, java.lang.String uuid, long groupId)
782                    throws com.liferay.portal.kernel.exception.PortalException {
783                    try {
784                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
785                                            "getFileEntryByUuidAndGroupId",
786                                            _getFileEntryByUuidAndGroupIdParameterTypes23);
787    
788                            MethodHandler methodHandler = new MethodHandler(methodKey, uuid,
789                                            groupId);
790    
791                            Object returnObj = null;
792    
793                            try {
794                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
795                            }
796                            catch (Exception e) {
797                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
798                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
799                                    }
800    
801                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
802                            }
803    
804                            return (com.liferay.document.library.kernel.model.DLFileEntry)returnObj;
805                    }
806                    catch (com.liferay.portal.kernel.exception.SystemException se) {
807                            _log.error(se, se);
808    
809                            throw se;
810                    }
811            }
812    
813            public static com.liferay.portal.kernel.lock.Lock getFileEntryLock(
814                    HttpPrincipal httpPrincipal, long fileEntryId) {
815                    try {
816                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
817                                            "getFileEntryLock", _getFileEntryLockParameterTypes24);
818    
819                            MethodHandler methodHandler = new MethodHandler(methodKey,
820                                            fileEntryId);
821    
822                            Object returnObj = null;
823    
824                            try {
825                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
826                            }
827                            catch (Exception e) {
828                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
829                            }
830    
831                            return (com.liferay.portal.kernel.lock.Lock)returnObj;
832                    }
833                    catch (com.liferay.portal.kernel.exception.SystemException se) {
834                            _log.error(se, se);
835    
836                            throw se;
837                    }
838            }
839    
840            public static int getFoldersFileEntriesCount(HttpPrincipal httpPrincipal,
841                    long groupId, java.util.List<java.lang.Long> folderIds, int status) {
842                    try {
843                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
844                                            "getFoldersFileEntriesCount",
845                                            _getFoldersFileEntriesCountParameterTypes25);
846    
847                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
848                                            folderIds, status);
849    
850                            Object returnObj = null;
851    
852                            try {
853                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
854                            }
855                            catch (Exception e) {
856                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
857                            }
858    
859                            return ((Integer)returnObj).intValue();
860                    }
861                    catch (com.liferay.portal.kernel.exception.SystemException se) {
862                            _log.error(se, se);
863    
864                            throw se;
865                    }
866            }
867    
868            public static java.util.List<com.liferay.document.library.kernel.model.DLFileEntry> getGroupFileEntries(
869                    HttpPrincipal httpPrincipal, long groupId, long userId,
870                    long rootFolderId, int start, int end,
871                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> obc)
872                    throws com.liferay.portal.kernel.exception.PortalException {
873                    try {
874                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
875                                            "getGroupFileEntries", _getGroupFileEntriesParameterTypes26);
876    
877                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
878                                            userId, rootFolderId, start, end, obc);
879    
880                            Object returnObj = null;
881    
882                            try {
883                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
884                            }
885                            catch (Exception e) {
886                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
887                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
888                                    }
889    
890                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
891                            }
892    
893                            return (java.util.List<com.liferay.document.library.kernel.model.DLFileEntry>)returnObj;
894                    }
895                    catch (com.liferay.portal.kernel.exception.SystemException se) {
896                            _log.error(se, se);
897    
898                            throw se;
899                    }
900            }
901    
902            public static java.util.List<com.liferay.document.library.kernel.model.DLFileEntry> getGroupFileEntries(
903                    HttpPrincipal httpPrincipal, long groupId, long userId,
904                    long repositoryId, long rootFolderId, java.lang.String[] mimeTypes,
905                    int status, int start, int end,
906                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> obc)
907                    throws com.liferay.portal.kernel.exception.PortalException {
908                    try {
909                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
910                                            "getGroupFileEntries", _getGroupFileEntriesParameterTypes27);
911    
912                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
913                                            userId, repositoryId, rootFolderId, mimeTypes, status,
914                                            start, end, obc);
915    
916                            Object returnObj = null;
917    
918                            try {
919                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
920                            }
921                            catch (Exception e) {
922                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
923                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
924                                    }
925    
926                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
927                            }
928    
929                            return (java.util.List<com.liferay.document.library.kernel.model.DLFileEntry>)returnObj;
930                    }
931                    catch (com.liferay.portal.kernel.exception.SystemException se) {
932                            _log.error(se, se);
933    
934                            throw se;
935                    }
936            }
937    
938            public static java.util.List<com.liferay.document.library.kernel.model.DLFileEntry> getGroupFileEntries(
939                    HttpPrincipal httpPrincipal, long groupId, long userId,
940                    long rootFolderId, java.lang.String[] mimeTypes, int status, int start,
941                    int end,
942                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> obc)
943                    throws com.liferay.portal.kernel.exception.PortalException {
944                    try {
945                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
946                                            "getGroupFileEntries", _getGroupFileEntriesParameterTypes28);
947    
948                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
949                                            userId, rootFolderId, mimeTypes, status, start, end, obc);
950    
951                            Object returnObj = null;
952    
953                            try {
954                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
955                            }
956                            catch (Exception e) {
957                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
958                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
959                                    }
960    
961                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
962                            }
963    
964                            return (java.util.List<com.liferay.document.library.kernel.model.DLFileEntry>)returnObj;
965                    }
966                    catch (com.liferay.portal.kernel.exception.SystemException se) {
967                            _log.error(se, se);
968    
969                            throw se;
970                    }
971            }
972    
973            public static int getGroupFileEntriesCount(HttpPrincipal httpPrincipal,
974                    long groupId, long userId, long rootFolderId)
975                    throws com.liferay.portal.kernel.exception.PortalException {
976                    try {
977                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
978                                            "getGroupFileEntriesCount",
979                                            _getGroupFileEntriesCountParameterTypes29);
980    
981                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
982                                            userId, rootFolderId);
983    
984                            Object returnObj = null;
985    
986                            try {
987                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
988                            }
989                            catch (Exception e) {
990                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
991                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
992                                    }
993    
994                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
995                            }
996    
997                            return ((Integer)returnObj).intValue();
998                    }
999                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1000                            _log.error(se, se);
1001    
1002                            throw se;
1003                    }
1004            }
1005    
1006            public static int getGroupFileEntriesCount(HttpPrincipal httpPrincipal,
1007                    long groupId, long userId, long repositoryId, long rootFolderId,
1008                    java.lang.String[] mimeTypes, int status)
1009                    throws com.liferay.portal.kernel.exception.PortalException {
1010                    try {
1011                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
1012                                            "getGroupFileEntriesCount",
1013                                            _getGroupFileEntriesCountParameterTypes30);
1014    
1015                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
1016                                            userId, repositoryId, rootFolderId, mimeTypes, status);
1017    
1018                            Object returnObj = null;
1019    
1020                            try {
1021                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1022                            }
1023                            catch (Exception e) {
1024                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1025                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1026                                    }
1027    
1028                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1029                            }
1030    
1031                            return ((Integer)returnObj).intValue();
1032                    }
1033                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1034                            _log.error(se, se);
1035    
1036                            throw se;
1037                    }
1038            }
1039    
1040            public static int getGroupFileEntriesCount(HttpPrincipal httpPrincipal,
1041                    long groupId, long userId, long rootFolderId,
1042                    java.lang.String[] mimeTypes, int status)
1043                    throws com.liferay.portal.kernel.exception.PortalException {
1044                    try {
1045                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
1046                                            "getGroupFileEntriesCount",
1047                                            _getGroupFileEntriesCountParameterTypes31);
1048    
1049                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
1050                                            userId, rootFolderId, mimeTypes, status);
1051    
1052                            Object returnObj = null;
1053    
1054                            try {
1055                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1056                            }
1057                            catch (Exception e) {
1058                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1059                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1060                                    }
1061    
1062                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1063                            }
1064    
1065                            return ((Integer)returnObj).intValue();
1066                    }
1067                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1068                            _log.error(se, se);
1069    
1070                            throw se;
1071                    }
1072            }
1073    
1074            public static boolean hasFileEntryLock(HttpPrincipal httpPrincipal,
1075                    long fileEntryId)
1076                    throws com.liferay.portal.kernel.exception.PortalException {
1077                    try {
1078                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
1079                                            "hasFileEntryLock", _hasFileEntryLockParameterTypes32);
1080    
1081                            MethodHandler methodHandler = new MethodHandler(methodKey,
1082                                            fileEntryId);
1083    
1084                            Object returnObj = null;
1085    
1086                            try {
1087                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1088                            }
1089                            catch (Exception e) {
1090                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1091                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1092                                    }
1093    
1094                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1095                            }
1096    
1097                            return ((Boolean)returnObj).booleanValue();
1098                    }
1099                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1100                            _log.error(se, se);
1101    
1102                            throw se;
1103                    }
1104            }
1105    
1106            public static boolean isFileEntryCheckedOut(HttpPrincipal httpPrincipal,
1107                    long fileEntryId)
1108                    throws com.liferay.portal.kernel.exception.PortalException {
1109                    try {
1110                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
1111                                            "isFileEntryCheckedOut",
1112                                            _isFileEntryCheckedOutParameterTypes33);
1113    
1114                            MethodHandler methodHandler = new MethodHandler(methodKey,
1115                                            fileEntryId);
1116    
1117                            Object returnObj = null;
1118    
1119                            try {
1120                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1121                            }
1122                            catch (Exception e) {
1123                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1124                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1125                                    }
1126    
1127                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1128                            }
1129    
1130                            return ((Boolean)returnObj).booleanValue();
1131                    }
1132                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1133                            _log.error(se, se);
1134    
1135                            throw se;
1136                    }
1137            }
1138    
1139            public static boolean isKeepFileVersionLabel(HttpPrincipal httpPrincipal,
1140                    long fileEntryId, boolean majorVersion,
1141                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
1142                    throws com.liferay.portal.kernel.exception.PortalException {
1143                    try {
1144                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
1145                                            "isKeepFileVersionLabel",
1146                                            _isKeepFileVersionLabelParameterTypes34);
1147    
1148                            MethodHandler methodHandler = new MethodHandler(methodKey,
1149                                            fileEntryId, majorVersion, serviceContext);
1150    
1151                            Object returnObj = null;
1152    
1153                            try {
1154                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1155                            }
1156                            catch (Exception e) {
1157                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1158                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1159                                    }
1160    
1161                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1162                            }
1163    
1164                            return ((Boolean)returnObj).booleanValue();
1165                    }
1166                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1167                            _log.error(se, se);
1168    
1169                            throw se;
1170                    }
1171            }
1172    
1173            public static boolean isKeepFileVersionLabel(HttpPrincipal httpPrincipal,
1174                    long fileEntryId,
1175                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
1176                    throws com.liferay.portal.kernel.exception.PortalException {
1177                    try {
1178                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
1179                                            "isKeepFileVersionLabel",
1180                                            _isKeepFileVersionLabelParameterTypes35);
1181    
1182                            MethodHandler methodHandler = new MethodHandler(methodKey,
1183                                            fileEntryId, serviceContext);
1184    
1185                            Object returnObj = null;
1186    
1187                            try {
1188                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1189                            }
1190                            catch (Exception e) {
1191                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1192                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1193                                    }
1194    
1195                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1196                            }
1197    
1198                            return ((Boolean)returnObj).booleanValue();
1199                    }
1200                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1201                            _log.error(se, se);
1202    
1203                            throw se;
1204                    }
1205            }
1206    
1207            public static com.liferay.document.library.kernel.model.DLFileEntry moveFileEntry(
1208                    HttpPrincipal httpPrincipal, long fileEntryId, long newFolderId,
1209                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
1210                    throws com.liferay.portal.kernel.exception.PortalException {
1211                    try {
1212                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
1213                                            "moveFileEntry", _moveFileEntryParameterTypes36);
1214    
1215                            MethodHandler methodHandler = new MethodHandler(methodKey,
1216                                            fileEntryId, newFolderId, serviceContext);
1217    
1218                            Object returnObj = null;
1219    
1220                            try {
1221                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1222                            }
1223                            catch (Exception e) {
1224                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1225                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1226                                    }
1227    
1228                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1229                            }
1230    
1231                            return (com.liferay.document.library.kernel.model.DLFileEntry)returnObj;
1232                    }
1233                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1234                            _log.error(se, se);
1235    
1236                            throw se;
1237                    }
1238            }
1239    
1240            public static com.liferay.portal.kernel.lock.Lock refreshFileEntryLock(
1241                    HttpPrincipal httpPrincipal, java.lang.String lockUuid, long companyId,
1242                    long expirationTime)
1243                    throws com.liferay.portal.kernel.exception.PortalException {
1244                    try {
1245                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
1246                                            "refreshFileEntryLock",
1247                                            _refreshFileEntryLockParameterTypes37);
1248    
1249                            MethodHandler methodHandler = new MethodHandler(methodKey,
1250                                            lockUuid, companyId, expirationTime);
1251    
1252                            Object returnObj = null;
1253    
1254                            try {
1255                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1256                            }
1257                            catch (Exception e) {
1258                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1259                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1260                                    }
1261    
1262                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1263                            }
1264    
1265                            return (com.liferay.portal.kernel.lock.Lock)returnObj;
1266                    }
1267                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1268                            _log.error(se, se);
1269    
1270                            throw se;
1271                    }
1272            }
1273    
1274            public static void revertFileEntry(HttpPrincipal httpPrincipal,
1275                    long fileEntryId, java.lang.String version,
1276                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
1277                    throws com.liferay.portal.kernel.exception.PortalException {
1278                    try {
1279                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
1280                                            "revertFileEntry", _revertFileEntryParameterTypes38);
1281    
1282                            MethodHandler methodHandler = new MethodHandler(methodKey,
1283                                            fileEntryId, version, serviceContext);
1284    
1285                            try {
1286                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
1287                            }
1288                            catch (Exception e) {
1289                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1290                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1291                                    }
1292    
1293                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1294                            }
1295                    }
1296                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1297                            _log.error(se, se);
1298    
1299                            throw se;
1300                    }
1301            }
1302    
1303            public static com.liferay.portal.kernel.search.Hits search(
1304                    HttpPrincipal httpPrincipal, long groupId, long creatorUserId,
1305                    int status, int start, int end)
1306                    throws com.liferay.portal.kernel.exception.PortalException {
1307                    try {
1308                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
1309                                            "search", _searchParameterTypes39);
1310    
1311                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
1312                                            creatorUserId, status, start, end);
1313    
1314                            Object returnObj = null;
1315    
1316                            try {
1317                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1318                            }
1319                            catch (Exception e) {
1320                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1321                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1322                                    }
1323    
1324                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1325                            }
1326    
1327                            return (com.liferay.portal.kernel.search.Hits)returnObj;
1328                    }
1329                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1330                            _log.error(se, se);
1331    
1332                            throw se;
1333                    }
1334            }
1335    
1336            public static com.liferay.portal.kernel.search.Hits search(
1337                    HttpPrincipal httpPrincipal, long groupId, long creatorUserId,
1338                    long folderId, java.lang.String[] mimeTypes, int status, int start,
1339                    int end) throws com.liferay.portal.kernel.exception.PortalException {
1340                    try {
1341                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
1342                                            "search", _searchParameterTypes40);
1343    
1344                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
1345                                            creatorUserId, folderId, mimeTypes, status, start, end);
1346    
1347                            Object returnObj = null;
1348    
1349                            try {
1350                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1351                            }
1352                            catch (Exception e) {
1353                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1354                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1355                                    }
1356    
1357                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1358                            }
1359    
1360                            return (com.liferay.portal.kernel.search.Hits)returnObj;
1361                    }
1362                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1363                            _log.error(se, se);
1364    
1365                            throw se;
1366                    }
1367            }
1368    
1369            public static com.liferay.document.library.kernel.model.DLFileEntry updateFileEntry(
1370                    HttpPrincipal httpPrincipal, long fileEntryId,
1371                    java.lang.String sourceFileName, java.lang.String mimeType,
1372                    java.lang.String title, java.lang.String description,
1373                    java.lang.String changeLog, boolean majorVersion, long fileEntryTypeId,
1374                    java.util.Map<java.lang.String, com.liferay.dynamic.data.mapping.kernel.DDMFormValues> ddmFormValuesMap,
1375                    java.io.File file, java.io.InputStream is, long size,
1376                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
1377                    throws com.liferay.portal.kernel.exception.PortalException {
1378                    try {
1379                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
1380                                            "updateFileEntry", _updateFileEntryParameterTypes41);
1381    
1382                            MethodHandler methodHandler = new MethodHandler(methodKey,
1383                                            fileEntryId, sourceFileName, mimeType, title, description,
1384                                            changeLog, majorVersion, fileEntryTypeId, ddmFormValuesMap,
1385                                            file, is, size, serviceContext);
1386    
1387                            Object returnObj = null;
1388    
1389                            try {
1390                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1391                            }
1392                            catch (Exception e) {
1393                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1394                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1395                                    }
1396    
1397                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1398                            }
1399    
1400                            return (com.liferay.document.library.kernel.model.DLFileEntry)returnObj;
1401                    }
1402                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1403                            _log.error(se, se);
1404    
1405                            throw se;
1406                    }
1407            }
1408    
1409            public static com.liferay.document.library.kernel.model.DLFileEntry updateStatus(
1410                    HttpPrincipal httpPrincipal, long userId, long fileVersionId,
1411                    int status,
1412                    com.liferay.portal.kernel.service.ServiceContext serviceContext,
1413                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
1414                    throws com.liferay.portal.kernel.exception.PortalException {
1415                    try {
1416                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
1417                                            "updateStatus", _updateStatusParameterTypes42);
1418    
1419                            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
1420                                            fileVersionId, status, serviceContext, workflowContext);
1421    
1422                            Object returnObj = null;
1423    
1424                            try {
1425                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1426                            }
1427                            catch (Exception e) {
1428                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1429                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1430                                    }
1431    
1432                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1433                            }
1434    
1435                            return (com.liferay.document.library.kernel.model.DLFileEntry)returnObj;
1436                    }
1437                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1438                            _log.error(se, se);
1439    
1440                            throw se;
1441                    }
1442            }
1443    
1444            public static boolean verifyFileEntryCheckOut(HttpPrincipal httpPrincipal,
1445                    long fileEntryId, java.lang.String lockUuid)
1446                    throws com.liferay.portal.kernel.exception.PortalException {
1447                    try {
1448                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
1449                                            "verifyFileEntryCheckOut",
1450                                            _verifyFileEntryCheckOutParameterTypes43);
1451    
1452                            MethodHandler methodHandler = new MethodHandler(methodKey,
1453                                            fileEntryId, lockUuid);
1454    
1455                            Object returnObj = null;
1456    
1457                            try {
1458                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1459                            }
1460                            catch (Exception e) {
1461                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1462                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1463                                    }
1464    
1465                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1466                            }
1467    
1468                            return ((Boolean)returnObj).booleanValue();
1469                    }
1470                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1471                            _log.error(se, se);
1472    
1473                            throw se;
1474                    }
1475            }
1476    
1477            public static boolean verifyFileEntryLock(HttpPrincipal httpPrincipal,
1478                    long fileEntryId, java.lang.String lockUuid)
1479                    throws com.liferay.portal.kernel.exception.PortalException {
1480                    try {
1481                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class,
1482                                            "verifyFileEntryLock", _verifyFileEntryLockParameterTypes44);
1483    
1484                            MethodHandler methodHandler = new MethodHandler(methodKey,
1485                                            fileEntryId, lockUuid);
1486    
1487                            Object returnObj = null;
1488    
1489                            try {
1490                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1491                            }
1492                            catch (Exception e) {
1493                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1494                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1495                                    }
1496    
1497                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1498                            }
1499    
1500                            return ((Boolean)returnObj).booleanValue();
1501                    }
1502                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1503                            _log.error(se, se);
1504    
1505                            throw se;
1506                    }
1507            }
1508    
1509            private static Log _log = LogFactoryUtil.getLog(DLFileEntryServiceHttp.class);
1510            private static final Class<?>[] _addFileEntryParameterTypes0 = new Class[] {
1511                            long.class, long.class, long.class, java.lang.String.class,
1512                            java.lang.String.class, java.lang.String.class,
1513                            java.lang.String.class, java.lang.String.class, long.class,
1514                            java.util.Map.class, java.io.File.class, java.io.InputStream.class,
1515                            long.class, com.liferay.portal.kernel.service.ServiceContext.class
1516                    };
1517            private static final Class<?>[] _cancelCheckOutParameterTypes1 = new Class[] {
1518                            long.class
1519                    };
1520            private static final Class<?>[] _checkInFileEntryParameterTypes2 = new Class[] {
1521                            long.class, boolean.class, java.lang.String.class,
1522                            com.liferay.portal.kernel.service.ServiceContext.class
1523                    };
1524            private static final Class<?>[] _checkInFileEntryParameterTypes3 = new Class[] {
1525                            long.class, java.lang.String.class,
1526                            com.liferay.portal.kernel.service.ServiceContext.class
1527                    };
1528            private static final Class<?>[] _checkOutFileEntryParameterTypes4 = new Class[] {
1529                            long.class, com.liferay.portal.kernel.service.ServiceContext.class
1530                    };
1531            private static final Class<?>[] _checkOutFileEntryParameterTypes5 = new Class[] {
1532                            long.class, java.lang.String.class, long.class,
1533                            com.liferay.portal.kernel.service.ServiceContext.class
1534                    };
1535            private static final Class<?>[] _copyFileEntryParameterTypes6 = new Class[] {
1536                            long.class, long.class, long.class, long.class,
1537                            com.liferay.portal.kernel.service.ServiceContext.class
1538                    };
1539            private static final Class<?>[] _deleteFileEntryParameterTypes7 = new Class[] {
1540                            long.class
1541                    };
1542            private static final Class<?>[] _deleteFileEntryParameterTypes8 = new Class[] {
1543                            long.class, long.class, java.lang.String.class
1544                    };
1545            private static final Class<?>[] _deleteFileVersionParameterTypes9 = new Class[] {
1546                            long.class, java.lang.String.class
1547                    };
1548            private static final Class<?>[] _fetchFileEntryByImageIdParameterTypes10 = new Class[] {
1549                            long.class
1550                    };
1551            private static final Class<?>[] _getFileAsStreamParameterTypes11 = new Class[] {
1552                            long.class, java.lang.String.class
1553                    };
1554            private static final Class<?>[] _getFileAsStreamParameterTypes12 = new Class[] {
1555                            long.class, java.lang.String.class, boolean.class
1556                    };
1557            private static final Class<?>[] _getFileEntriesParameterTypes13 = new Class[] {
1558                            long.class, long.class, int.class, int.class, int.class,
1559                            com.liferay.portal.kernel.util.OrderByComparator.class
1560                    };
1561            private static final Class<?>[] _getFileEntriesParameterTypes14 = new Class[] {
1562                            long.class, long.class, int.class, int.class,
1563                            com.liferay.portal.kernel.util.OrderByComparator.class
1564                    };
1565            private static final Class<?>[] _getFileEntriesParameterTypes15 = new Class[] {
1566                            long.class, long.class, long.class, int.class, int.class,
1567                            com.liferay.portal.kernel.util.OrderByComparator.class
1568                    };
1569            private static final Class<?>[] _getFileEntriesParameterTypes16 = new Class[] {
1570                            long.class, long.class, java.lang.String[].class, int.class,
1571                            int.class, com.liferay.portal.kernel.util.OrderByComparator.class
1572                    };
1573            private static final Class<?>[] _getFileEntriesCountParameterTypes17 = new Class[] {
1574                            long.class, long.class
1575                    };
1576            private static final Class<?>[] _getFileEntriesCountParameterTypes18 = new Class[] {
1577                            long.class, long.class, int.class
1578                    };
1579            private static final Class<?>[] _getFileEntriesCountParameterTypes19 = new Class[] {
1580                            long.class, long.class, long.class
1581                    };
1582            private static final Class<?>[] _getFileEntriesCountParameterTypes20 = new Class[] {
1583                            long.class, long.class, java.lang.String[].class
1584                    };
1585            private static final Class<?>[] _getFileEntryParameterTypes21 = new Class[] {
1586                            long.class
1587                    };
1588            private static final Class<?>[] _getFileEntryParameterTypes22 = new Class[] {
1589                            long.class, long.class, java.lang.String.class
1590                    };
1591            private static final Class<?>[] _getFileEntryByUuidAndGroupIdParameterTypes23 =
1592                    new Class[] { java.lang.String.class, long.class };
1593            private static final Class<?>[] _getFileEntryLockParameterTypes24 = new Class[] {
1594                            long.class
1595                    };
1596            private static final Class<?>[] _getFoldersFileEntriesCountParameterTypes25 = new Class[] {
1597                            long.class, java.util.List.class, int.class
1598                    };
1599            private static final Class<?>[] _getGroupFileEntriesParameterTypes26 = new Class[] {
1600                            long.class, long.class, long.class, int.class, int.class,
1601                            com.liferay.portal.kernel.util.OrderByComparator.class
1602                    };
1603            private static final Class<?>[] _getGroupFileEntriesParameterTypes27 = new Class[] {
1604                            long.class, long.class, long.class, long.class,
1605                            java.lang.String[].class, int.class, int.class, int.class,
1606                            com.liferay.portal.kernel.util.OrderByComparator.class
1607                    };
1608            private static final Class<?>[] _getGroupFileEntriesParameterTypes28 = new Class[] {
1609                            long.class, long.class, long.class, java.lang.String[].class,
1610                            int.class, int.class, int.class,
1611                            com.liferay.portal.kernel.util.OrderByComparator.class
1612                    };
1613            private static final Class<?>[] _getGroupFileEntriesCountParameterTypes29 = new Class[] {
1614                            long.class, long.class, long.class
1615                    };
1616            private static final Class<?>[] _getGroupFileEntriesCountParameterTypes30 = new Class[] {
1617                            long.class, long.class, long.class, long.class,
1618                            java.lang.String[].class, int.class
1619                    };
1620            private static final Class<?>[] _getGroupFileEntriesCountParameterTypes31 = new Class[] {
1621                            long.class, long.class, long.class, java.lang.String[].class,
1622                            int.class
1623                    };
1624            private static final Class<?>[] _hasFileEntryLockParameterTypes32 = new Class[] {
1625                            long.class
1626                    };
1627            private static final Class<?>[] _isFileEntryCheckedOutParameterTypes33 = new Class[] {
1628                            long.class
1629                    };
1630            private static final Class<?>[] _isKeepFileVersionLabelParameterTypes34 = new Class[] {
1631                            long.class, boolean.class,
1632                            com.liferay.portal.kernel.service.ServiceContext.class
1633                    };
1634            private static final Class<?>[] _isKeepFileVersionLabelParameterTypes35 = new Class[] {
1635                            long.class, com.liferay.portal.kernel.service.ServiceContext.class
1636                    };
1637            private static final Class<?>[] _moveFileEntryParameterTypes36 = new Class[] {
1638                            long.class, long.class,
1639                            com.liferay.portal.kernel.service.ServiceContext.class
1640                    };
1641            private static final Class<?>[] _refreshFileEntryLockParameterTypes37 = new Class[] {
1642                            java.lang.String.class, long.class, long.class
1643                    };
1644            private static final Class<?>[] _revertFileEntryParameterTypes38 = new Class[] {
1645                            long.class, java.lang.String.class,
1646                            com.liferay.portal.kernel.service.ServiceContext.class
1647                    };
1648            private static final Class<?>[] _searchParameterTypes39 = new Class[] {
1649                            long.class, long.class, int.class, int.class, int.class
1650                    };
1651            private static final Class<?>[] _searchParameterTypes40 = new Class[] {
1652                            long.class, long.class, long.class, java.lang.String[].class,
1653                            int.class, int.class, int.class
1654                    };
1655            private static final Class<?>[] _updateFileEntryParameterTypes41 = new Class[] {
1656                            long.class, java.lang.String.class, java.lang.String.class,
1657                            java.lang.String.class, java.lang.String.class,
1658                            java.lang.String.class, boolean.class, long.class,
1659                            java.util.Map.class, java.io.File.class, java.io.InputStream.class,
1660                            long.class, com.liferay.portal.kernel.service.ServiceContext.class
1661                    };
1662            private static final Class<?>[] _updateStatusParameterTypes42 = new Class[] {
1663                            long.class, long.class, int.class,
1664                            com.liferay.portal.kernel.service.ServiceContext.class,
1665                            java.util.Map.class
1666                    };
1667            private static final Class<?>[] _verifyFileEntryCheckOutParameterTypes43 = new Class[] {
1668                            long.class, java.lang.String.class
1669                    };
1670            private static final Class<?>[] _verifyFileEntryLockParameterTypes44 = new Class[] {
1671                            long.class, java.lang.String.class
1672                    };
1673    }