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.BooleanWrapper;
020    import com.liferay.portal.kernel.util.IntegerWrapper;
021    import com.liferay.portal.kernel.util.LongWrapper;
022    import com.liferay.portal.kernel.util.MethodWrapper;
023    import com.liferay.portal.kernel.util.NullWrapper;
024    import com.liferay.portal.security.auth.HttpPrincipal;
025    import com.liferay.portal.service.http.TunnelUtil;
026    
027    import com.liferay.portlet.documentlibrary.service.DLFolderServiceUtil;
028    
029    /**
030     * <p>
031     * This class provides a HTTP utility for the
032     * {@link com.liferay.portlet.documentlibrary.service.DLFolderServiceUtil} service utility. The
033     * static methods of this class calls the same methods of the service utility.
034     * However, the signatures are different because it requires an additional
035     * {@link com.liferay.portal.security.auth.HttpPrincipal} parameter.
036     * </p>
037     *
038     * <p>
039     * The benefits of using the HTTP utility is that it is fast and allows for
040     * tunneling without the cost of serializing to text. The drawback is that it
041     * only works with Java.
042     * </p>
043     *
044     * <p>
045     * Set the property <b>tunnel.servlet.hosts.allowed</b> in portal.properties to
046     * configure security.
047     * </p>
048     *
049     * <p>
050     * The HTTP utility is only generated for remote services.
051     * </p>
052     *
053     * @author    Brian Wing Shun Chan
054     * @see       DLFolderServiceSoap
055     * @see       com.liferay.portal.security.auth.HttpPrincipal
056     * @see       com.liferay.portlet.documentlibrary.service.DLFolderServiceUtil
057     * @generated
058     */
059    public class DLFolderServiceHttp {
060            public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
061                    HttpPrincipal httpPrincipal, long groupId, long parentFolderId,
062                    java.lang.String name, java.lang.String description,
063                    com.liferay.portal.service.ServiceContext serviceContext)
064                    throws com.liferay.portal.kernel.exception.PortalException,
065                            com.liferay.portal.kernel.exception.SystemException {
066                    try {
067                            Object paramObj0 = new LongWrapper(groupId);
068    
069                            Object paramObj1 = new LongWrapper(parentFolderId);
070    
071                            Object paramObj2 = name;
072    
073                            if (name == null) {
074                                    paramObj2 = new NullWrapper("java.lang.String");
075                            }
076    
077                            Object paramObj3 = description;
078    
079                            if (description == null) {
080                                    paramObj3 = new NullWrapper("java.lang.String");
081                            }
082    
083                            Object paramObj4 = serviceContext;
084    
085                            if (serviceContext == null) {
086                                    paramObj4 = new NullWrapper(
087                                                    "com.liferay.portal.service.ServiceContext");
088                            }
089    
090                            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
091                                            "addFolder",
092                                            new Object[] {
093                                                    paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
094                                            });
095    
096                            Object returnObj = null;
097    
098                            try {
099                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
100                            }
101                            catch (Exception e) {
102                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
103                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
104                                    }
105    
106                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
107                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
108                                    }
109    
110                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
111                            }
112    
113                            return (com.liferay.portlet.documentlibrary.model.DLFolder)returnObj;
114                    }
115                    catch (com.liferay.portal.kernel.exception.SystemException se) {
116                            _log.error(se, se);
117    
118                            throw se;
119                    }
120            }
121    
122            public static com.liferay.portlet.documentlibrary.model.DLFolder copyFolder(
123                    HttpPrincipal httpPrincipal, long groupId, long sourceFolderId,
124                    long parentFolderId, java.lang.String name,
125                    java.lang.String description,
126                    com.liferay.portal.service.ServiceContext serviceContext)
127                    throws com.liferay.portal.kernel.exception.PortalException,
128                            com.liferay.portal.kernel.exception.SystemException,
129                            java.rmi.RemoteException {
130                    try {
131                            Object paramObj0 = new LongWrapper(groupId);
132    
133                            Object paramObj1 = new LongWrapper(sourceFolderId);
134    
135                            Object paramObj2 = new LongWrapper(parentFolderId);
136    
137                            Object paramObj3 = name;
138    
139                            if (name == null) {
140                                    paramObj3 = new NullWrapper("java.lang.String");
141                            }
142    
143                            Object paramObj4 = description;
144    
145                            if (description == null) {
146                                    paramObj4 = new NullWrapper("java.lang.String");
147                            }
148    
149                            Object paramObj5 = serviceContext;
150    
151                            if (serviceContext == null) {
152                                    paramObj5 = new NullWrapper(
153                                                    "com.liferay.portal.service.ServiceContext");
154                            }
155    
156                            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
157                                            "copyFolder",
158                                            new Object[] {
159                                                    paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
160                                                    paramObj5
161                                            });
162    
163                            Object returnObj = null;
164    
165                            try {
166                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
167                            }
168                            catch (Exception e) {
169                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
170                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
171                                    }
172    
173                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
174                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
175                                    }
176    
177                                    if (e instanceof java.rmi.RemoteException) {
178                                            throw (java.rmi.RemoteException)e;
179                                    }
180    
181                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
182                            }
183    
184                            return (com.liferay.portlet.documentlibrary.model.DLFolder)returnObj;
185                    }
186                    catch (com.liferay.portal.kernel.exception.SystemException se) {
187                            _log.error(se, se);
188    
189                            throw se;
190                    }
191            }
192    
193            public static void deleteFolder(HttpPrincipal httpPrincipal, long folderId)
194                    throws com.liferay.portal.kernel.exception.PortalException,
195                            com.liferay.portal.kernel.exception.SystemException,
196                            java.rmi.RemoteException {
197                    try {
198                            Object paramObj0 = new LongWrapper(folderId);
199    
200                            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
201                                            "deleteFolder", new Object[] { paramObj0 });
202    
203                            try {
204                                    TunnelUtil.invoke(httpPrincipal, methodWrapper);
205                            }
206                            catch (Exception e) {
207                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
208                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
209                                    }
210    
211                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
212                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
213                                    }
214    
215                                    if (e instanceof java.rmi.RemoteException) {
216                                            throw (java.rmi.RemoteException)e;
217                                    }
218    
219                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
220                            }
221                    }
222                    catch (com.liferay.portal.kernel.exception.SystemException se) {
223                            _log.error(se, se);
224    
225                            throw se;
226                    }
227            }
228    
229            public static void deleteFolder(HttpPrincipal httpPrincipal, long groupId,
230                    long parentFolderId, java.lang.String name)
231                    throws com.liferay.portal.kernel.exception.PortalException,
232                            com.liferay.portal.kernel.exception.SystemException,
233                            java.rmi.RemoteException {
234                    try {
235                            Object paramObj0 = new LongWrapper(groupId);
236    
237                            Object paramObj1 = new LongWrapper(parentFolderId);
238    
239                            Object paramObj2 = name;
240    
241                            if (name == null) {
242                                    paramObj2 = new NullWrapper("java.lang.String");
243                            }
244    
245                            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
246                                            "deleteFolder",
247                                            new Object[] { paramObj0, paramObj1, paramObj2 });
248    
249                            try {
250                                    TunnelUtil.invoke(httpPrincipal, methodWrapper);
251                            }
252                            catch (Exception e) {
253                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
254                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
255                                    }
256    
257                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
258                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
259                                    }
260    
261                                    if (e instanceof java.rmi.RemoteException) {
262                                            throw (java.rmi.RemoteException)e;
263                                    }
264    
265                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
266                            }
267                    }
268                    catch (com.liferay.portal.kernel.exception.SystemException se) {
269                            _log.error(se, se);
270    
271                            throw se;
272                    }
273            }
274    
275            public static java.util.List<java.lang.Object> getFileEntriesAndFileShortcuts(
276                    HttpPrincipal httpPrincipal, long groupId,
277                    java.util.List<java.lang.Long> folderIds, int status, int start, int end)
278                    throws com.liferay.portal.kernel.exception.SystemException {
279                    try {
280                            Object paramObj0 = new LongWrapper(groupId);
281    
282                            Object paramObj1 = folderIds;
283    
284                            if (folderIds == null) {
285                                    paramObj1 = new NullWrapper("java.util.List");
286                            }
287    
288                            Object paramObj2 = new IntegerWrapper(status);
289    
290                            Object paramObj3 = new IntegerWrapper(start);
291    
292                            Object paramObj4 = new IntegerWrapper(end);
293    
294                            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
295                                            "getFileEntriesAndFileShortcuts",
296                                            new Object[] {
297                                                    paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
298                                            });
299    
300                            Object returnObj = null;
301    
302                            try {
303                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
304                            }
305                            catch (Exception e) {
306                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
307                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
308                                    }
309    
310                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
311                            }
312    
313                            return (java.util.List<java.lang.Object>)returnObj;
314                    }
315                    catch (com.liferay.portal.kernel.exception.SystemException se) {
316                            _log.error(se, se);
317    
318                            throw se;
319                    }
320            }
321    
322            public static java.util.List<java.lang.Object> getFileEntriesAndFileShortcuts(
323                    HttpPrincipal httpPrincipal, long groupId, long folderId, int status,
324                    int start, int end)
325                    throws com.liferay.portal.kernel.exception.SystemException {
326                    try {
327                            Object paramObj0 = new LongWrapper(groupId);
328    
329                            Object paramObj1 = new LongWrapper(folderId);
330    
331                            Object paramObj2 = new IntegerWrapper(status);
332    
333                            Object paramObj3 = new IntegerWrapper(start);
334    
335                            Object paramObj4 = new IntegerWrapper(end);
336    
337                            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
338                                            "getFileEntriesAndFileShortcuts",
339                                            new Object[] {
340                                                    paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
341                                            });
342    
343                            Object returnObj = null;
344    
345                            try {
346                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
347                            }
348                            catch (Exception e) {
349                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
350                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
351                                    }
352    
353                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
354                            }
355    
356                            return (java.util.List<java.lang.Object>)returnObj;
357                    }
358                    catch (com.liferay.portal.kernel.exception.SystemException se) {
359                            _log.error(se, se);
360    
361                            throw se;
362                    }
363            }
364    
365            public static int getFileEntriesAndFileShortcutsCount(
366                    HttpPrincipal httpPrincipal, long groupId,
367                    java.util.List<java.lang.Long> folderIds, int status)
368                    throws com.liferay.portal.kernel.exception.SystemException {
369                    try {
370                            Object paramObj0 = new LongWrapper(groupId);
371    
372                            Object paramObj1 = folderIds;
373    
374                            if (folderIds == null) {
375                                    paramObj1 = new NullWrapper("java.util.List");
376                            }
377    
378                            Object paramObj2 = new IntegerWrapper(status);
379    
380                            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
381                                            "getFileEntriesAndFileShortcutsCount",
382                                            new Object[] { paramObj0, paramObj1, paramObj2 });
383    
384                            Object returnObj = null;
385    
386                            try {
387                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
388                            }
389                            catch (Exception e) {
390                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
391                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
392                                    }
393    
394                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
395                            }
396    
397                            return ((Integer)returnObj).intValue();
398                    }
399                    catch (com.liferay.portal.kernel.exception.SystemException se) {
400                            _log.error(se, se);
401    
402                            throw se;
403                    }
404            }
405    
406            public static int getFileEntriesAndFileShortcutsCount(
407                    HttpPrincipal httpPrincipal, long groupId, long folderId, int status)
408                    throws com.liferay.portal.kernel.exception.SystemException {
409                    try {
410                            Object paramObj0 = new LongWrapper(groupId);
411    
412                            Object paramObj1 = new LongWrapper(folderId);
413    
414                            Object paramObj2 = new IntegerWrapper(status);
415    
416                            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
417                                            "getFileEntriesAndFileShortcutsCount",
418                                            new Object[] { paramObj0, paramObj1, paramObj2 });
419    
420                            Object returnObj = null;
421    
422                            try {
423                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
424                            }
425                            catch (Exception e) {
426                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
427                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
428                                    }
429    
430                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
431                            }
432    
433                            return ((Integer)returnObj).intValue();
434                    }
435                    catch (com.liferay.portal.kernel.exception.SystemException se) {
436                            _log.error(se, se);
437    
438                            throw se;
439                    }
440            }
441    
442            public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
443                    HttpPrincipal httpPrincipal, long folderId)
444                    throws com.liferay.portal.kernel.exception.PortalException,
445                            com.liferay.portal.kernel.exception.SystemException {
446                    try {
447                            Object paramObj0 = new LongWrapper(folderId);
448    
449                            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
450                                            "getFolder", new Object[] { paramObj0 });
451    
452                            Object returnObj = null;
453    
454                            try {
455                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
456                            }
457                            catch (Exception e) {
458                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
459                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
460                                    }
461    
462                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
463                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
464                                    }
465    
466                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
467                            }
468    
469                            return (com.liferay.portlet.documentlibrary.model.DLFolder)returnObj;
470                    }
471                    catch (com.liferay.portal.kernel.exception.SystemException se) {
472                            _log.error(se, se);
473    
474                            throw se;
475                    }
476            }
477    
478            public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
479                    HttpPrincipal httpPrincipal, long groupId, long parentFolderId,
480                    java.lang.String name)
481                    throws com.liferay.portal.kernel.exception.PortalException,
482                            com.liferay.portal.kernel.exception.SystemException {
483                    try {
484                            Object paramObj0 = new LongWrapper(groupId);
485    
486                            Object paramObj1 = new LongWrapper(parentFolderId);
487    
488                            Object paramObj2 = name;
489    
490                            if (name == null) {
491                                    paramObj2 = new NullWrapper("java.lang.String");
492                            }
493    
494                            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
495                                            "getFolder",
496                                            new Object[] { paramObj0, paramObj1, paramObj2 });
497    
498                            Object returnObj = null;
499    
500                            try {
501                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
502                            }
503                            catch (Exception e) {
504                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
505                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
506                                    }
507    
508                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
509                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
510                                    }
511    
512                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
513                            }
514    
515                            return (com.liferay.portlet.documentlibrary.model.DLFolder)returnObj;
516                    }
517                    catch (com.liferay.portal.kernel.exception.SystemException se) {
518                            _log.error(se, se);
519    
520                            throw se;
521                    }
522            }
523    
524            public static long getFolderId(HttpPrincipal httpPrincipal, long groupId,
525                    long parentFolderId, java.lang.String name)
526                    throws com.liferay.portal.kernel.exception.PortalException,
527                            com.liferay.portal.kernel.exception.SystemException {
528                    try {
529                            Object paramObj0 = new LongWrapper(groupId);
530    
531                            Object paramObj1 = new LongWrapper(parentFolderId);
532    
533                            Object paramObj2 = name;
534    
535                            if (name == null) {
536                                    paramObj2 = new NullWrapper("java.lang.String");
537                            }
538    
539                            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
540                                            "getFolderId",
541                                            new Object[] { paramObj0, paramObj1, paramObj2 });
542    
543                            Object returnObj = null;
544    
545                            try {
546                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
547                            }
548                            catch (Exception e) {
549                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
550                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
551                                    }
552    
553                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
554                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
555                                    }
556    
557                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
558                            }
559    
560                            return ((Long)returnObj).longValue();
561                    }
562                    catch (com.liferay.portal.kernel.exception.SystemException se) {
563                            _log.error(se, se);
564    
565                            throw se;
566                    }
567            }
568    
569            public static long[] getFolderIds(HttpPrincipal httpPrincipal,
570                    long groupId, long folderId)
571                    throws com.liferay.portal.kernel.exception.SystemException {
572                    try {
573                            Object paramObj0 = new LongWrapper(groupId);
574    
575                            Object paramObj1 = new LongWrapper(folderId);
576    
577                            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
578                                            "getFolderIds", new Object[] { paramObj0, paramObj1 });
579    
580                            Object returnObj = null;
581    
582                            try {
583                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
584                            }
585                            catch (Exception e) {
586                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
587                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
588                                    }
589    
590                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
591                            }
592    
593                            return (long[])returnObj;
594                    }
595                    catch (com.liferay.portal.kernel.exception.SystemException se) {
596                            _log.error(se, se);
597    
598                            throw se;
599                    }
600            }
601    
602            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
603                    HttpPrincipal httpPrincipal, long groupId, long parentFolderId)
604                    throws com.liferay.portal.kernel.exception.SystemException {
605                    try {
606                            Object paramObj0 = new LongWrapper(groupId);
607    
608                            Object paramObj1 = new LongWrapper(parentFolderId);
609    
610                            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
611                                            "getFolders", new Object[] { paramObj0, paramObj1 });
612    
613                            Object returnObj = null;
614    
615                            try {
616                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
617                            }
618                            catch (Exception e) {
619                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
620                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
621                                    }
622    
623                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
624                            }
625    
626                            return (java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder>)returnObj;
627                    }
628                    catch (com.liferay.portal.kernel.exception.SystemException se) {
629                            _log.error(se, se);
630    
631                            throw se;
632                    }
633            }
634    
635            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
636                    HttpPrincipal httpPrincipal, long groupId, long parentFolderId,
637                    int start, int end)
638                    throws com.liferay.portal.kernel.exception.SystemException {
639                    try {
640                            Object paramObj0 = new LongWrapper(groupId);
641    
642                            Object paramObj1 = new LongWrapper(parentFolderId);
643    
644                            Object paramObj2 = new IntegerWrapper(start);
645    
646                            Object paramObj3 = new IntegerWrapper(end);
647    
648                            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
649                                            "getFolders",
650                                            new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
651    
652                            Object returnObj = null;
653    
654                            try {
655                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
656                            }
657                            catch (Exception e) {
658                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
659                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
660                                    }
661    
662                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
663                            }
664    
665                            return (java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder>)returnObj;
666                    }
667                    catch (com.liferay.portal.kernel.exception.SystemException se) {
668                            _log.error(se, se);
669    
670                            throw se;
671                    }
672            }
673    
674            public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
675                    HttpPrincipal httpPrincipal, long groupId,
676                    java.util.List<java.lang.Long> folderIds, int status, int start, int end)
677                    throws com.liferay.portal.kernel.exception.SystemException {
678                    try {
679                            Object paramObj0 = new LongWrapper(groupId);
680    
681                            Object paramObj1 = folderIds;
682    
683                            if (folderIds == null) {
684                                    paramObj1 = new NullWrapper("java.util.List");
685                            }
686    
687                            Object paramObj2 = new IntegerWrapper(status);
688    
689                            Object paramObj3 = new IntegerWrapper(start);
690    
691                            Object paramObj4 = new IntegerWrapper(end);
692    
693                            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
694                                            "getFoldersAndFileEntriesAndFileShortcuts",
695                                            new Object[] {
696                                                    paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
697                                            });
698    
699                            Object returnObj = null;
700    
701                            try {
702                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
703                            }
704                            catch (Exception e) {
705                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
706                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
707                                    }
708    
709                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
710                            }
711    
712                            return (java.util.List<java.lang.Object>)returnObj;
713                    }
714                    catch (com.liferay.portal.kernel.exception.SystemException se) {
715                            _log.error(se, se);
716    
717                            throw se;
718                    }
719            }
720    
721            public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
722                    HttpPrincipal httpPrincipal, long groupId, long folderId, int status,
723                    int start, int end)
724                    throws com.liferay.portal.kernel.exception.PortalException,
725                            com.liferay.portal.kernel.exception.SystemException {
726                    try {
727                            Object paramObj0 = new LongWrapper(groupId);
728    
729                            Object paramObj1 = new LongWrapper(folderId);
730    
731                            Object paramObj2 = new IntegerWrapper(status);
732    
733                            Object paramObj3 = new IntegerWrapper(start);
734    
735                            Object paramObj4 = new IntegerWrapper(end);
736    
737                            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
738                                            "getFoldersAndFileEntriesAndFileShortcuts",
739                                            new Object[] {
740                                                    paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
741                                            });
742    
743                            Object returnObj = null;
744    
745                            try {
746                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
747                            }
748                            catch (Exception e) {
749                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
750                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
751                                    }
752    
753                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
754                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
755                                    }
756    
757                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
758                            }
759    
760                            return (java.util.List<java.lang.Object>)returnObj;
761                    }
762                    catch (com.liferay.portal.kernel.exception.SystemException se) {
763                            _log.error(se, se);
764    
765                            throw se;
766                    }
767            }
768    
769            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
770                    HttpPrincipal httpPrincipal, long groupId,
771                    java.util.List<java.lang.Long> folderIds, int status)
772                    throws com.liferay.portal.kernel.exception.SystemException {
773                    try {
774                            Object paramObj0 = new LongWrapper(groupId);
775    
776                            Object paramObj1 = folderIds;
777    
778                            if (folderIds == null) {
779                                    paramObj1 = new NullWrapper("java.util.List");
780                            }
781    
782                            Object paramObj2 = new IntegerWrapper(status);
783    
784                            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
785                                            "getFoldersAndFileEntriesAndFileShortcutsCount",
786                                            new Object[] { paramObj0, paramObj1, paramObj2 });
787    
788                            Object returnObj = null;
789    
790                            try {
791                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
792                            }
793                            catch (Exception e) {
794                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
795                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
796                                    }
797    
798                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
799                            }
800    
801                            return ((Integer)returnObj).intValue();
802                    }
803                    catch (com.liferay.portal.kernel.exception.SystemException se) {
804                            _log.error(se, se);
805    
806                            throw se;
807                    }
808            }
809    
810            public static int getFoldersAndFileEntriesAndFileShortcutsCount(
811                    HttpPrincipal httpPrincipal, long groupId, long folderId, int status)
812                    throws com.liferay.portal.kernel.exception.PortalException,
813                            com.liferay.portal.kernel.exception.SystemException {
814                    try {
815                            Object paramObj0 = new LongWrapper(groupId);
816    
817                            Object paramObj1 = new LongWrapper(folderId);
818    
819                            Object paramObj2 = new IntegerWrapper(status);
820    
821                            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
822                                            "getFoldersAndFileEntriesAndFileShortcutsCount",
823                                            new Object[] { paramObj0, paramObj1, paramObj2 });
824    
825                            Object returnObj = null;
826    
827                            try {
828                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
829                            }
830                            catch (Exception e) {
831                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
832                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
833                                    }
834    
835                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
836                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
837                                    }
838    
839                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
840                            }
841    
842                            return ((Integer)returnObj).intValue();
843                    }
844                    catch (com.liferay.portal.kernel.exception.SystemException se) {
845                            _log.error(se, se);
846    
847                            throw se;
848                    }
849            }
850    
851            public static int getFoldersCount(HttpPrincipal httpPrincipal,
852                    long groupId, long parentFolderId)
853                    throws com.liferay.portal.kernel.exception.SystemException {
854                    try {
855                            Object paramObj0 = new LongWrapper(groupId);
856    
857                            Object paramObj1 = new LongWrapper(parentFolderId);
858    
859                            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
860                                            "getFoldersCount", new Object[] { paramObj0, paramObj1 });
861    
862                            Object returnObj = null;
863    
864                            try {
865                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
866                            }
867                            catch (Exception e) {
868                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
869                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
870                                    }
871    
872                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
873                            }
874    
875                            return ((Integer)returnObj).intValue();
876                    }
877                    catch (com.liferay.portal.kernel.exception.SystemException se) {
878                            _log.error(se, se);
879    
880                            throw se;
881                    }
882            }
883    
884            public static void getSubfolderIds(HttpPrincipal httpPrincipal,
885                    java.util.List<java.lang.Long> folderIds, long groupId, long folderId)
886                    throws com.liferay.portal.kernel.exception.SystemException {
887                    try {
888                            Object paramObj0 = folderIds;
889    
890                            if (folderIds == null) {
891                                    paramObj0 = new NullWrapper("java.util.List");
892                            }
893    
894                            Object paramObj1 = new LongWrapper(groupId);
895    
896                            Object paramObj2 = new LongWrapper(folderId);
897    
898                            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
899                                            "getSubfolderIds",
900                                            new Object[] { paramObj0, paramObj1, paramObj2 });
901    
902                            try {
903                                    TunnelUtil.invoke(httpPrincipal, methodWrapper);
904                            }
905                            catch (Exception e) {
906                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
907                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
908                                    }
909    
910                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
911                            }
912                    }
913                    catch (com.liferay.portal.kernel.exception.SystemException se) {
914                            _log.error(se, se);
915    
916                            throw se;
917                    }
918            }
919    
920            public static boolean hasInheritableLock(HttpPrincipal httpPrincipal,
921                    long folderId)
922                    throws com.liferay.portal.kernel.exception.PortalException,
923                            com.liferay.portal.kernel.exception.SystemException {
924                    try {
925                            Object paramObj0 = new LongWrapper(folderId);
926    
927                            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
928                                            "hasInheritableLock", new Object[] { paramObj0 });
929    
930                            Object returnObj = null;
931    
932                            try {
933                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
934                            }
935                            catch (Exception e) {
936                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
937                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
938                                    }
939    
940                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
941                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
942                                    }
943    
944                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
945                            }
946    
947                            return ((Boolean)returnObj).booleanValue();
948                    }
949                    catch (com.liferay.portal.kernel.exception.SystemException se) {
950                            _log.error(se, se);
951    
952                            throw se;
953                    }
954            }
955    
956            public static com.liferay.portal.model.Lock lockFolder(
957                    HttpPrincipal httpPrincipal, long folderId)
958                    throws com.liferay.portal.kernel.exception.PortalException,
959                            com.liferay.portal.kernel.exception.SystemException,
960                            java.rmi.RemoteException {
961                    try {
962                            Object paramObj0 = new LongWrapper(folderId);
963    
964                            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
965                                            "lockFolder", new Object[] { paramObj0 });
966    
967                            Object returnObj = null;
968    
969                            try {
970                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
971                            }
972                            catch (Exception e) {
973                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
974                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
975                                    }
976    
977                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
978                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
979                                    }
980    
981                                    if (e instanceof java.rmi.RemoteException) {
982                                            throw (java.rmi.RemoteException)e;
983                                    }
984    
985                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
986                            }
987    
988                            return (com.liferay.portal.model.Lock)returnObj;
989                    }
990                    catch (com.liferay.portal.kernel.exception.SystemException se) {
991                            _log.error(se, se);
992    
993                            throw se;
994                    }
995            }
996    
997            public static com.liferay.portal.model.Lock lockFolder(
998                    HttpPrincipal httpPrincipal, long folderId, java.lang.String owner,
999                    boolean inheritable, long expirationTime)
1000                    throws com.liferay.portal.kernel.exception.PortalException,
1001                            com.liferay.portal.kernel.exception.SystemException,
1002                            java.rmi.RemoteException {
1003                    try {
1004                            Object paramObj0 = new LongWrapper(folderId);
1005    
1006                            Object paramObj1 = owner;
1007    
1008                            if (owner == null) {
1009                                    paramObj1 = new NullWrapper("java.lang.String");
1010                            }
1011    
1012                            Object paramObj2 = new BooleanWrapper(inheritable);
1013    
1014                            Object paramObj3 = new LongWrapper(expirationTime);
1015    
1016                            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
1017                                            "lockFolder",
1018                                            new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1019    
1020                            Object returnObj = null;
1021    
1022                            try {
1023                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1024                            }
1025                            catch (Exception e) {
1026                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1027                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1028                                    }
1029    
1030                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1031                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1032                                    }
1033    
1034                                    if (e instanceof java.rmi.RemoteException) {
1035                                            throw (java.rmi.RemoteException)e;
1036                                    }
1037    
1038                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1039                            }
1040    
1041                            return (com.liferay.portal.model.Lock)returnObj;
1042                    }
1043                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1044                            _log.error(se, se);
1045    
1046                            throw se;
1047                    }
1048            }
1049    
1050            public static com.liferay.portal.model.Lock refreshFolderLock(
1051                    HttpPrincipal httpPrincipal, java.lang.String lockUuid,
1052                    long expirationTime)
1053                    throws com.liferay.portal.kernel.exception.PortalException,
1054                            com.liferay.portal.kernel.exception.SystemException {
1055                    try {
1056                            Object paramObj0 = lockUuid;
1057    
1058                            if (lockUuid == null) {
1059                                    paramObj0 = new NullWrapper("java.lang.String");
1060                            }
1061    
1062                            Object paramObj1 = new LongWrapper(expirationTime);
1063    
1064                            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
1065                                            "refreshFolderLock", new Object[] { paramObj0, paramObj1 });
1066    
1067                            Object returnObj = null;
1068    
1069                            try {
1070                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1071                            }
1072                            catch (Exception e) {
1073                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1074                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1075                                    }
1076    
1077                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1078                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1079                                    }
1080    
1081                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1082                            }
1083    
1084                            return (com.liferay.portal.model.Lock)returnObj;
1085                    }
1086                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1087                            _log.error(se, se);
1088    
1089                            throw se;
1090                    }
1091            }
1092    
1093            public static void unlockFolder(HttpPrincipal httpPrincipal, long groupId,
1094                    long folderId, java.lang.String lockUuid)
1095                    throws com.liferay.portal.kernel.exception.PortalException,
1096                            com.liferay.portal.kernel.exception.SystemException {
1097                    try {
1098                            Object paramObj0 = new LongWrapper(groupId);
1099    
1100                            Object paramObj1 = new LongWrapper(folderId);
1101    
1102                            Object paramObj2 = lockUuid;
1103    
1104                            if (lockUuid == null) {
1105                                    paramObj2 = new NullWrapper("java.lang.String");
1106                            }
1107    
1108                            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
1109                                            "unlockFolder",
1110                                            new Object[] { paramObj0, paramObj1, paramObj2 });
1111    
1112                            try {
1113                                    TunnelUtil.invoke(httpPrincipal, methodWrapper);
1114                            }
1115                            catch (Exception e) {
1116                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1117                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1118                                    }
1119    
1120                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1121                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1122                                    }
1123    
1124                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1125                            }
1126                    }
1127                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1128                            _log.error(se, se);
1129    
1130                            throw se;
1131                    }
1132            }
1133    
1134            public static void unlockFolder(HttpPrincipal httpPrincipal, long groupId,
1135                    long parentFolderId, java.lang.String name, java.lang.String lockUuid)
1136                    throws com.liferay.portal.kernel.exception.PortalException,
1137                            com.liferay.portal.kernel.exception.SystemException {
1138                    try {
1139                            Object paramObj0 = new LongWrapper(groupId);
1140    
1141                            Object paramObj1 = new LongWrapper(parentFolderId);
1142    
1143                            Object paramObj2 = name;
1144    
1145                            if (name == null) {
1146                                    paramObj2 = new NullWrapper("java.lang.String");
1147                            }
1148    
1149                            Object paramObj3 = lockUuid;
1150    
1151                            if (lockUuid == null) {
1152                                    paramObj3 = new NullWrapper("java.lang.String");
1153                            }
1154    
1155                            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
1156                                            "unlockFolder",
1157                                            new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1158    
1159                            try {
1160                                    TunnelUtil.invoke(httpPrincipal, methodWrapper);
1161                            }
1162                            catch (Exception e) {
1163                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1164                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1165                                    }
1166    
1167                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1168                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1169                                    }
1170    
1171                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1172                            }
1173                    }
1174                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1175                            _log.error(se, se);
1176    
1177                            throw se;
1178                    }
1179            }
1180    
1181            public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
1182                    HttpPrincipal httpPrincipal, long folderId, long parentFolderId,
1183                    java.lang.String name, java.lang.String description,
1184                    com.liferay.portal.service.ServiceContext serviceContext)
1185                    throws com.liferay.portal.kernel.exception.PortalException,
1186                            com.liferay.portal.kernel.exception.SystemException,
1187                            java.rmi.RemoteException {
1188                    try {
1189                            Object paramObj0 = new LongWrapper(folderId);
1190    
1191                            Object paramObj1 = new LongWrapper(parentFolderId);
1192    
1193                            Object paramObj2 = name;
1194    
1195                            if (name == null) {
1196                                    paramObj2 = new NullWrapper("java.lang.String");
1197                            }
1198    
1199                            Object paramObj3 = description;
1200    
1201                            if (description == null) {
1202                                    paramObj3 = new NullWrapper("java.lang.String");
1203                            }
1204    
1205                            Object paramObj4 = serviceContext;
1206    
1207                            if (serviceContext == null) {
1208                                    paramObj4 = new NullWrapper(
1209                                                    "com.liferay.portal.service.ServiceContext");
1210                            }
1211    
1212                            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
1213                                            "updateFolder",
1214                                            new Object[] {
1215                                                    paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
1216                                            });
1217    
1218                            Object returnObj = null;
1219    
1220                            try {
1221                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1222                            }
1223                            catch (Exception e) {
1224                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1225                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1226                                    }
1227    
1228                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1229                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1230                                    }
1231    
1232                                    if (e instanceof java.rmi.RemoteException) {
1233                                            throw (java.rmi.RemoteException)e;
1234                                    }
1235    
1236                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1237                            }
1238    
1239                            return (com.liferay.portlet.documentlibrary.model.DLFolder)returnObj;
1240                    }
1241                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1242                            _log.error(se, se);
1243    
1244                            throw se;
1245                    }
1246            }
1247    
1248            public static boolean verifyInheritableLock(HttpPrincipal httpPrincipal,
1249                    long folderId, java.lang.String lockUuid)
1250                    throws com.liferay.portal.kernel.exception.PortalException,
1251                            com.liferay.portal.kernel.exception.SystemException {
1252                    try {
1253                            Object paramObj0 = new LongWrapper(folderId);
1254    
1255                            Object paramObj1 = lockUuid;
1256    
1257                            if (lockUuid == null) {
1258                                    paramObj1 = new NullWrapper("java.lang.String");
1259                            }
1260    
1261                            MethodWrapper methodWrapper = new MethodWrapper(DLFolderServiceUtil.class.getName(),
1262                                            "verifyInheritableLock",
1263                                            new Object[] { paramObj0, paramObj1 });
1264    
1265                            Object returnObj = null;
1266    
1267                            try {
1268                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1269                            }
1270                            catch (Exception e) {
1271                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1272                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1273                                    }
1274    
1275                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1276                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
1277                                    }
1278    
1279                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1280                            }
1281    
1282                            return ((Boolean)returnObj).booleanValue();
1283                    }
1284                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1285                            _log.error(se, se);
1286    
1287                            throw se;
1288                    }
1289            }
1290    
1291            private static Log _log = LogFactoryUtil.getLog(DLFolderServiceHttp.class);
1292    }