001    /**
002     * Copyright (c) 2000-2013 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.ListUtil;
020    
021    import com.liferay.portlet.documentlibrary.service.DLFileEntryServiceUtil;
022    
023    import java.rmi.RemoteException;
024    
025    /**
026     * Provides the SOAP utility for the
027     * {@link com.liferay.portlet.documentlibrary.service.DLFileEntryServiceUtil} service utility. The
028     * static methods of this class calls the same methods of the service utility.
029     * However, the signatures are different because it is difficult for SOAP to
030     * support certain types.
031     *
032     * <p>
033     * ServiceBuilder follows certain rules in translating the methods. For example,
034     * if the method in the service utility returns a {@link java.util.List}, that
035     * is translated to an array of {@link com.liferay.portlet.documentlibrary.model.DLFileEntrySoap}.
036     * If the method in the service utility returns a
037     * {@link com.liferay.portlet.documentlibrary.model.DLFileEntry}, that is translated to a
038     * {@link com.liferay.portlet.documentlibrary.model.DLFileEntrySoap}. Methods that SOAP cannot
039     * safely wire are skipped.
040     * </p>
041     *
042     * <p>
043     * The benefits of using the SOAP utility is that it is cross platform
044     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
045     * even Perl, to call the generated services. One drawback of SOAP is that it is
046     * slow because it needs to serialize all calls into a text format (XML).
047     * </p>
048     *
049     * <p>
050     * You can see a list of services at http://localhost:8080/api/axis. Set the
051     * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
052     * security.
053     * </p>
054     *
055     * <p>
056     * The SOAP utility is only generated for remote services.
057     * </p>
058     *
059     * @author Brian Wing Shun Chan
060     * @see DLFileEntryServiceHttp
061     * @see com.liferay.portlet.documentlibrary.model.DLFileEntrySoap
062     * @see com.liferay.portlet.documentlibrary.service.DLFileEntryServiceUtil
063     * @generated
064     */
065    public class DLFileEntryServiceSoap {
066            public static com.liferay.portlet.documentlibrary.model.DLFileVersionSoap cancelCheckOut(
067                    long fileEntryId) throws RemoteException {
068                    try {
069                            com.liferay.portlet.documentlibrary.model.DLFileVersion returnValue = DLFileEntryServiceUtil.cancelCheckOut(fileEntryId);
070    
071                            return com.liferay.portlet.documentlibrary.model.DLFileVersionSoap.toSoapModel(returnValue);
072                    }
073                    catch (Exception e) {
074                            _log.error(e, e);
075    
076                            throw new RemoteException(e.getMessage());
077                    }
078            }
079    
080            public static void checkInFileEntry(long fileEntryId, boolean major,
081                    java.lang.String changeLog,
082                    com.liferay.portal.service.ServiceContext serviceContext)
083                    throws RemoteException {
084                    try {
085                            DLFileEntryServiceUtil.checkInFileEntry(fileEntryId, major,
086                                    changeLog, serviceContext);
087                    }
088                    catch (Exception e) {
089                            _log.error(e, e);
090    
091                            throw new RemoteException(e.getMessage());
092                    }
093            }
094    
095            /**
096            * @deprecated As of 6.2.0, replaced by {@link #checkInFileEntry(long,
097            String, ServiceContext)}
098            */
099            public static void checkInFileEntry(long fileEntryId,
100                    java.lang.String lockUuid) throws RemoteException {
101                    try {
102                            DLFileEntryServiceUtil.checkInFileEntry(fileEntryId, lockUuid);
103                    }
104                    catch (Exception e) {
105                            _log.error(e, e);
106    
107                            throw new RemoteException(e.getMessage());
108                    }
109            }
110    
111            public static void checkInFileEntry(long fileEntryId,
112                    java.lang.String lockUuid,
113                    com.liferay.portal.service.ServiceContext serviceContext)
114                    throws RemoteException {
115                    try {
116                            DLFileEntryServiceUtil.checkInFileEntry(fileEntryId, lockUuid,
117                                    serviceContext);
118                    }
119                    catch (Exception e) {
120                            _log.error(e, e);
121    
122                            throw new RemoteException(e.getMessage());
123                    }
124            }
125    
126            /**
127            * @deprecated As of 6.2.0, replaced by {@link #checkOutFileEntry(long,
128            ServiceContext)}
129            */
130            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap checkOutFileEntry(
131                    long fileEntryId) throws RemoteException {
132                    try {
133                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.checkOutFileEntry(fileEntryId);
134    
135                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
136                    }
137                    catch (Exception e) {
138                            _log.error(e, e);
139    
140                            throw new RemoteException(e.getMessage());
141                    }
142            }
143    
144            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap checkOutFileEntry(
145                    long fileEntryId,
146                    com.liferay.portal.service.ServiceContext serviceContext)
147                    throws RemoteException {
148                    try {
149                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.checkOutFileEntry(fileEntryId,
150                                            serviceContext);
151    
152                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
153                    }
154                    catch (Exception e) {
155                            _log.error(e, e);
156    
157                            throw new RemoteException(e.getMessage());
158                    }
159            }
160    
161            /**
162            * @deprecated As of 6.2.0, replaced by {@link #checkOutFileEntry(long,
163            String, long, ServiceContext)}
164            */
165            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap checkOutFileEntry(
166                    long fileEntryId, java.lang.String owner, long expirationTime)
167                    throws RemoteException {
168                    try {
169                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.checkOutFileEntry(fileEntryId,
170                                            owner, expirationTime);
171    
172                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
173                    }
174                    catch (Exception e) {
175                            _log.error(e, e);
176    
177                            throw new RemoteException(e.getMessage());
178                    }
179            }
180    
181            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap checkOutFileEntry(
182                    long fileEntryId, java.lang.String owner, long expirationTime,
183                    com.liferay.portal.service.ServiceContext serviceContext)
184                    throws RemoteException {
185                    try {
186                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.checkOutFileEntry(fileEntryId,
187                                            owner, expirationTime, serviceContext);
188    
189                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
190                    }
191                    catch (Exception e) {
192                            _log.error(e, e);
193    
194                            throw new RemoteException(e.getMessage());
195                    }
196            }
197    
198            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap copyFileEntry(
199                    long groupId, long repositoryId, long fileEntryId, long destFolderId,
200                    com.liferay.portal.service.ServiceContext serviceContext)
201                    throws RemoteException {
202                    try {
203                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.copyFileEntry(groupId,
204                                            repositoryId, fileEntryId, destFolderId, serviceContext);
205    
206                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
207                    }
208                    catch (Exception e) {
209                            _log.error(e, e);
210    
211                            throw new RemoteException(e.getMessage());
212                    }
213            }
214    
215            public static void deleteFileEntry(long fileEntryId)
216                    throws RemoteException {
217                    try {
218                            DLFileEntryServiceUtil.deleteFileEntry(fileEntryId);
219                    }
220                    catch (Exception e) {
221                            _log.error(e, e);
222    
223                            throw new RemoteException(e.getMessage());
224                    }
225            }
226    
227            public static void deleteFileEntry(long groupId, long folderId,
228                    java.lang.String title) throws RemoteException {
229                    try {
230                            DLFileEntryServiceUtil.deleteFileEntry(groupId, folderId, title);
231                    }
232                    catch (Exception e) {
233                            _log.error(e, e);
234    
235                            throw new RemoteException(e.getMessage());
236                    }
237            }
238    
239            public static void deleteFileVersion(long fileEntryId,
240                    java.lang.String version) throws RemoteException {
241                    try {
242                            DLFileEntryServiceUtil.deleteFileVersion(fileEntryId, version);
243                    }
244                    catch (Exception e) {
245                            _log.error(e, e);
246    
247                            throw new RemoteException(e.getMessage());
248                    }
249            }
250    
251            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap fetchFileEntryByImageId(
252                    long imageId) throws RemoteException {
253                    try {
254                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.fetchFileEntryByImageId(imageId);
255    
256                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
257                    }
258                    catch (Exception e) {
259                            _log.error(e, e);
260    
261                            throw new RemoteException(e.getMessage());
262                    }
263            }
264    
265            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap[] getFileEntries(
266                    long groupId, long folderId, int status, int start, int end,
267                    com.liferay.portal.kernel.util.OrderByComparator obc)
268                    throws RemoteException {
269                    try {
270                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> returnValue =
271                                    DLFileEntryServiceUtil.getFileEntries(groupId, folderId,
272                                            status, start, end, obc);
273    
274                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModels(returnValue);
275                    }
276                    catch (Exception e) {
277                            _log.error(e, e);
278    
279                            throw new RemoteException(e.getMessage());
280                    }
281            }
282    
283            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap[] getFileEntries(
284                    long groupId, long folderId, int start, int end,
285                    com.liferay.portal.kernel.util.OrderByComparator obc)
286                    throws RemoteException {
287                    try {
288                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> returnValue =
289                                    DLFileEntryServiceUtil.getFileEntries(groupId, folderId, start,
290                                            end, obc);
291    
292                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModels(returnValue);
293                    }
294                    catch (Exception e) {
295                            _log.error(e, e);
296    
297                            throw new RemoteException(e.getMessage());
298                    }
299            }
300    
301            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap[] getFileEntries(
302                    long groupId, long folderId, long fileEntryTypeId, int start, int end,
303                    com.liferay.portal.kernel.util.OrderByComparator obc)
304                    throws RemoteException {
305                    try {
306                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> returnValue =
307                                    DLFileEntryServiceUtil.getFileEntries(groupId, folderId,
308                                            fileEntryTypeId, start, end, obc);
309    
310                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModels(returnValue);
311                    }
312                    catch (Exception e) {
313                            _log.error(e, e);
314    
315                            throw new RemoteException(e.getMessage());
316                    }
317            }
318    
319            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap[] getFileEntries(
320                    long groupId, long folderId, java.lang.String[] mimeTypes, int start,
321                    int end, com.liferay.portal.kernel.util.OrderByComparator obc)
322                    throws RemoteException {
323                    try {
324                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> returnValue =
325                                    DLFileEntryServiceUtil.getFileEntries(groupId, folderId,
326                                            mimeTypes, start, end, obc);
327    
328                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModels(returnValue);
329                    }
330                    catch (Exception e) {
331                            _log.error(e, e);
332    
333                            throw new RemoteException(e.getMessage());
334                    }
335            }
336    
337            public static int getFileEntriesCount(long groupId, long folderId)
338                    throws RemoteException {
339                    try {
340                            int returnValue = DLFileEntryServiceUtil.getFileEntriesCount(groupId,
341                                            folderId);
342    
343                            return returnValue;
344                    }
345                    catch (Exception e) {
346                            _log.error(e, e);
347    
348                            throw new RemoteException(e.getMessage());
349                    }
350            }
351    
352            public static int getFileEntriesCount(long groupId, long folderId,
353                    int status) throws RemoteException {
354                    try {
355                            int returnValue = DLFileEntryServiceUtil.getFileEntriesCount(groupId,
356                                            folderId, status);
357    
358                            return returnValue;
359                    }
360                    catch (Exception e) {
361                            _log.error(e, e);
362    
363                            throw new RemoteException(e.getMessage());
364                    }
365            }
366    
367            public static int getFileEntriesCount(long groupId, long folderId,
368                    long fileEntryTypeId) throws RemoteException {
369                    try {
370                            int returnValue = DLFileEntryServiceUtil.getFileEntriesCount(groupId,
371                                            folderId, fileEntryTypeId);
372    
373                            return returnValue;
374                    }
375                    catch (Exception e) {
376                            _log.error(e, e);
377    
378                            throw new RemoteException(e.getMessage());
379                    }
380            }
381    
382            public static int getFileEntriesCount(long groupId, long folderId,
383                    java.lang.String[] mimeTypes) throws RemoteException {
384                    try {
385                            int returnValue = DLFileEntryServiceUtil.getFileEntriesCount(groupId,
386                                            folderId, mimeTypes);
387    
388                            return returnValue;
389                    }
390                    catch (Exception e) {
391                            _log.error(e, e);
392    
393                            throw new RemoteException(e.getMessage());
394                    }
395            }
396    
397            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap getFileEntry(
398                    long fileEntryId) throws RemoteException {
399                    try {
400                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.getFileEntry(fileEntryId);
401    
402                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
403                    }
404                    catch (Exception e) {
405                            _log.error(e, e);
406    
407                            throw new RemoteException(e.getMessage());
408                    }
409            }
410    
411            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap getFileEntry(
412                    long groupId, long folderId, java.lang.String title)
413                    throws RemoteException {
414                    try {
415                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.getFileEntry(groupId,
416                                            folderId, title);
417    
418                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
419                    }
420                    catch (Exception e) {
421                            _log.error(e, e);
422    
423                            throw new RemoteException(e.getMessage());
424                    }
425            }
426    
427            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap getFileEntryByUuidAndGroupId(
428                    java.lang.String uuid, long groupId) throws RemoteException {
429                    try {
430                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.getFileEntryByUuidAndGroupId(uuid,
431                                            groupId);
432    
433                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
434                    }
435                    catch (Exception e) {
436                            _log.error(e, e);
437    
438                            throw new RemoteException(e.getMessage());
439                    }
440            }
441    
442            public static int getFoldersFileEntriesCount(long groupId,
443                    Long[] folderIds, int status) throws RemoteException {
444                    try {
445                            int returnValue = DLFileEntryServiceUtil.getFoldersFileEntriesCount(groupId,
446                                            ListUtil.toList(folderIds), status);
447    
448                            return returnValue;
449                    }
450                    catch (Exception e) {
451                            _log.error(e, e);
452    
453                            throw new RemoteException(e.getMessage());
454                    }
455            }
456    
457            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap[] getGroupFileEntries(
458                    long groupId, long userId, long rootFolderId, int start, int end,
459                    com.liferay.portal.kernel.util.OrderByComparator obc)
460                    throws RemoteException {
461                    try {
462                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> returnValue =
463                                    DLFileEntryServiceUtil.getGroupFileEntries(groupId, userId,
464                                            rootFolderId, start, end, obc);
465    
466                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModels(returnValue);
467                    }
468                    catch (Exception e) {
469                            _log.error(e, e);
470    
471                            throw new RemoteException(e.getMessage());
472                    }
473            }
474    
475            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap[] getGroupFileEntries(
476                    long groupId, long userId, long rootFolderId,
477                    java.lang.String[] mimeTypes, int status, int start, int end,
478                    com.liferay.portal.kernel.util.OrderByComparator obc)
479                    throws RemoteException {
480                    try {
481                            java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> returnValue =
482                                    DLFileEntryServiceUtil.getGroupFileEntries(groupId, userId,
483                                            rootFolderId, mimeTypes, status, start, end, obc);
484    
485                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModels(returnValue);
486                    }
487                    catch (Exception e) {
488                            _log.error(e, e);
489    
490                            throw new RemoteException(e.getMessage());
491                    }
492            }
493    
494            public static int getGroupFileEntriesCount(long groupId, long userId,
495                    long rootFolderId) throws RemoteException {
496                    try {
497                            int returnValue = DLFileEntryServiceUtil.getGroupFileEntriesCount(groupId,
498                                            userId, rootFolderId);
499    
500                            return returnValue;
501                    }
502                    catch (Exception e) {
503                            _log.error(e, e);
504    
505                            throw new RemoteException(e.getMessage());
506                    }
507            }
508    
509            public static int getGroupFileEntriesCount(long groupId, long userId,
510                    long rootFolderId, java.lang.String[] mimeTypes, int status)
511                    throws RemoteException {
512                    try {
513                            int returnValue = DLFileEntryServiceUtil.getGroupFileEntriesCount(groupId,
514                                            userId, rootFolderId, mimeTypes, status);
515    
516                            return returnValue;
517                    }
518                    catch (Exception e) {
519                            _log.error(e, e);
520    
521                            throw new RemoteException(e.getMessage());
522                    }
523            }
524    
525            public static boolean hasFileEntryLock(long fileEntryId)
526                    throws RemoteException {
527                    try {
528                            boolean returnValue = DLFileEntryServiceUtil.hasFileEntryLock(fileEntryId);
529    
530                            return returnValue;
531                    }
532                    catch (Exception e) {
533                            _log.error(e, e);
534    
535                            throw new RemoteException(e.getMessage());
536                    }
537            }
538    
539            public static boolean isFileEntryCheckedOut(long fileEntryId)
540                    throws RemoteException {
541                    try {
542                            boolean returnValue = DLFileEntryServiceUtil.isFileEntryCheckedOut(fileEntryId);
543    
544                            return returnValue;
545                    }
546                    catch (Exception e) {
547                            _log.error(e, e);
548    
549                            throw new RemoteException(e.getMessage());
550                    }
551            }
552    
553            public static com.liferay.portlet.documentlibrary.model.DLFileEntrySoap moveFileEntry(
554                    long fileEntryId, long newFolderId,
555                    com.liferay.portal.service.ServiceContext serviceContext)
556                    throws RemoteException {
557                    try {
558                            com.liferay.portlet.documentlibrary.model.DLFileEntry returnValue = DLFileEntryServiceUtil.moveFileEntry(fileEntryId,
559                                            newFolderId, serviceContext);
560    
561                            return com.liferay.portlet.documentlibrary.model.DLFileEntrySoap.toSoapModel(returnValue);
562                    }
563                    catch (Exception e) {
564                            _log.error(e, e);
565    
566                            throw new RemoteException(e.getMessage());
567                    }
568            }
569    
570            public static void revertFileEntry(long fileEntryId,
571                    java.lang.String version,
572                    com.liferay.portal.service.ServiceContext serviceContext)
573                    throws RemoteException {
574                    try {
575                            DLFileEntryServiceUtil.revertFileEntry(fileEntryId, version,
576                                    serviceContext);
577                    }
578                    catch (Exception e) {
579                            _log.error(e, e);
580    
581                            throw new RemoteException(e.getMessage());
582                    }
583            }
584    
585            public static boolean verifyFileEntryCheckOut(long fileEntryId,
586                    java.lang.String lockUuid) throws RemoteException {
587                    try {
588                            boolean returnValue = DLFileEntryServiceUtil.verifyFileEntryCheckOut(fileEntryId,
589                                            lockUuid);
590    
591                            return returnValue;
592                    }
593                    catch (Exception e) {
594                            _log.error(e, e);
595    
596                            throw new RemoteException(e.getMessage());
597                    }
598            }
599    
600            public static boolean verifyFileEntryLock(long fileEntryId,
601                    java.lang.String lockUuid) throws RemoteException {
602                    try {
603                            boolean returnValue = DLFileEntryServiceUtil.verifyFileEntryLock(fileEntryId,
604                                            lockUuid);
605    
606                            return returnValue;
607                    }
608                    catch (Exception e) {
609                            _log.error(e, e);
610    
611                            throw new RemoteException(e.getMessage());
612                    }
613            }
614    
615            private static Log _log = LogFactoryUtil.getLog(DLFileEntryServiceSoap.class);
616    }