001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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 folderId,
059                    java.lang.String name, java.lang.String title,
060                    java.lang.String description, java.lang.String changeLog,
061                    java.lang.String extraSettings, byte[] bytes,
062                    com.liferay.portal.service.ServiceContext serviceContext)
063                    throws com.liferay.portal.kernel.exception.PortalException,
064                            com.liferay.portal.kernel.exception.SystemException {
065                    try {
066                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
067                                            "addFileEntry", _addFileEntryParameterTypes0);
068    
069                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
070                                            folderId, name, title, description, changeLog,
071                                            extraSettings, bytes, serviceContext);
072    
073                            Object returnObj = null;
074    
075                            try {
076                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
077                            }
078                            catch (Exception e) {
079                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
080                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
081                                    }
082    
083                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
084                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
085                                    }
086    
087                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
088                            }
089    
090                            return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
091                    }
092                    catch (com.liferay.portal.kernel.exception.SystemException se) {
093                            _log.error(se, se);
094    
095                            throw se;
096                    }
097            }
098    
099            public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
100                    HttpPrincipal httpPrincipal, long groupId, long folderId,
101                    java.lang.String name, java.lang.String title,
102                    java.lang.String description, java.lang.String changeLog,
103                    java.lang.String extraSettings, java.io.File file,
104                    com.liferay.portal.service.ServiceContext serviceContext)
105                    throws com.liferay.portal.kernel.exception.PortalException,
106                            com.liferay.portal.kernel.exception.SystemException {
107                    try {
108                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
109                                            "addFileEntry", _addFileEntryParameterTypes1);
110    
111                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
112                                            folderId, name, title, description, changeLog,
113                                            extraSettings, file, serviceContext);
114    
115                            Object returnObj = null;
116    
117                            try {
118                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
119                            }
120                            catch (Exception e) {
121                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
122                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
123                                    }
124    
125                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
126                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
127                                    }
128    
129                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
130                            }
131    
132                            return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
133                    }
134                    catch (com.liferay.portal.kernel.exception.SystemException se) {
135                            _log.error(se, se);
136    
137                            throw se;
138                    }
139            }
140    
141            public static void deleteFileEntry(HttpPrincipal httpPrincipal,
142                    long groupId, long folderId, java.lang.String name)
143                    throws com.liferay.portal.kernel.exception.PortalException,
144                            com.liferay.portal.kernel.exception.SystemException {
145                    try {
146                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
147                                            "deleteFileEntry", _deleteFileEntryParameterTypes2);
148    
149                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
150                                            folderId, name);
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 deleteFileEntry(HttpPrincipal httpPrincipal,
175                    long groupId, long folderId, java.lang.String name,
176                    java.lang.String version)
177                    throws com.liferay.portal.kernel.exception.PortalException,
178                            com.liferay.portal.kernel.exception.SystemException {
179                    try {
180                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
181                                            "deleteFileEntry", _deleteFileEntryParameterTypes3);
182    
183                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
184                                            folderId, name, version);
185    
186                            try {
187                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
188                            }
189                            catch (Exception e) {
190                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
191                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
192                                    }
193    
194                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
195                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
196                                    }
197    
198                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
199                            }
200                    }
201                    catch (com.liferay.portal.kernel.exception.SystemException se) {
202                            _log.error(se, se);
203    
204                            throw se;
205                    }
206            }
207    
208            public static void deleteFileEntryByTitle(HttpPrincipal httpPrincipal,
209                    long groupId, long folderId, java.lang.String titleWithExtension)
210                    throws com.liferay.portal.kernel.exception.PortalException,
211                            com.liferay.portal.kernel.exception.SystemException {
212                    try {
213                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
214                                            "deleteFileEntryByTitle",
215                                            _deleteFileEntryByTitleParameterTypes4);
216    
217                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
218                                            folderId, titleWithExtension);
219    
220                            try {
221                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
222                            }
223                            catch (Exception e) {
224                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
225                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
226                                    }
227    
228                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
229                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
230                                    }
231    
232                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
233                            }
234                    }
235                    catch (com.liferay.portal.kernel.exception.SystemException se) {
236                            _log.error(se, se);
237    
238                            throw se;
239                    }
240            }
241    
242            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
243                    HttpPrincipal httpPrincipal, long groupId, long folderId)
244                    throws com.liferay.portal.kernel.exception.PortalException,
245                            com.liferay.portal.kernel.exception.SystemException {
246                    try {
247                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
248                                            "getFileEntries", _getFileEntriesParameterTypes5);
249    
250                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
251                                            folderId);
252    
253                            Object returnObj = null;
254    
255                            try {
256                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
257                            }
258                            catch (Exception e) {
259                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
260                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
261                                    }
262    
263                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
264                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
265                                    }
266    
267                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
268                            }
269    
270                            return (java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry>)returnObj;
271                    }
272                    catch (com.liferay.portal.kernel.exception.SystemException se) {
273                            _log.error(se, se);
274    
275                            throw se;
276                    }
277            }
278    
279            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
280                    HttpPrincipal httpPrincipal, long groupId, long folderId, int start,
281                    int end)
282                    throws com.liferay.portal.kernel.exception.PortalException,
283                            com.liferay.portal.kernel.exception.SystemException {
284                    try {
285                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
286                                            "getFileEntries", _getFileEntriesParameterTypes6);
287    
288                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
289                                            folderId, start, end);
290    
291                            Object returnObj = null;
292    
293                            try {
294                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
295                            }
296                            catch (Exception e) {
297                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
298                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
299                                    }
300    
301                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
302                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
303                                    }
304    
305                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
306                            }
307    
308                            return (java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry>)returnObj;
309                    }
310                    catch (com.liferay.portal.kernel.exception.SystemException se) {
311                            _log.error(se, se);
312    
313                            throw se;
314                    }
315            }
316    
317            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
318                    HttpPrincipal httpPrincipal, long groupId, long folderId, int start,
319                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
320                    throws com.liferay.portal.kernel.exception.PortalException,
321                            com.liferay.portal.kernel.exception.SystemException {
322                    try {
323                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
324                                            "getFileEntries", _getFileEntriesParameterTypes7);
325    
326                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
327                                            folderId, start, end, obc);
328    
329                            Object returnObj = null;
330    
331                            try {
332                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
333                            }
334                            catch (Exception e) {
335                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
336                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
337                                    }
338    
339                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
340                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
341                                    }
342    
343                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
344                            }
345    
346                            return (java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry>)returnObj;
347                    }
348                    catch (com.liferay.portal.kernel.exception.SystemException se) {
349                            _log.error(se, se);
350    
351                            throw se;
352                    }
353            }
354    
355            public static int getFileEntriesCount(HttpPrincipal httpPrincipal,
356                    long groupId, long folderId)
357                    throws com.liferay.portal.kernel.exception.PortalException,
358                            com.liferay.portal.kernel.exception.SystemException {
359                    try {
360                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
361                                            "getFileEntriesCount", _getFileEntriesCountParameterTypes8);
362    
363                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
364                                            folderId);
365    
366                            Object returnObj = null;
367    
368                            try {
369                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
370                            }
371                            catch (Exception e) {
372                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
373                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
374                                    }
375    
376                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
377                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
378                                    }
379    
380                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
381                            }
382    
383                            return ((Integer)returnObj).intValue();
384                    }
385                    catch (com.liferay.portal.kernel.exception.SystemException se) {
386                            _log.error(se, se);
387    
388                            throw se;
389                    }
390            }
391    
392            public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
393                    HttpPrincipal httpPrincipal, long groupId, long folderId,
394                    java.lang.String name)
395                    throws com.liferay.portal.kernel.exception.PortalException,
396                            com.liferay.portal.kernel.exception.SystemException {
397                    try {
398                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
399                                            "getFileEntry", _getFileEntryParameterTypes9);
400    
401                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
402                                            folderId, name);
403    
404                            Object returnObj = null;
405    
406                            try {
407                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
408                            }
409                            catch (Exception e) {
410                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
411                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
412                                    }
413    
414                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
415                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
416                                    }
417    
418                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
419                            }
420    
421                            return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
422                    }
423                    catch (com.liferay.portal.kernel.exception.SystemException se) {
424                            _log.error(se, se);
425    
426                            throw se;
427                    }
428            }
429    
430            public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
431                    HttpPrincipal httpPrincipal, long groupId, long folderId,
432                    java.lang.String titleWithExtension)
433                    throws com.liferay.portal.kernel.exception.PortalException,
434                            com.liferay.portal.kernel.exception.SystemException {
435                    try {
436                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
437                                            "getFileEntryByTitle", _getFileEntryByTitleParameterTypes10);
438    
439                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
440                                            folderId, titleWithExtension);
441    
442                            Object returnObj = null;
443    
444                            try {
445                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
446                            }
447                            catch (Exception e) {
448                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
449                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
450                                    }
451    
452                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
453                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
454                                    }
455    
456                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
457                            }
458    
459                            return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
460                    }
461                    catch (com.liferay.portal.kernel.exception.SystemException se) {
462                            _log.error(se, se);
463    
464                            throw se;
465                    }
466            }
467    
468            public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
469                    HttpPrincipal httpPrincipal, java.lang.String uuid, long groupId)
470                    throws com.liferay.portal.kernel.exception.PortalException,
471                            com.liferay.portal.kernel.exception.SystemException {
472                    try {
473                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
474                                            "getFileEntryByUuidAndGroupId",
475                                            _getFileEntryByUuidAndGroupIdParameterTypes11);
476    
477                            MethodHandler methodHandler = new MethodHandler(methodKey, uuid,
478                                            groupId);
479    
480                            Object returnObj = null;
481    
482                            try {
483                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
484                            }
485                            catch (Exception e) {
486                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
487                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
488                                    }
489    
490                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
491                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
492                                    }
493    
494                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
495                            }
496    
497                            return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
498                    }
499                    catch (com.liferay.portal.kernel.exception.SystemException se) {
500                            _log.error(se, se);
501    
502                            throw se;
503                    }
504            }
505    
506            public static int getFoldersFileEntriesCount(HttpPrincipal httpPrincipal,
507                    long groupId, java.util.List<java.lang.Long> folderIds, int status)
508                    throws com.liferay.portal.kernel.exception.SystemException {
509                    try {
510                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
511                                            "getFoldersFileEntriesCount",
512                                            _getFoldersFileEntriesCountParameterTypes12);
513    
514                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
515                                            folderIds, status);
516    
517                            Object returnObj = null;
518    
519                            try {
520                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
521                            }
522                            catch (Exception e) {
523                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
524                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
525                                    }
526    
527                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
528                            }
529    
530                            return ((Integer)returnObj).intValue();
531                    }
532                    catch (com.liferay.portal.kernel.exception.SystemException se) {
533                            _log.error(se, se);
534    
535                            throw se;
536                    }
537            }
538    
539            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
540                    HttpPrincipal httpPrincipal, long groupId, long userId, int start,
541                    int end) throws com.liferay.portal.kernel.exception.SystemException {
542                    try {
543                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
544                                            "getGroupFileEntries", _getGroupFileEntriesParameterTypes13);
545    
546                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
547                                            userId, start, end);
548    
549                            Object returnObj = null;
550    
551                            try {
552                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
553                            }
554                            catch (Exception e) {
555                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
556                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
557                                    }
558    
559                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
560                            }
561    
562                            return (java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry>)returnObj;
563                    }
564                    catch (com.liferay.portal.kernel.exception.SystemException se) {
565                            _log.error(se, se);
566    
567                            throw se;
568                    }
569            }
570    
571            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
572                    HttpPrincipal httpPrincipal, long groupId, long userId, int start,
573                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
574                    throws com.liferay.portal.kernel.exception.SystemException {
575                    try {
576                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
577                                            "getGroupFileEntries", _getGroupFileEntriesParameterTypes14);
578    
579                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
580                                            userId, start, end, obc);
581    
582                            Object returnObj = null;
583    
584                            try {
585                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
586                            }
587                            catch (Exception e) {
588                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
589                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
590                                    }
591    
592                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
593                            }
594    
595                            return (java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry>)returnObj;
596                    }
597                    catch (com.liferay.portal.kernel.exception.SystemException se) {
598                            _log.error(se, se);
599    
600                            throw se;
601                    }
602            }
603    
604            public static int getGroupFileEntriesCount(HttpPrincipal httpPrincipal,
605                    long groupId, long userId)
606                    throws com.liferay.portal.kernel.exception.SystemException {
607                    try {
608                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
609                                            "getGroupFileEntriesCount",
610                                            _getGroupFileEntriesCountParameterTypes15);
611    
612                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
613                                            userId);
614    
615                            Object returnObj = null;
616    
617                            try {
618                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
619                            }
620                            catch (Exception e) {
621                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
622                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
623                                    }
624    
625                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
626                            }
627    
628                            return ((Integer)returnObj).intValue();
629                    }
630                    catch (com.liferay.portal.kernel.exception.SystemException se) {
631                            _log.error(se, se);
632    
633                            throw se;
634                    }
635            }
636    
637            public static com.liferay.portal.model.Lock getFileEntryLock(
638                    HttpPrincipal httpPrincipal, long groupId, long folderId,
639                    java.lang.String name)
640                    throws com.liferay.portal.kernel.exception.PortalException,
641                            com.liferay.portal.kernel.exception.SystemException {
642                    try {
643                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
644                                            "getFileEntryLock", _getFileEntryLockParameterTypes16);
645    
646                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
647                                            folderId, name);
648    
649                            Object returnObj = null;
650    
651                            try {
652                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
653                            }
654                            catch (Exception e) {
655                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
656                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
657                                    }
658    
659                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
660                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
661                                    }
662    
663                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
664                            }
665    
666                            return (com.liferay.portal.model.Lock)returnObj;
667                    }
668                    catch (com.liferay.portal.kernel.exception.SystemException se) {
669                            _log.error(se, se);
670    
671                            throw se;
672                    }
673            }
674    
675            public static boolean hasFileEntryLock(HttpPrincipal httpPrincipal,
676                    long groupId, long folderId, java.lang.String name)
677                    throws com.liferay.portal.kernel.exception.PortalException,
678                            com.liferay.portal.kernel.exception.SystemException {
679                    try {
680                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
681                                            "hasFileEntryLock", _hasFileEntryLockParameterTypes17);
682    
683                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
684                                            folderId, name);
685    
686                            Object returnObj = null;
687    
688                            try {
689                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
690                            }
691                            catch (Exception e) {
692                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
693                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
694                                    }
695    
696                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
697                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
698                                    }
699    
700                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
701                            }
702    
703                            return ((Boolean)returnObj).booleanValue();
704                    }
705                    catch (com.liferay.portal.kernel.exception.SystemException se) {
706                            _log.error(se, se);
707    
708                            throw se;
709                    }
710            }
711    
712            public static com.liferay.portal.model.Lock lockFileEntry(
713                    HttpPrincipal httpPrincipal, long groupId, long folderId,
714                    java.lang.String name)
715                    throws com.liferay.portal.kernel.exception.PortalException,
716                            com.liferay.portal.kernel.exception.SystemException {
717                    try {
718                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
719                                            "lockFileEntry", _lockFileEntryParameterTypes18);
720    
721                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
722                                            folderId, name);
723    
724                            Object returnObj = null;
725    
726                            try {
727                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
728                            }
729                            catch (Exception e) {
730                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
731                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
732                                    }
733    
734                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
735                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
736                                    }
737    
738                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
739                            }
740    
741                            return (com.liferay.portal.model.Lock)returnObj;
742                    }
743                    catch (com.liferay.portal.kernel.exception.SystemException se) {
744                            _log.error(se, se);
745    
746                            throw se;
747                    }
748            }
749    
750            public static com.liferay.portal.model.Lock lockFileEntry(
751                    HttpPrincipal httpPrincipal, long groupId, long folderId,
752                    java.lang.String name, java.lang.String owner, long expirationTime)
753                    throws com.liferay.portal.kernel.exception.PortalException,
754                            com.liferay.portal.kernel.exception.SystemException {
755                    try {
756                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
757                                            "lockFileEntry", _lockFileEntryParameterTypes19);
758    
759                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
760                                            folderId, name, owner, expirationTime);
761    
762                            Object returnObj = null;
763    
764                            try {
765                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
766                            }
767                            catch (Exception e) {
768                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
769                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
770                                    }
771    
772                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
773                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
774                                    }
775    
776                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
777                            }
778    
779                            return (com.liferay.portal.model.Lock)returnObj;
780                    }
781                    catch (com.liferay.portal.kernel.exception.SystemException se) {
782                            _log.error(se, se);
783    
784                            throw se;
785                    }
786            }
787    
788            public static com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
789                    HttpPrincipal httpPrincipal, long groupId, long folderId,
790                    long newFolderId, java.lang.String name,
791                    com.liferay.portal.service.ServiceContext serviceContext)
792                    throws com.liferay.portal.kernel.exception.PortalException,
793                            com.liferay.portal.kernel.exception.SystemException {
794                    try {
795                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
796                                            "moveFileEntry", _moveFileEntryParameterTypes20);
797    
798                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
799                                            folderId, newFolderId, name, serviceContext);
800    
801                            Object returnObj = null;
802    
803                            try {
804                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
805                            }
806                            catch (Exception e) {
807                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
808                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
809                                    }
810    
811                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
812                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
813                                    }
814    
815                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
816                            }
817    
818                            return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
819                    }
820                    catch (com.liferay.portal.kernel.exception.SystemException se) {
821                            _log.error(se, se);
822    
823                            throw se;
824                    }
825            }
826    
827            public static com.liferay.portal.model.Lock refreshFileEntryLock(
828                    HttpPrincipal httpPrincipal, java.lang.String lockUuid,
829                    long expirationTime)
830                    throws com.liferay.portal.kernel.exception.PortalException,
831                            com.liferay.portal.kernel.exception.SystemException {
832                    try {
833                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
834                                            "refreshFileEntryLock",
835                                            _refreshFileEntryLockParameterTypes21);
836    
837                            MethodHandler methodHandler = new MethodHandler(methodKey,
838                                            lockUuid, expirationTime);
839    
840                            Object returnObj = null;
841    
842                            try {
843                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
844                            }
845                            catch (Exception e) {
846                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
847                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
848                                    }
849    
850                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
851                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
852                                    }
853    
854                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
855                            }
856    
857                            return (com.liferay.portal.model.Lock)returnObj;
858                    }
859                    catch (com.liferay.portal.kernel.exception.SystemException se) {
860                            _log.error(se, se);
861    
862                            throw se;
863                    }
864            }
865    
866            public static void unlockFileEntry(HttpPrincipal httpPrincipal,
867                    long groupId, long folderId, java.lang.String name)
868                    throws com.liferay.portal.kernel.exception.SystemException {
869                    try {
870                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
871                                            "unlockFileEntry", _unlockFileEntryParameterTypes22);
872    
873                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
874                                            folderId, name);
875    
876                            try {
877                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
878                            }
879                            catch (Exception e) {
880                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
881                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
882                                    }
883    
884                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
885                            }
886                    }
887                    catch (com.liferay.portal.kernel.exception.SystemException se) {
888                            _log.error(se, se);
889    
890                            throw se;
891                    }
892            }
893    
894            public static void unlockFileEntry(HttpPrincipal httpPrincipal,
895                    long groupId, long folderId, java.lang.String name,
896                    java.lang.String lockUuid)
897                    throws com.liferay.portal.kernel.exception.PortalException,
898                            com.liferay.portal.kernel.exception.SystemException {
899                    try {
900                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
901                                            "unlockFileEntry", _unlockFileEntryParameterTypes23);
902    
903                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
904                                            folderId, name, lockUuid);
905    
906                            try {
907                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
908                            }
909                            catch (Exception e) {
910                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
911                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
912                                    }
913    
914                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
915                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
916                                    }
917    
918                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
919                            }
920                    }
921                    catch (com.liferay.portal.kernel.exception.SystemException se) {
922                            _log.error(se, se);
923    
924                            throw se;
925                    }
926            }
927    
928            public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
929                    HttpPrincipal httpPrincipal, long groupId, long folderId,
930                    java.lang.String name, java.lang.String sourceFileName,
931                    java.lang.String title, java.lang.String description,
932                    java.lang.String changeLog, boolean majorVersion,
933                    java.lang.String extraSettings, byte[] bytes,
934                    com.liferay.portal.service.ServiceContext serviceContext)
935                    throws com.liferay.portal.kernel.exception.PortalException,
936                            com.liferay.portal.kernel.exception.SystemException {
937                    try {
938                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
939                                            "updateFileEntry", _updateFileEntryParameterTypes24);
940    
941                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
942                                            folderId, name, sourceFileName, title, description,
943                                            changeLog, majorVersion, extraSettings, bytes,
944                                            serviceContext);
945    
946                            Object returnObj = null;
947    
948                            try {
949                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
950                            }
951                            catch (Exception e) {
952                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
953                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
954                                    }
955    
956                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
957                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
958                                    }
959    
960                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
961                            }
962    
963                            return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
964                    }
965                    catch (com.liferay.portal.kernel.exception.SystemException se) {
966                            _log.error(se, se);
967    
968                            throw se;
969                    }
970            }
971    
972            public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
973                    HttpPrincipal httpPrincipal, long groupId, long folderId,
974                    java.lang.String name, java.lang.String sourceFileName,
975                    java.lang.String title, java.lang.String description,
976                    java.lang.String changeLog, boolean majorVersion,
977                    java.lang.String extraSettings, java.io.File file,
978                    com.liferay.portal.service.ServiceContext serviceContext)
979                    throws com.liferay.portal.kernel.exception.PortalException,
980                            com.liferay.portal.kernel.exception.SystemException {
981                    try {
982                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
983                                            "updateFileEntry", _updateFileEntryParameterTypes25);
984    
985                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
986                                            folderId, name, sourceFileName, title, description,
987                                            changeLog, majorVersion, extraSettings, file, serviceContext);
988    
989                            Object returnObj = null;
990    
991                            try {
992                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
993                            }
994                            catch (Exception e) {
995                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
996                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
997                                    }
998    
999                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1000                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1001                                    }
1002    
1003                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1004                            }
1005    
1006                            return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
1007                    }
1008                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1009                            _log.error(se, se);
1010    
1011                            throw se;
1012                    }
1013            }
1014    
1015            public static boolean verifyFileEntryLock(HttpPrincipal httpPrincipal,
1016                    long groupId, long folderId, java.lang.String name,
1017                    java.lang.String lockUuid)
1018                    throws com.liferay.portal.kernel.exception.PortalException,
1019                            com.liferay.portal.kernel.exception.SystemException {
1020                    try {
1021                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
1022                                            "verifyFileEntryLock", _verifyFileEntryLockParameterTypes26);
1023    
1024                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
1025                                            folderId, name, lockUuid);
1026    
1027                            Object returnObj = null;
1028    
1029                            try {
1030                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1031                            }
1032                            catch (Exception e) {
1033                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1034                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1035                                    }
1036    
1037                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1038                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1039                                    }
1040    
1041                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1042                            }
1043    
1044                            return ((Boolean)returnObj).booleanValue();
1045                    }
1046                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1047                            _log.error(se, se);
1048    
1049                            throw se;
1050                    }
1051            }
1052    
1053            private static Log _log = LogFactoryUtil.getLog(DLFileEntryServiceHttp.class);
1054            private static final Class<?>[] _addFileEntryParameterTypes0 = new Class[] {
1055                            long.class, long.class, java.lang.String.class,
1056                            java.lang.String.class, java.lang.String.class,
1057                            java.lang.String.class, java.lang.String.class, byte[].class,
1058                            com.liferay.portal.service.ServiceContext.class
1059                    };
1060            private static final Class<?>[] _addFileEntryParameterTypes1 = new Class[] {
1061                            long.class, long.class, java.lang.String.class,
1062                            java.lang.String.class, java.lang.String.class,
1063                            java.lang.String.class, java.lang.String.class, java.io.File.class,
1064                            com.liferay.portal.service.ServiceContext.class
1065                    };
1066            private static final Class<?>[] _deleteFileEntryParameterTypes2 = new Class[] {
1067                            long.class, long.class, java.lang.String.class
1068                    };
1069            private static final Class<?>[] _deleteFileEntryParameterTypes3 = new Class[] {
1070                            long.class, long.class, java.lang.String.class,
1071                            java.lang.String.class
1072                    };
1073            private static final Class<?>[] _deleteFileEntryByTitleParameterTypes4 = new Class[] {
1074                            long.class, long.class, java.lang.String.class
1075                    };
1076            private static final Class<?>[] _getFileEntriesParameterTypes5 = new Class[] {
1077                            long.class, long.class
1078                    };
1079            private static final Class<?>[] _getFileEntriesParameterTypes6 = new Class[] {
1080                            long.class, long.class, int.class, int.class
1081                    };
1082            private static final Class<?>[] _getFileEntriesParameterTypes7 = new Class[] {
1083                            long.class, long.class, int.class, int.class,
1084                            com.liferay.portal.kernel.util.OrderByComparator.class
1085                    };
1086            private static final Class<?>[] _getFileEntriesCountParameterTypes8 = new Class[] {
1087                            long.class, long.class
1088                    };
1089            private static final Class<?>[] _getFileEntryParameterTypes9 = new Class[] {
1090                            long.class, long.class, java.lang.String.class
1091                    };
1092            private static final Class<?>[] _getFileEntryByTitleParameterTypes10 = new Class[] {
1093                            long.class, long.class, java.lang.String.class
1094                    };
1095            private static final Class<?>[] _getFileEntryByUuidAndGroupIdParameterTypes11 =
1096                    new Class[] { java.lang.String.class, long.class };
1097            private static final Class<?>[] _getFoldersFileEntriesCountParameterTypes12 = new Class[] {
1098                            long.class, java.util.List.class, int.class
1099                    };
1100            private static final Class<?>[] _getGroupFileEntriesParameterTypes13 = new Class[] {
1101                            long.class, long.class, int.class, int.class
1102                    };
1103            private static final Class<?>[] _getGroupFileEntriesParameterTypes14 = new Class[] {
1104                            long.class, long.class, int.class, int.class,
1105                            com.liferay.portal.kernel.util.OrderByComparator.class
1106                    };
1107            private static final Class<?>[] _getGroupFileEntriesCountParameterTypes15 = new Class[] {
1108                            long.class, long.class
1109                    };
1110            private static final Class<?>[] _getFileEntryLockParameterTypes16 = new Class[] {
1111                            long.class, long.class, java.lang.String.class
1112                    };
1113            private static final Class<?>[] _hasFileEntryLockParameterTypes17 = new Class[] {
1114                            long.class, long.class, java.lang.String.class
1115                    };
1116            private static final Class<?>[] _lockFileEntryParameterTypes18 = new Class[] {
1117                            long.class, long.class, java.lang.String.class
1118                    };
1119            private static final Class<?>[] _lockFileEntryParameterTypes19 = new Class[] {
1120                            long.class, long.class, java.lang.String.class,
1121                            java.lang.String.class, long.class
1122                    };
1123            private static final Class<?>[] _moveFileEntryParameterTypes20 = new Class[] {
1124                            long.class, long.class, long.class, java.lang.String.class,
1125                            com.liferay.portal.service.ServiceContext.class
1126                    };
1127            private static final Class<?>[] _refreshFileEntryLockParameterTypes21 = new Class[] {
1128                            java.lang.String.class, long.class
1129                    };
1130            private static final Class<?>[] _unlockFileEntryParameterTypes22 = new Class[] {
1131                            long.class, long.class, java.lang.String.class
1132                    };
1133            private static final Class<?>[] _unlockFileEntryParameterTypes23 = new Class[] {
1134                            long.class, long.class, java.lang.String.class,
1135                            java.lang.String.class
1136                    };
1137            private static final Class<?>[] _updateFileEntryParameterTypes24 = new Class[] {
1138                            long.class, long.class, java.lang.String.class,
1139                            java.lang.String.class, java.lang.String.class,
1140                            java.lang.String.class, java.lang.String.class, boolean.class,
1141                            java.lang.String.class, byte[].class,
1142                            com.liferay.portal.service.ServiceContext.class
1143                    };
1144            private static final Class<?>[] _updateFileEntryParameterTypes25 = new Class[] {
1145                            long.class, long.class, java.lang.String.class,
1146                            java.lang.String.class, java.lang.String.class,
1147                            java.lang.String.class, java.lang.String.class, boolean.class,
1148                            java.lang.String.class, java.io.File.class,
1149                            com.liferay.portal.service.ServiceContext.class
1150                    };
1151            private static final Class<?>[] _verifyFileEntryLockParameterTypes26 = new Class[] {
1152                            long.class, long.class, java.lang.String.class,
1153                            java.lang.String.class
1154                    };
1155    }