001    /**
002     * Copyright (c) 2000-2010 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 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", long.class, long.class,
068                                            java.lang.String.class, java.lang.String.class,
069                                            java.lang.String.class, java.lang.String.class,
070                                            java.lang.String.class, byte[].class,
071                                            com.liferay.portal.service.ServiceContext.class);
072    
073                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
074                                            folderId, name, title, description, changeLog,
075                                            extraSettings, bytes, 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.DLFileEntry addFileEntry(
104                    HttpPrincipal httpPrincipal, long groupId, long folderId,
105                    java.lang.String name, java.lang.String title,
106                    java.lang.String description, java.lang.String changeLog,
107                    java.lang.String extraSettings, java.io.File file,
108                    com.liferay.portal.service.ServiceContext serviceContext)
109                    throws com.liferay.portal.kernel.exception.PortalException,
110                            com.liferay.portal.kernel.exception.SystemException {
111                    try {
112                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
113                                            "addFileEntry", long.class, long.class,
114                                            java.lang.String.class, java.lang.String.class,
115                                            java.lang.String.class, java.lang.String.class,
116                                            java.lang.String.class, java.io.File.class,
117                                            com.liferay.portal.service.ServiceContext.class);
118    
119                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
120                                            folderId, name, title, description, changeLog,
121                                            extraSettings, file, serviceContext);
122    
123                            Object returnObj = null;
124    
125                            try {
126                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
127                            }
128                            catch (Exception e) {
129                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
130                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
131                                    }
132    
133                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
134                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
135                                    }
136    
137                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
138                            }
139    
140                            return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
141                    }
142                    catch (com.liferay.portal.kernel.exception.SystemException se) {
143                            _log.error(se, se);
144    
145                            throw se;
146                    }
147            }
148    
149            public static void deleteFileEntry(HttpPrincipal httpPrincipal,
150                    long groupId, long folderId, java.lang.String name)
151                    throws com.liferay.portal.kernel.exception.PortalException,
152                            com.liferay.portal.kernel.exception.SystemException {
153                    try {
154                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
155                                            "deleteFileEntry", long.class, long.class,
156                                            java.lang.String.class);
157    
158                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
159                                            folderId, name);
160    
161                            try {
162                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
163                            }
164                            catch (Exception e) {
165                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
166                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
167                                    }
168    
169                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
170                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
171                                    }
172    
173                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
174                            }
175                    }
176                    catch (com.liferay.portal.kernel.exception.SystemException se) {
177                            _log.error(se, se);
178    
179                            throw se;
180                    }
181            }
182    
183            public static void deleteFileEntry(HttpPrincipal httpPrincipal,
184                    long groupId, long folderId, java.lang.String name,
185                    java.lang.String version)
186                    throws com.liferay.portal.kernel.exception.PortalException,
187                            com.liferay.portal.kernel.exception.SystemException {
188                    try {
189                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
190                                            "deleteFileEntry", long.class, long.class,
191                                            java.lang.String.class, java.lang.String.class);
192    
193                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
194                                            folderId, name, version);
195    
196                            try {
197                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
198                            }
199                            catch (Exception e) {
200                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
201                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
202                                    }
203    
204                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
205                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
206                                    }
207    
208                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
209                            }
210                    }
211                    catch (com.liferay.portal.kernel.exception.SystemException se) {
212                            _log.error(se, se);
213    
214                            throw se;
215                    }
216            }
217    
218            public static void deleteFileEntryByTitle(HttpPrincipal httpPrincipal,
219                    long groupId, long folderId, java.lang.String titleWithExtension)
220                    throws com.liferay.portal.kernel.exception.PortalException,
221                            com.liferay.portal.kernel.exception.SystemException {
222                    try {
223                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
224                                            "deleteFileEntryByTitle", long.class, long.class,
225                                            java.lang.String.class);
226    
227                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
228                                            folderId, titleWithExtension);
229    
230                            try {
231                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
232                            }
233                            catch (Exception e) {
234                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
235                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
236                                    }
237    
238                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
239                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
240                                    }
241    
242                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
243                            }
244                    }
245                    catch (com.liferay.portal.kernel.exception.SystemException se) {
246                            _log.error(se, se);
247    
248                            throw se;
249                    }
250            }
251    
252            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
253                    HttpPrincipal httpPrincipal, long groupId, long folderId)
254                    throws com.liferay.portal.kernel.exception.PortalException,
255                            com.liferay.portal.kernel.exception.SystemException {
256                    try {
257                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
258                                            "getFileEntries", long.class, long.class);
259    
260                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
261                                            folderId);
262    
263                            Object returnObj = null;
264    
265                            try {
266                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
267                            }
268                            catch (Exception e) {
269                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
270                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
271                                    }
272    
273                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
274                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
275                                    }
276    
277                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
278                            }
279    
280                            return (java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry>)returnObj;
281                    }
282                    catch (com.liferay.portal.kernel.exception.SystemException se) {
283                            _log.error(se, se);
284    
285                            throw se;
286                    }
287            }
288    
289            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
290                    HttpPrincipal httpPrincipal, long groupId, long folderId, int start,
291                    int end)
292                    throws com.liferay.portal.kernel.exception.PortalException,
293                            com.liferay.portal.kernel.exception.SystemException {
294                    try {
295                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
296                                            "getFileEntries", long.class, long.class, int.class,
297                                            int.class);
298    
299                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
300                                            folderId, start, end);
301    
302                            Object returnObj = null;
303    
304                            try {
305                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
306                            }
307                            catch (Exception e) {
308                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
309                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
310                                    }
311    
312                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
313                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
314                                    }
315    
316                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
317                            }
318    
319                            return (java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry>)returnObj;
320                    }
321                    catch (com.liferay.portal.kernel.exception.SystemException se) {
322                            _log.error(se, se);
323    
324                            throw se;
325                    }
326            }
327    
328            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
329                    HttpPrincipal httpPrincipal, long groupId, long folderId, int start,
330                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
331                    throws com.liferay.portal.kernel.exception.PortalException,
332                            com.liferay.portal.kernel.exception.SystemException {
333                    try {
334                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
335                                            "getFileEntries", long.class, long.class, int.class,
336                                            int.class,
337                                            com.liferay.portal.kernel.util.OrderByComparator.class);
338    
339                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
340                                            folderId, start, end, obc);
341    
342                            Object returnObj = null;
343    
344                            try {
345                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
346                            }
347                            catch (Exception e) {
348                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
349                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
350                                    }
351    
352                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
353                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
354                                    }
355    
356                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
357                            }
358    
359                            return (java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry>)returnObj;
360                    }
361                    catch (com.liferay.portal.kernel.exception.SystemException se) {
362                            _log.error(se, se);
363    
364                            throw se;
365                    }
366            }
367    
368            public static int getFileEntriesCount(HttpPrincipal httpPrincipal,
369                    long groupId, long folderId)
370                    throws com.liferay.portal.kernel.exception.PortalException,
371                            com.liferay.portal.kernel.exception.SystemException {
372                    try {
373                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
374                                            "getFileEntriesCount", long.class, long.class);
375    
376                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
377                                            folderId);
378    
379                            Object returnObj = null;
380    
381                            try {
382                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
383                            }
384                            catch (Exception e) {
385                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
386                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
387                                    }
388    
389                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
390                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
391                                    }
392    
393                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
394                            }
395    
396                            return ((Integer)returnObj).intValue();
397                    }
398                    catch (com.liferay.portal.kernel.exception.SystemException se) {
399                            _log.error(se, se);
400    
401                            throw se;
402                    }
403            }
404    
405            public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
406                    HttpPrincipal httpPrincipal, long groupId, long folderId,
407                    java.lang.String name)
408                    throws com.liferay.portal.kernel.exception.PortalException,
409                            com.liferay.portal.kernel.exception.SystemException {
410                    try {
411                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
412                                            "getFileEntry", long.class, long.class,
413                                            java.lang.String.class);
414    
415                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
416                                            folderId, name);
417    
418                            Object returnObj = null;
419    
420                            try {
421                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
422                            }
423                            catch (Exception e) {
424                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
425                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
426                                    }
427    
428                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
429                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
430                                    }
431    
432                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
433                            }
434    
435                            return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
436                    }
437                    catch (com.liferay.portal.kernel.exception.SystemException se) {
438                            _log.error(se, se);
439    
440                            throw se;
441                    }
442            }
443    
444            public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
445                    HttpPrincipal httpPrincipal, long groupId, long folderId,
446                    java.lang.String titleWithExtension)
447                    throws com.liferay.portal.kernel.exception.PortalException,
448                            com.liferay.portal.kernel.exception.SystemException {
449                    try {
450                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
451                                            "getFileEntryByTitle", long.class, long.class,
452                                            java.lang.String.class);
453    
454                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
455                                            folderId, titleWithExtension);
456    
457                            Object returnObj = null;
458    
459                            try {
460                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
461                            }
462                            catch (Exception e) {
463                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
464                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
465                                    }
466    
467                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
468                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
469                                    }
470    
471                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
472                            }
473    
474                            return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
475                    }
476                    catch (com.liferay.portal.kernel.exception.SystemException se) {
477                            _log.error(se, se);
478    
479                            throw se;
480                    }
481            }
482    
483            public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
484                    HttpPrincipal httpPrincipal, java.lang.String uuid, long groupId)
485                    throws com.liferay.portal.kernel.exception.PortalException,
486                            com.liferay.portal.kernel.exception.SystemException {
487                    try {
488                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
489                                            "getFileEntryByUuidAndGroupId", java.lang.String.class,
490                                            long.class);
491    
492                            MethodHandler methodHandler = new MethodHandler(methodKey, uuid,
493                                            groupId);
494    
495                            Object returnObj = null;
496    
497                            try {
498                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
499                            }
500                            catch (Exception e) {
501                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
502                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
503                                    }
504    
505                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
506                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
507                                    }
508    
509                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
510                            }
511    
512                            return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
513                    }
514                    catch (com.liferay.portal.kernel.exception.SystemException se) {
515                            _log.error(se, se);
516    
517                            throw se;
518                    }
519            }
520    
521            public static int getFoldersFileEntriesCount(HttpPrincipal httpPrincipal,
522                    long groupId, java.util.List<java.lang.Long> folderIds, int status)
523                    throws com.liferay.portal.kernel.exception.SystemException {
524                    try {
525                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
526                                            "getFoldersFileEntriesCount", long.class,
527                                            java.util.List.class, int.class);
528    
529                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
530                                            folderIds, status);
531    
532                            Object returnObj = null;
533    
534                            try {
535                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
536                            }
537                            catch (Exception e) {
538                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
539                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
540                                    }
541    
542                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
543                            }
544    
545                            return ((Integer)returnObj).intValue();
546                    }
547                    catch (com.liferay.portal.kernel.exception.SystemException se) {
548                            _log.error(se, se);
549    
550                            throw se;
551                    }
552            }
553    
554            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
555                    HttpPrincipal httpPrincipal, long groupId, long userId, int start,
556                    int end) throws com.liferay.portal.kernel.exception.SystemException {
557                    try {
558                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
559                                            "getGroupFileEntries", long.class, long.class, int.class,
560                                            int.class);
561    
562                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
563                                            userId, start, end);
564    
565                            Object returnObj = null;
566    
567                            try {
568                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
569                            }
570                            catch (Exception e) {
571                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
572                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
573                                    }
574    
575                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
576                            }
577    
578                            return (java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry>)returnObj;
579                    }
580                    catch (com.liferay.portal.kernel.exception.SystemException se) {
581                            _log.error(se, se);
582    
583                            throw se;
584                    }
585            }
586    
587            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
588                    HttpPrincipal httpPrincipal, long groupId, long userId, int start,
589                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
590                    throws com.liferay.portal.kernel.exception.SystemException {
591                    try {
592                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
593                                            "getGroupFileEntries", long.class, long.class, int.class,
594                                            int.class,
595                                            com.liferay.portal.kernel.util.OrderByComparator.class);
596    
597                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
598                                            userId, start, end, obc);
599    
600                            Object returnObj = null;
601    
602                            try {
603                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
604                            }
605                            catch (Exception e) {
606                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
607                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
608                                    }
609    
610                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
611                            }
612    
613                            return (java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry>)returnObj;
614                    }
615                    catch (com.liferay.portal.kernel.exception.SystemException se) {
616                            _log.error(se, se);
617    
618                            throw se;
619                    }
620            }
621    
622            public static int getGroupFileEntriesCount(HttpPrincipal httpPrincipal,
623                    long groupId, long userId)
624                    throws com.liferay.portal.kernel.exception.SystemException {
625                    try {
626                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
627                                            "getGroupFileEntriesCount", long.class, long.class);
628    
629                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
630                                            userId);
631    
632                            Object returnObj = null;
633    
634                            try {
635                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
636                            }
637                            catch (Exception e) {
638                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
639                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
640                                    }
641    
642                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
643                            }
644    
645                            return ((Integer)returnObj).intValue();
646                    }
647                    catch (com.liferay.portal.kernel.exception.SystemException se) {
648                            _log.error(se, se);
649    
650                            throw se;
651                    }
652            }
653    
654            public static boolean hasFileEntryLock(HttpPrincipal httpPrincipal,
655                    long groupId, long folderId, java.lang.String name)
656                    throws com.liferay.portal.kernel.exception.PortalException,
657                            com.liferay.portal.kernel.exception.SystemException {
658                    try {
659                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
660                                            "hasFileEntryLock", long.class, long.class,
661                                            java.lang.String.class);
662    
663                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
664                                            folderId, name);
665    
666                            Object returnObj = null;
667    
668                            try {
669                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
670                            }
671                            catch (Exception e) {
672                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
673                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
674                                    }
675    
676                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
677                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
678                                    }
679    
680                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
681                            }
682    
683                            return ((Boolean)returnObj).booleanValue();
684                    }
685                    catch (com.liferay.portal.kernel.exception.SystemException se) {
686                            _log.error(se, se);
687    
688                            throw se;
689                    }
690            }
691    
692            public static com.liferay.portal.model.Lock lockFileEntry(
693                    HttpPrincipal httpPrincipal, long groupId, long folderId,
694                    java.lang.String name)
695                    throws com.liferay.portal.kernel.exception.PortalException,
696                            com.liferay.portal.kernel.exception.SystemException {
697                    try {
698                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
699                                            "lockFileEntry", long.class, long.class,
700                                            java.lang.String.class);
701    
702                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
703                                            folderId, name);
704    
705                            Object returnObj = null;
706    
707                            try {
708                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
709                            }
710                            catch (Exception e) {
711                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
712                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
713                                    }
714    
715                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
716                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
717                                    }
718    
719                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
720                            }
721    
722                            return (com.liferay.portal.model.Lock)returnObj;
723                    }
724                    catch (com.liferay.portal.kernel.exception.SystemException se) {
725                            _log.error(se, se);
726    
727                            throw se;
728                    }
729            }
730    
731            public static com.liferay.portal.model.Lock lockFileEntry(
732                    HttpPrincipal httpPrincipal, long groupId, long folderId,
733                    java.lang.String name, java.lang.String owner, long expirationTime)
734                    throws com.liferay.portal.kernel.exception.PortalException,
735                            com.liferay.portal.kernel.exception.SystemException {
736                    try {
737                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
738                                            "lockFileEntry", long.class, long.class,
739                                            java.lang.String.class, java.lang.String.class, long.class);
740    
741                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
742                                            folderId, name, owner, expirationTime);
743    
744                            Object returnObj = null;
745    
746                            try {
747                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
748                            }
749                            catch (Exception e) {
750                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
751                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
752                                    }
753    
754                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
755                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
756                                    }
757    
758                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
759                            }
760    
761                            return (com.liferay.portal.model.Lock)returnObj;
762                    }
763                    catch (com.liferay.portal.kernel.exception.SystemException se) {
764                            _log.error(se, se);
765    
766                            throw se;
767                    }
768            }
769    
770            public static com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
771                    HttpPrincipal httpPrincipal, long groupId, long folderId,
772                    long newFolderId, java.lang.String name,
773                    com.liferay.portal.service.ServiceContext serviceContext)
774                    throws com.liferay.portal.kernel.exception.PortalException,
775                            com.liferay.portal.kernel.exception.SystemException {
776                    try {
777                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
778                                            "moveFileEntry", long.class, long.class, long.class,
779                                            java.lang.String.class,
780                                            com.liferay.portal.service.ServiceContext.class);
781    
782                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
783                                            folderId, newFolderId, name, serviceContext);
784    
785                            Object returnObj = null;
786    
787                            try {
788                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
789                            }
790                            catch (Exception e) {
791                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
792                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
793                                    }
794    
795                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
796                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
797                                    }
798    
799                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
800                            }
801    
802                            return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
803                    }
804                    catch (com.liferay.portal.kernel.exception.SystemException se) {
805                            _log.error(se, se);
806    
807                            throw se;
808                    }
809            }
810    
811            public static com.liferay.portal.model.Lock refreshFileEntryLock(
812                    HttpPrincipal httpPrincipal, java.lang.String lockUuid,
813                    long expirationTime)
814                    throws com.liferay.portal.kernel.exception.PortalException,
815                            com.liferay.portal.kernel.exception.SystemException {
816                    try {
817                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
818                                            "refreshFileEntryLock", java.lang.String.class, long.class);
819    
820                            MethodHandler methodHandler = new MethodHandler(methodKey,
821                                            lockUuid, expirationTime);
822    
823                            Object returnObj = null;
824    
825                            try {
826                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
827                            }
828                            catch (Exception e) {
829                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
830                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
831                                    }
832    
833                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
834                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
835                                    }
836    
837                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
838                            }
839    
840                            return (com.liferay.portal.model.Lock)returnObj;
841                    }
842                    catch (com.liferay.portal.kernel.exception.SystemException se) {
843                            _log.error(se, se);
844    
845                            throw se;
846                    }
847            }
848    
849            public static void unlockFileEntry(HttpPrincipal httpPrincipal,
850                    long groupId, long folderId, java.lang.String name)
851                    throws com.liferay.portal.kernel.exception.SystemException {
852                    try {
853                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
854                                            "unlockFileEntry", long.class, long.class,
855                                            java.lang.String.class);
856    
857                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
858                                            folderId, name);
859    
860                            try {
861                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
862                            }
863                            catch (Exception e) {
864                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
865                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
866                                    }
867    
868                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
869                            }
870                    }
871                    catch (com.liferay.portal.kernel.exception.SystemException se) {
872                            _log.error(se, se);
873    
874                            throw se;
875                    }
876            }
877    
878            public static void unlockFileEntry(HttpPrincipal httpPrincipal,
879                    long groupId, long folderId, java.lang.String name,
880                    java.lang.String lockUuid)
881                    throws com.liferay.portal.kernel.exception.PortalException,
882                            com.liferay.portal.kernel.exception.SystemException {
883                    try {
884                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
885                                            "unlockFileEntry", long.class, long.class,
886                                            java.lang.String.class, java.lang.String.class);
887    
888                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
889                                            folderId, name, lockUuid);
890    
891                            try {
892                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
893                            }
894                            catch (Exception e) {
895                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
896                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
897                                    }
898    
899                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
900                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
901                                    }
902    
903                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
904                            }
905                    }
906                    catch (com.liferay.portal.kernel.exception.SystemException se) {
907                            _log.error(se, se);
908    
909                            throw se;
910                    }
911            }
912    
913            public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
914                    HttpPrincipal httpPrincipal, long groupId, long folderId,
915                    java.lang.String name, java.lang.String sourceFileName,
916                    java.lang.String title, java.lang.String description,
917                    java.lang.String changeLog, boolean majorVersion,
918                    java.lang.String extraSettings, byte[] bytes,
919                    com.liferay.portal.service.ServiceContext serviceContext)
920                    throws com.liferay.portal.kernel.exception.PortalException,
921                            com.liferay.portal.kernel.exception.SystemException {
922                    try {
923                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
924                                            "updateFileEntry", long.class, long.class,
925                                            java.lang.String.class, java.lang.String.class,
926                                            java.lang.String.class, java.lang.String.class,
927                                            java.lang.String.class, boolean.class,
928                                            java.lang.String.class, byte[].class,
929                                            com.liferay.portal.service.ServiceContext.class);
930    
931                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
932                                            folderId, name, sourceFileName, title, description,
933                                            changeLog, majorVersion, extraSettings, bytes,
934                                            serviceContext);
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 updateFileEntry(
963                    HttpPrincipal httpPrincipal, long groupId, long folderId,
964                    java.lang.String name, java.lang.String sourceFileName,
965                    java.lang.String title, java.lang.String description,
966                    java.lang.String changeLog, boolean majorVersion,
967                    java.lang.String extraSettings, java.io.File file,
968                    com.liferay.portal.service.ServiceContext serviceContext)
969                    throws com.liferay.portal.kernel.exception.PortalException,
970                            com.liferay.portal.kernel.exception.SystemException {
971                    try {
972                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
973                                            "updateFileEntry", long.class, long.class,
974                                            java.lang.String.class, java.lang.String.class,
975                                            java.lang.String.class, java.lang.String.class,
976                                            java.lang.String.class, boolean.class,
977                                            java.lang.String.class, java.io.File.class,
978                                            com.liferay.portal.service.ServiceContext.class);
979    
980                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
981                                            folderId, name, sourceFileName, title, description,
982                                            changeLog, majorVersion, extraSettings, file, serviceContext);
983    
984                            Object returnObj = null;
985    
986                            try {
987                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
988                            }
989                            catch (Exception e) {
990                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
991                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
992                                    }
993    
994                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
995                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
996                                    }
997    
998                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
999                            }
1000    
1001                            return (com.liferay.portlet.documentlibrary.model.DLFileEntry)returnObj;
1002                    }
1003                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1004                            _log.error(se, se);
1005    
1006                            throw se;
1007                    }
1008            }
1009    
1010            public static boolean verifyFileEntryLock(HttpPrincipal httpPrincipal,
1011                    long groupId, long folderId, java.lang.String name,
1012                    java.lang.String lockUuid)
1013                    throws com.liferay.portal.kernel.exception.PortalException,
1014                            com.liferay.portal.kernel.exception.SystemException {
1015                    try {
1016                            MethodKey methodKey = new MethodKey(DLFileEntryServiceUtil.class.getName(),
1017                                            "verifyFileEntryLock", long.class, long.class,
1018                                            java.lang.String.class, java.lang.String.class);
1019    
1020                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
1021                                            folderId, name, lockUuid);
1022    
1023                            Object returnObj = null;
1024    
1025                            try {
1026                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1027                            }
1028                            catch (Exception e) {
1029                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1030                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1031                                    }
1032    
1033                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1034                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1035                                    }
1036    
1037                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1038                            }
1039    
1040                            return ((Boolean)returnObj).booleanValue();
1041                    }
1042                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1043                            _log.error(se, se);
1044    
1045                            throw se;
1046                    }
1047            }
1048    
1049            private static Log _log = LogFactoryUtil.getLog(DLFileEntryServiceHttp.class);
1050    }