001    /**
002     * Copyright (c) 2000-present 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.journal.service.http;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.log.Log;
020    import com.liferay.portal.kernel.log.LogFactoryUtil;
021    import com.liferay.portal.kernel.util.ListUtil;
022    
023    import com.liferay.portlet.journal.service.JournalFolderServiceUtil;
024    
025    import java.rmi.RemoteException;
026    
027    /**
028     * Provides the SOAP utility for the
029     * {@link JournalFolderServiceUtil} service utility. The
030     * static methods of this class calls the same methods of the service utility.
031     * However, the signatures are different because it is difficult for SOAP to
032     * support certain types.
033     *
034     * <p>
035     * ServiceBuilder follows certain rules in translating the methods. For example,
036     * if the method in the service utility returns a {@link java.util.List}, that
037     * is translated to an array of {@link com.liferay.portlet.journal.model.JournalFolderSoap}.
038     * If the method in the service utility returns a
039     * {@link com.liferay.portlet.journal.model.JournalFolder}, that is translated to a
040     * {@link com.liferay.portlet.journal.model.JournalFolderSoap}. Methods that SOAP cannot
041     * safely wire are skipped.
042     * </p>
043     *
044     * <p>
045     * The benefits of using the SOAP utility is that it is cross platform
046     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
047     * even Perl, to call the generated services. One drawback of SOAP is that it is
048     * slow because it needs to serialize all calls into a text format (XML).
049     * </p>
050     *
051     * <p>
052     * You can see a list of services at http://localhost:8080/api/axis. Set the
053     * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
054     * security.
055     * </p>
056     *
057     * <p>
058     * The SOAP utility is only generated for remote services.
059     * </p>
060     *
061     * @author Brian Wing Shun Chan
062     * @see JournalFolderServiceHttp
063     * @see com.liferay.portlet.journal.model.JournalFolderSoap
064     * @see JournalFolderServiceUtil
065     * @generated
066     */
067    @ProviderType
068    public class JournalFolderServiceSoap {
069            public static com.liferay.portlet.journal.model.JournalFolderSoap addFolder(
070                    long groupId, long parentFolderId, java.lang.String name,
071                    java.lang.String description,
072                    com.liferay.portal.service.ServiceContext serviceContext)
073                    throws RemoteException {
074                    try {
075                            com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.addFolder(groupId,
076                                            parentFolderId, name, description, serviceContext);
077    
078                            return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
079                    }
080                    catch (Exception e) {
081                            _log.error(e, e);
082    
083                            throw new RemoteException(e.getMessage());
084                    }
085            }
086    
087            public static void deleteFolder(long folderId) throws RemoteException {
088                    try {
089                            JournalFolderServiceUtil.deleteFolder(folderId);
090                    }
091                    catch (Exception e) {
092                            _log.error(e, e);
093    
094                            throw new RemoteException(e.getMessage());
095                    }
096            }
097    
098            public static void deleteFolder(long folderId, boolean includeTrashedEntries)
099                    throws RemoteException {
100                    try {
101                            JournalFolderServiceUtil.deleteFolder(folderId,
102                                    includeTrashedEntries);
103                    }
104                    catch (Exception e) {
105                            _log.error(e, e);
106    
107                            throw new RemoteException(e.getMessage());
108                    }
109            }
110    
111            public static com.liferay.portlet.journal.model.JournalFolderSoap fetchFolder(
112                    long folderId) throws RemoteException {
113                    try {
114                            com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.fetchFolder(folderId);
115    
116                            return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
117                    }
118                    catch (Exception e) {
119                            _log.error(e, e);
120    
121                            throw new RemoteException(e.getMessage());
122                    }
123            }
124    
125            public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap[] getDDMStructures(
126                    long[] groupIds, long folderId, int restrictionType)
127                    throws RemoteException {
128                    try {
129                            java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> returnValue =
130                                    JournalFolderServiceUtil.getDDMStructures(groupIds, folderId,
131                                            restrictionType);
132    
133                            return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModels(returnValue);
134                    }
135                    catch (Exception e) {
136                            _log.error(e, e);
137    
138                            throw new RemoteException(e.getMessage());
139                    }
140            }
141    
142            public static com.liferay.portlet.journal.model.JournalFolderSoap getFolder(
143                    long folderId) throws RemoteException {
144                    try {
145                            com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.getFolder(folderId);
146    
147                            return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
148                    }
149                    catch (Exception e) {
150                            _log.error(e, e);
151    
152                            throw new RemoteException(e.getMessage());
153                    }
154            }
155    
156            public static java.lang.Long[] getFolderIds(long groupId, long folderId)
157                    throws RemoteException {
158                    try {
159                            java.util.List<java.lang.Long> returnValue = JournalFolderServiceUtil.getFolderIds(groupId,
160                                            folderId);
161    
162                            return returnValue.toArray(new java.lang.Long[returnValue.size()]);
163                    }
164                    catch (Exception e) {
165                            _log.error(e, e);
166    
167                            throw new RemoteException(e.getMessage());
168                    }
169            }
170    
171            public static com.liferay.portlet.journal.model.JournalFolderSoap[] getFolders(
172                    long groupId) throws RemoteException {
173                    try {
174                            java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
175                                    JournalFolderServiceUtil.getFolders(groupId);
176    
177                            return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModels(returnValue);
178                    }
179                    catch (Exception e) {
180                            _log.error(e, e);
181    
182                            throw new RemoteException(e.getMessage());
183                    }
184            }
185    
186            public static com.liferay.portlet.journal.model.JournalFolderSoap[] getFolders(
187                    long groupId, long parentFolderId) throws RemoteException {
188                    try {
189                            java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
190                                    JournalFolderServiceUtil.getFolders(groupId, parentFolderId);
191    
192                            return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModels(returnValue);
193                    }
194                    catch (Exception e) {
195                            _log.error(e, e);
196    
197                            throw new RemoteException(e.getMessage());
198                    }
199            }
200    
201            public static com.liferay.portlet.journal.model.JournalFolderSoap[] getFolders(
202                    long groupId, long parentFolderId, int status)
203                    throws RemoteException {
204                    try {
205                            java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
206                                    JournalFolderServiceUtil.getFolders(groupId, parentFolderId,
207                                            status);
208    
209                            return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModels(returnValue);
210                    }
211                    catch (Exception e) {
212                            _log.error(e, e);
213    
214                            throw new RemoteException(e.getMessage());
215                    }
216            }
217    
218            public static com.liferay.portlet.journal.model.JournalFolderSoap[] getFolders(
219                    long groupId, long parentFolderId, int start, int end)
220                    throws RemoteException {
221                    try {
222                            java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
223                                    JournalFolderServiceUtil.getFolders(groupId, parentFolderId,
224                                            start, end);
225    
226                            return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModels(returnValue);
227                    }
228                    catch (Exception e) {
229                            _log.error(e, e);
230    
231                            throw new RemoteException(e.getMessage());
232                    }
233            }
234    
235            public static com.liferay.portlet.journal.model.JournalFolderSoap[] getFolders(
236                    long groupId, long parentFolderId, int status, int start, int end)
237                    throws RemoteException {
238                    try {
239                            java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
240                                    JournalFolderServiceUtil.getFolders(groupId, parentFolderId,
241                                            status, start, end);
242    
243                            return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModels(returnValue);
244                    }
245                    catch (Exception e) {
246                            _log.error(e, e);
247    
248                            throw new RemoteException(e.getMessage());
249                    }
250            }
251    
252            public static int getFoldersAndArticlesCount(long groupId,
253                    Long[] folderIds, int status) throws RemoteException {
254                    try {
255                            int returnValue = JournalFolderServiceUtil.getFoldersAndArticlesCount(groupId,
256                                            ListUtil.toList(folderIds), status);
257    
258                            return returnValue;
259                    }
260                    catch (Exception e) {
261                            _log.error(e, e);
262    
263                            throw new RemoteException(e.getMessage());
264                    }
265            }
266    
267            public static int getFoldersAndArticlesCount(long groupId, long folderId)
268                    throws RemoteException {
269                    try {
270                            int returnValue = JournalFolderServiceUtil.getFoldersAndArticlesCount(groupId,
271                                            folderId);
272    
273                            return returnValue;
274                    }
275                    catch (Exception e) {
276                            _log.error(e, e);
277    
278                            throw new RemoteException(e.getMessage());
279                    }
280            }
281    
282            public static int getFoldersAndArticlesCount(long groupId, long folderId,
283                    int status) throws RemoteException {
284                    try {
285                            int returnValue = JournalFolderServiceUtil.getFoldersAndArticlesCount(groupId,
286                                            folderId, status);
287    
288                            return returnValue;
289                    }
290                    catch (Exception e) {
291                            _log.error(e, e);
292    
293                            throw new RemoteException(e.getMessage());
294                    }
295            }
296    
297            public static int getFoldersCount(long groupId, long parentFolderId)
298                    throws RemoteException {
299                    try {
300                            int returnValue = JournalFolderServiceUtil.getFoldersCount(groupId,
301                                            parentFolderId);
302    
303                            return returnValue;
304                    }
305                    catch (Exception e) {
306                            _log.error(e, e);
307    
308                            throw new RemoteException(e.getMessage());
309                    }
310            }
311    
312            public static int getFoldersCount(long groupId, long parentFolderId,
313                    int status) throws RemoteException {
314                    try {
315                            int returnValue = JournalFolderServiceUtil.getFoldersCount(groupId,
316                                            parentFolderId, status);
317    
318                            return returnValue;
319                    }
320                    catch (Exception e) {
321                            _log.error(e, e);
322    
323                            throw new RemoteException(e.getMessage());
324                    }
325            }
326    
327            /**
328            * @deprecated As of 7.0.0, replaced by {@link #getSubfolderIds(List, long,
329            long, boolean)}
330            */
331            @Deprecated
332            public static void getSubfolderIds(Long[] folderIds, long groupId,
333                    long folderId) throws RemoteException {
334                    try {
335                            JournalFolderServiceUtil.getSubfolderIds(ListUtil.toList(folderIds),
336                                    groupId, folderId);
337                    }
338                    catch (Exception e) {
339                            _log.error(e, e);
340    
341                            throw new RemoteException(e.getMessage());
342                    }
343            }
344    
345            public static void getSubfolderIds(Long[] folderIds, long groupId,
346                    long folderId, boolean recurse) throws RemoteException {
347                    try {
348                            JournalFolderServiceUtil.getSubfolderIds(ListUtil.toList(folderIds),
349                                    groupId, folderId, recurse);
350                    }
351                    catch (Exception e) {
352                            _log.error(e, e);
353    
354                            throw new RemoteException(e.getMessage());
355                    }
356            }
357    
358            public static java.lang.Long[] getSubfolderIds(long groupId, long folderId,
359                    boolean recurse) throws RemoteException {
360                    try {
361                            java.util.List<java.lang.Long> returnValue = JournalFolderServiceUtil.getSubfolderIds(groupId,
362                                            folderId, recurse);
363    
364                            return returnValue.toArray(new java.lang.Long[returnValue.size()]);
365                    }
366                    catch (Exception e) {
367                            _log.error(e, e);
368    
369                            throw new RemoteException(e.getMessage());
370                    }
371            }
372    
373            public static com.liferay.portlet.journal.model.JournalFolderSoap moveFolder(
374                    long folderId, long parentFolderId,
375                    com.liferay.portal.service.ServiceContext serviceContext)
376                    throws RemoteException {
377                    try {
378                            com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.moveFolder(folderId,
379                                            parentFolderId, serviceContext);
380    
381                            return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
382                    }
383                    catch (Exception e) {
384                            _log.error(e, e);
385    
386                            throw new RemoteException(e.getMessage());
387                    }
388            }
389    
390            public static com.liferay.portlet.journal.model.JournalFolderSoap moveFolderFromTrash(
391                    long folderId, long parentFolderId,
392                    com.liferay.portal.service.ServiceContext serviceContext)
393                    throws RemoteException {
394                    try {
395                            com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.moveFolderFromTrash(folderId,
396                                            parentFolderId, serviceContext);
397    
398                            return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
399                    }
400                    catch (Exception e) {
401                            _log.error(e, e);
402    
403                            throw new RemoteException(e.getMessage());
404                    }
405            }
406    
407            public static com.liferay.portlet.journal.model.JournalFolderSoap moveFolderToTrash(
408                    long folderId) throws RemoteException {
409                    try {
410                            com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.moveFolderToTrash(folderId);
411    
412                            return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
413                    }
414                    catch (Exception e) {
415                            _log.error(e, e);
416    
417                            throw new RemoteException(e.getMessage());
418                    }
419            }
420    
421            public static void restoreFolderFromTrash(long folderId)
422                    throws RemoteException {
423                    try {
424                            JournalFolderServiceUtil.restoreFolderFromTrash(folderId);
425                    }
426                    catch (Exception e) {
427                            _log.error(e, e);
428    
429                            throw new RemoteException(e.getMessage());
430                    }
431            }
432    
433            public static void subscribe(long groupId, long folderId)
434                    throws RemoteException {
435                    try {
436                            JournalFolderServiceUtil.subscribe(groupId, folderId);
437                    }
438                    catch (Exception e) {
439                            _log.error(e, e);
440    
441                            throw new RemoteException(e.getMessage());
442                    }
443            }
444    
445            public static void unsubscribe(long groupId, long folderId)
446                    throws RemoteException {
447                    try {
448                            JournalFolderServiceUtil.unsubscribe(groupId, folderId);
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.journal.model.JournalFolderSoap updateFolder(
458                    long groupId, long folderId, long parentFolderId,
459                    java.lang.String name, java.lang.String description,
460                    boolean mergeWithParentFolder,
461                    com.liferay.portal.service.ServiceContext serviceContext)
462                    throws RemoteException {
463                    try {
464                            com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.updateFolder(groupId,
465                                            folderId, parentFolderId, name, description,
466                                            mergeWithParentFolder, serviceContext);
467    
468                            return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
469                    }
470                    catch (Exception e) {
471                            _log.error(e, e);
472    
473                            throw new RemoteException(e.getMessage());
474                    }
475            }
476    
477            public static com.liferay.portlet.journal.model.JournalFolderSoap updateFolder(
478                    long groupId, long folderId, long parentFolderId,
479                    java.lang.String name, java.lang.String description,
480                    long[] ddmStructureIds, int restrictionType,
481                    boolean mergeWithParentFolder,
482                    com.liferay.portal.service.ServiceContext serviceContext)
483                    throws RemoteException {
484                    try {
485                            com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.updateFolder(groupId,
486                                            folderId, parentFolderId, name, description,
487                                            ddmStructureIds, restrictionType, mergeWithParentFolder,
488                                            serviceContext);
489    
490                            return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
491                    }
492                    catch (Exception e) {
493                            _log.error(e, e);
494    
495                            throw new RemoteException(e.getMessage());
496                    }
497            }
498    
499            private static Log _log = LogFactoryUtil.getLog(JournalFolderServiceSoap.class);
500    }