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