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.journal.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.journal.service.JournalFolderServiceUtil;
022    
023    import java.rmi.RemoteException;
024    
025    /**
026     * Provides the SOAP utility for the
027     * {@link com.liferay.portlet.journal.service.JournalFolderServiceUtil} 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.journal.model.JournalFolderSoap}.
036     * If the method in the service utility returns a
037     * {@link com.liferay.portlet.journal.model.JournalFolder}, that is translated to a
038     * {@link com.liferay.portlet.journal.model.JournalFolderSoap}. 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 JournalFolderServiceHttp
061     * @see com.liferay.portlet.journal.model.JournalFolderSoap
062     * @see com.liferay.portlet.journal.service.JournalFolderServiceUtil
063     * @generated
064     */
065    public class JournalFolderServiceSoap {
066            public static com.liferay.portlet.journal.model.JournalFolderSoap addFolder(
067                    long groupId, long parentFolderId, java.lang.String name,
068                    java.lang.String description,
069                    com.liferay.portal.service.ServiceContext serviceContext)
070                    throws RemoteException {
071                    try {
072                            com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.addFolder(groupId,
073                                            parentFolderId, name, description, serviceContext);
074    
075                            return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
076                    }
077                    catch (Exception e) {
078                            _log.error(e, e);
079    
080                            throw new RemoteException(e.getMessage());
081                    }
082            }
083    
084            public static void deleteFolder(long folderId) throws RemoteException {
085                    try {
086                            JournalFolderServiceUtil.deleteFolder(folderId);
087                    }
088                    catch (Exception e) {
089                            _log.error(e, e);
090    
091                            throw new RemoteException(e.getMessage());
092                    }
093            }
094    
095            public static void deleteFolder(long folderId, boolean includeTrashedEntries)
096                    throws RemoteException {
097                    try {
098                            JournalFolderServiceUtil.deleteFolder(folderId,
099                                    includeTrashedEntries);
100                    }
101                    catch (Exception e) {
102                            _log.error(e, e);
103    
104                            throw new RemoteException(e.getMessage());
105                    }
106            }
107    
108            public static com.liferay.portlet.journal.model.JournalFolderSoap getFolder(
109                    long folderId) throws RemoteException {
110                    try {
111                            com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.getFolder(folderId);
112    
113                            return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
114                    }
115                    catch (Exception e) {
116                            _log.error(e, e);
117    
118                            throw new RemoteException(e.getMessage());
119                    }
120            }
121    
122            public static java.lang.Long[] getFolderIds(long groupId, long folderId)
123                    throws RemoteException {
124                    try {
125                            java.util.List<java.lang.Long> returnValue = JournalFolderServiceUtil.getFolderIds(groupId,
126                                            folderId);
127    
128                            return returnValue.toArray(new java.lang.Long[returnValue.size()]);
129                    }
130                    catch (Exception e) {
131                            _log.error(e, e);
132    
133                            throw new RemoteException(e.getMessage());
134                    }
135            }
136    
137            public static com.liferay.portlet.journal.model.JournalFolderSoap[] getFolders(
138                    long groupId) throws RemoteException {
139                    try {
140                            java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
141                                    JournalFolderServiceUtil.getFolders(groupId);
142    
143                            return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModels(returnValue);
144                    }
145                    catch (Exception e) {
146                            _log.error(e, e);
147    
148                            throw new RemoteException(e.getMessage());
149                    }
150            }
151    
152            public static com.liferay.portlet.journal.model.JournalFolderSoap[] getFolders(
153                    long groupId, long parentFolderId) throws RemoteException {
154                    try {
155                            java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
156                                    JournalFolderServiceUtil.getFolders(groupId, parentFolderId);
157    
158                            return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModels(returnValue);
159                    }
160                    catch (Exception e) {
161                            _log.error(e, e);
162    
163                            throw new RemoteException(e.getMessage());
164                    }
165            }
166    
167            public static com.liferay.portlet.journal.model.JournalFolderSoap[] getFolders(
168                    long groupId, long parentFolderId, int status)
169                    throws RemoteException {
170                    try {
171                            java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
172                                    JournalFolderServiceUtil.getFolders(groupId, parentFolderId,
173                                            status);
174    
175                            return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModels(returnValue);
176                    }
177                    catch (Exception e) {
178                            _log.error(e, e);
179    
180                            throw new RemoteException(e.getMessage());
181                    }
182            }
183    
184            public static com.liferay.portlet.journal.model.JournalFolderSoap[] getFolders(
185                    long groupId, long parentFolderId, int start, int end)
186                    throws RemoteException {
187                    try {
188                            java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
189                                    JournalFolderServiceUtil.getFolders(groupId, parentFolderId,
190                                            start, end);
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, int start, int end)
203                    throws RemoteException {
204                    try {
205                            java.util.List<com.liferay.portlet.journal.model.JournalFolder> returnValue =
206                                    JournalFolderServiceUtil.getFolders(groupId, parentFolderId,
207                                            status, start, end);
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 int getFoldersAndArticlesCount(long groupId,
219                    Long[] folderIds, int status) throws RemoteException {
220                    try {
221                            int returnValue = JournalFolderServiceUtil.getFoldersAndArticlesCount(groupId,
222                                            ListUtil.toList(folderIds), status);
223    
224                            return returnValue;
225                    }
226                    catch (Exception e) {
227                            _log.error(e, e);
228    
229                            throw new RemoteException(e.getMessage());
230                    }
231            }
232    
233            public static int getFoldersAndArticlesCount(long groupId, long folderId)
234                    throws RemoteException {
235                    try {
236                            int returnValue = JournalFolderServiceUtil.getFoldersAndArticlesCount(groupId,
237                                            folderId);
238    
239                            return returnValue;
240                    }
241                    catch (Exception e) {
242                            _log.error(e, e);
243    
244                            throw new RemoteException(e.getMessage());
245                    }
246            }
247    
248            public static int getFoldersAndArticlesCount(long groupId, long folderId,
249                    int status) throws RemoteException {
250                    try {
251                            int returnValue = JournalFolderServiceUtil.getFoldersAndArticlesCount(groupId,
252                                            folderId, status);
253    
254                            return returnValue;
255                    }
256                    catch (Exception e) {
257                            _log.error(e, e);
258    
259                            throw new RemoteException(e.getMessage());
260                    }
261            }
262    
263            public static int getFoldersCount(long groupId, long parentFolderId)
264                    throws RemoteException {
265                    try {
266                            int returnValue = JournalFolderServiceUtil.getFoldersCount(groupId,
267                                            parentFolderId);
268    
269                            return returnValue;
270                    }
271                    catch (Exception e) {
272                            _log.error(e, e);
273    
274                            throw new RemoteException(e.getMessage());
275                    }
276            }
277    
278            public static int getFoldersCount(long groupId, long parentFolderId,
279                    int status) throws RemoteException {
280                    try {
281                            int returnValue = JournalFolderServiceUtil.getFoldersCount(groupId,
282                                            parentFolderId, status);
283    
284                            return returnValue;
285                    }
286                    catch (Exception e) {
287                            _log.error(e, e);
288    
289                            throw new RemoteException(e.getMessage());
290                    }
291            }
292    
293            public static void getSubfolderIds(Long[] folderIds, long groupId,
294                    long folderId) throws RemoteException {
295                    try {
296                            JournalFolderServiceUtil.getSubfolderIds(ListUtil.toList(folderIds),
297                                    groupId, folderId);
298                    }
299                    catch (Exception e) {
300                            _log.error(e, e);
301    
302                            throw new RemoteException(e.getMessage());
303                    }
304            }
305    
306            public static java.lang.Long[] getSubfolderIds(long groupId, long folderId,
307                    boolean recurse) throws RemoteException {
308                    try {
309                            java.util.List<java.lang.Long> returnValue = JournalFolderServiceUtil.getSubfolderIds(groupId,
310                                            folderId, recurse);
311    
312                            return returnValue.toArray(new java.lang.Long[returnValue.size()]);
313                    }
314                    catch (Exception e) {
315                            _log.error(e, e);
316    
317                            throw new RemoteException(e.getMessage());
318                    }
319            }
320    
321            public static com.liferay.portlet.journal.model.JournalFolderSoap moveFolder(
322                    long folderId, long parentFolderId,
323                    com.liferay.portal.service.ServiceContext serviceContext)
324                    throws RemoteException {
325                    try {
326                            com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.moveFolder(folderId,
327                                            parentFolderId, serviceContext);
328    
329                            return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
330                    }
331                    catch (Exception e) {
332                            _log.error(e, e);
333    
334                            throw new RemoteException(e.getMessage());
335                    }
336            }
337    
338            public static com.liferay.portlet.journal.model.JournalFolderSoap moveFolderFromTrash(
339                    long folderId, long parentFolderId,
340                    com.liferay.portal.service.ServiceContext serviceContext)
341                    throws RemoteException {
342                    try {
343                            com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.moveFolderFromTrash(folderId,
344                                            parentFolderId, serviceContext);
345    
346                            return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
347                    }
348                    catch (Exception e) {
349                            _log.error(e, e);
350    
351                            throw new RemoteException(e.getMessage());
352                    }
353            }
354    
355            public static com.liferay.portlet.journal.model.JournalFolderSoap moveFolderToTrash(
356                    long folderId) throws RemoteException {
357                    try {
358                            com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.moveFolderToTrash(folderId);
359    
360                            return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
361                    }
362                    catch (Exception e) {
363                            _log.error(e, e);
364    
365                            throw new RemoteException(e.getMessage());
366                    }
367            }
368    
369            public static void restoreFolderFromTrash(long folderId)
370                    throws RemoteException {
371                    try {
372                            JournalFolderServiceUtil.restoreFolderFromTrash(folderId);
373                    }
374                    catch (Exception e) {
375                            _log.error(e, e);
376    
377                            throw new RemoteException(e.getMessage());
378                    }
379            }
380    
381            public static com.liferay.portlet.journal.model.JournalFolderSoap updateFolder(
382                    long folderId, long parentFolderId, java.lang.String name,
383                    java.lang.String description, boolean mergeWithParentFolder,
384                    com.liferay.portal.service.ServiceContext serviceContext)
385                    throws RemoteException {
386                    try {
387                            com.liferay.portlet.journal.model.JournalFolder returnValue = JournalFolderServiceUtil.updateFolder(folderId,
388                                            parentFolderId, name, description, mergeWithParentFolder,
389                                            serviceContext);
390    
391                            return com.liferay.portlet.journal.model.JournalFolderSoap.toSoapModel(returnValue);
392                    }
393                    catch (Exception e) {
394                            _log.error(e, e);
395    
396                            throw new RemoteException(e.getMessage());
397                    }
398            }
399    
400            private static Log _log = LogFactoryUtil.getLog(JournalFolderServiceSoap.class);
401    }