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.bookmarks.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.bookmarks.service.BookmarksEntryServiceUtil;
022    
023    import java.rmi.RemoteException;
024    
025    /**
026     * <p>
027     * This class provides a SOAP utility for the
028     * {@link com.liferay.portlet.bookmarks.service.BookmarksEntryServiceUtil} service utility. The
029     * static methods of this class calls the same methods of the service utility.
030     * However, the signatures are different because it is difficult for SOAP to
031     * support certain types.
032     * </p>
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.bookmarks.model.BookmarksEntrySoap}.
038     * If the method in the service utility returns a
039     * {@link com.liferay.portlet.bookmarks.model.BookmarksEntry}, that is translated to a
040     * {@link com.liferay.portlet.bookmarks.model.BookmarksEntrySoap}. 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       BookmarksEntryServiceHttp
063     * @see       com.liferay.portlet.bookmarks.model.BookmarksEntrySoap
064     * @see       com.liferay.portlet.bookmarks.service.BookmarksEntryServiceUtil
065     * @generated
066     */
067    public class BookmarksEntryServiceSoap {
068            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap addEntry(
069                    long groupId, long folderId, java.lang.String name,
070                    java.lang.String url, java.lang.String description,
071                    com.liferay.portal.service.ServiceContext serviceContext)
072                    throws RemoteException {
073                    try {
074                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.addEntry(groupId,
075                                            folderId, name, url, description, serviceContext);
076    
077                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModel(returnValue);
078                    }
079                    catch (Exception e) {
080                            _log.error(e, e);
081    
082                            throw new RemoteException(e.getMessage());
083                    }
084            }
085    
086            public static void deleteEntry(long entryId) throws RemoteException {
087                    try {
088                            BookmarksEntryServiceUtil.deleteEntry(entryId);
089                    }
090                    catch (Exception e) {
091                            _log.error(e, e);
092    
093                            throw new RemoteException(e.getMessage());
094                    }
095            }
096    
097            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap[] getEntries(
098                    long groupId, long folderId, int start, int end)
099                    throws RemoteException {
100                    try {
101                            java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> returnValue =
102                                    BookmarksEntryServiceUtil.getEntries(groupId, folderId, start,
103                                            end);
104    
105                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModels(returnValue);
106                    }
107                    catch (Exception e) {
108                            _log.error(e, e);
109    
110                            throw new RemoteException(e.getMessage());
111                    }
112            }
113    
114            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap[] getEntries(
115                    long groupId, long folderId, int start, int end,
116                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
117                    throws RemoteException {
118                    try {
119                            java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> returnValue =
120                                    BookmarksEntryServiceUtil.getEntries(groupId, folderId, start,
121                                            end, orderByComparator);
122    
123                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModels(returnValue);
124                    }
125                    catch (Exception e) {
126                            _log.error(e, e);
127    
128                            throw new RemoteException(e.getMessage());
129                    }
130            }
131    
132            public static int getEntriesCount(long groupId, long folderId)
133                    throws RemoteException {
134                    try {
135                            int returnValue = BookmarksEntryServiceUtil.getEntriesCount(groupId,
136                                            folderId);
137    
138                            return returnValue;
139                    }
140                    catch (Exception e) {
141                            _log.error(e, e);
142    
143                            throw new RemoteException(e.getMessage());
144                    }
145            }
146    
147            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap getEntry(
148                    long entryId) throws RemoteException {
149                    try {
150                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.getEntry(entryId);
151    
152                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModel(returnValue);
153                    }
154                    catch (Exception e) {
155                            _log.error(e, e);
156    
157                            throw new RemoteException(e.getMessage());
158                    }
159            }
160    
161            public static int getFoldersEntriesCount(long groupId, Long[] folderIds)
162                    throws RemoteException {
163                    try {
164                            int returnValue = BookmarksEntryServiceUtil.getFoldersEntriesCount(groupId,
165                                            ListUtil.toList(folderIds));
166    
167                            return returnValue;
168                    }
169                    catch (Exception e) {
170                            _log.error(e, e);
171    
172                            throw new RemoteException(e.getMessage());
173                    }
174            }
175    
176            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap[] getGroupEntries(
177                    long groupId, int start, int end) throws RemoteException {
178                    try {
179                            java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> returnValue =
180                                    BookmarksEntryServiceUtil.getGroupEntries(groupId, start, end);
181    
182                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModels(returnValue);
183                    }
184                    catch (Exception e) {
185                            _log.error(e, e);
186    
187                            throw new RemoteException(e.getMessage());
188                    }
189            }
190    
191            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap[] getGroupEntries(
192                    long groupId, long userId, int start, int end)
193                    throws RemoteException {
194                    try {
195                            java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> returnValue =
196                                    BookmarksEntryServiceUtil.getGroupEntries(groupId, userId,
197                                            start, end);
198    
199                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModels(returnValue);
200                    }
201                    catch (Exception e) {
202                            _log.error(e, e);
203    
204                            throw new RemoteException(e.getMessage());
205                    }
206            }
207    
208            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap[] getGroupEntries(
209                    long groupId, long userId, long rootFolderId, int start, int end)
210                    throws RemoteException {
211                    try {
212                            java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> returnValue =
213                                    BookmarksEntryServiceUtil.getGroupEntries(groupId, userId,
214                                            rootFolderId, start, end);
215    
216                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModels(returnValue);
217                    }
218                    catch (Exception e) {
219                            _log.error(e, e);
220    
221                            throw new RemoteException(e.getMessage());
222                    }
223            }
224    
225            public static int getGroupEntriesCount(long groupId)
226                    throws RemoteException {
227                    try {
228                            int returnValue = BookmarksEntryServiceUtil.getGroupEntriesCount(groupId);
229    
230                            return returnValue;
231                    }
232                    catch (Exception e) {
233                            _log.error(e, e);
234    
235                            throw new RemoteException(e.getMessage());
236                    }
237            }
238    
239            public static int getGroupEntriesCount(long groupId, long userId)
240                    throws RemoteException {
241                    try {
242                            int returnValue = BookmarksEntryServiceUtil.getGroupEntriesCount(groupId,
243                                            userId);
244    
245                            return returnValue;
246                    }
247                    catch (Exception e) {
248                            _log.error(e, e);
249    
250                            throw new RemoteException(e.getMessage());
251                    }
252            }
253    
254            public static int getGroupEntriesCount(long groupId, long userId,
255                    long rootFolderId) throws RemoteException {
256                    try {
257                            int returnValue = BookmarksEntryServiceUtil.getGroupEntriesCount(groupId,
258                                            userId, rootFolderId);
259    
260                            return returnValue;
261                    }
262                    catch (Exception e) {
263                            _log.error(e, e);
264    
265                            throw new RemoteException(e.getMessage());
266                    }
267            }
268    
269            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap moveEntry(
270                    long entryId, long parentFolderId) throws RemoteException {
271                    try {
272                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.moveEntry(entryId,
273                                            parentFolderId);
274    
275                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModel(returnValue);
276                    }
277                    catch (Exception e) {
278                            _log.error(e, e);
279    
280                            throw new RemoteException(e.getMessage());
281                    }
282            }
283    
284            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap moveEntryFromTrash(
285                    long entryId, long parentFolderId) throws RemoteException {
286                    try {
287                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.moveEntryFromTrash(entryId,
288                                            parentFolderId);
289    
290                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModel(returnValue);
291                    }
292                    catch (Exception e) {
293                            _log.error(e, e);
294    
295                            throw new RemoteException(e.getMessage());
296                    }
297            }
298    
299            public static void moveEntryToTrash(long entryId) throws RemoteException {
300                    try {
301                            BookmarksEntryServiceUtil.moveEntryToTrash(entryId);
302                    }
303                    catch (Exception e) {
304                            _log.error(e, e);
305    
306                            throw new RemoteException(e.getMessage());
307                    }
308            }
309    
310            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap openEntry(
311                    com.liferay.portlet.bookmarks.model.BookmarksEntrySoap entry)
312                    throws RemoteException {
313                    try {
314                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.openEntry(com.liferay.portlet.bookmarks.model.impl.BookmarksEntryModelImpl.toModel(
315                                                    entry));
316    
317                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModel(returnValue);
318                    }
319                    catch (Exception e) {
320                            _log.error(e, e);
321    
322                            throw new RemoteException(e.getMessage());
323                    }
324            }
325    
326            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap openEntry(
327                    long entryId) throws RemoteException {
328                    try {
329                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.openEntry(entryId);
330    
331                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModel(returnValue);
332                    }
333                    catch (Exception e) {
334                            _log.error(e, e);
335    
336                            throw new RemoteException(e.getMessage());
337                    }
338            }
339    
340            public static void restoreEntryFromTrash(long entryId)
341                    throws RemoteException {
342                    try {
343                            BookmarksEntryServiceUtil.restoreEntryFromTrash(entryId);
344                    }
345                    catch (Exception e) {
346                            _log.error(e, e);
347    
348                            throw new RemoteException(e.getMessage());
349                    }
350            }
351    
352            public static void subscribeEntry(long entryId) throws RemoteException {
353                    try {
354                            BookmarksEntryServiceUtil.subscribeEntry(entryId);
355                    }
356                    catch (Exception e) {
357                            _log.error(e, e);
358    
359                            throw new RemoteException(e.getMessage());
360                    }
361            }
362    
363            public static void unsubscribeEntry(long entryId) throws RemoteException {
364                    try {
365                            BookmarksEntryServiceUtil.unsubscribeEntry(entryId);
366                    }
367                    catch (Exception e) {
368                            _log.error(e, e);
369    
370                            throw new RemoteException(e.getMessage());
371                    }
372            }
373    
374            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap updateEntry(
375                    long entryId, long groupId, long folderId, java.lang.String name,
376                    java.lang.String url, java.lang.String description,
377                    com.liferay.portal.service.ServiceContext serviceContext)
378                    throws RemoteException {
379                    try {
380                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.updateEntry(entryId,
381                                            groupId, folderId, name, url, description, serviceContext);
382    
383                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModel(returnValue);
384                    }
385                    catch (Exception e) {
386                            _log.error(e, e);
387    
388                            throw new RemoteException(e.getMessage());
389                    }
390            }
391    
392            private static Log _log = LogFactoryUtil.getLog(BookmarksEntryServiceSoap.class);
393    }