001    /**
002     * Copyright (c) 2000-2012 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 int getGroupEntriesCount(long groupId)
209                    throws RemoteException {
210                    try {
211                            int returnValue = BookmarksEntryServiceUtil.getGroupEntriesCount(groupId);
212    
213                            return returnValue;
214                    }
215                    catch (Exception e) {
216                            _log.error(e, e);
217    
218                            throw new RemoteException(e.getMessage());
219                    }
220            }
221    
222            public static int getGroupEntriesCount(long groupId, long userId)
223                    throws RemoteException {
224                    try {
225                            int returnValue = BookmarksEntryServiceUtil.getGroupEntriesCount(groupId,
226                                            userId);
227    
228                            return returnValue;
229                    }
230                    catch (Exception e) {
231                            _log.error(e, e);
232    
233                            throw new RemoteException(e.getMessage());
234                    }
235            }
236    
237            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap openEntry(
238                    long entryId) throws RemoteException {
239                    try {
240                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.openEntry(entryId);
241    
242                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModel(returnValue);
243                    }
244                    catch (Exception e) {
245                            _log.error(e, e);
246    
247                            throw new RemoteException(e.getMessage());
248                    }
249            }
250    
251            public static void subscribeEntry(long entryId) throws RemoteException {
252                    try {
253                            BookmarksEntryServiceUtil.subscribeEntry(entryId);
254                    }
255                    catch (Exception e) {
256                            _log.error(e, e);
257    
258                            throw new RemoteException(e.getMessage());
259                    }
260            }
261    
262            public static void unsubscribeEntry(long entryId) throws RemoteException {
263                    try {
264                            BookmarksEntryServiceUtil.unsubscribeEntry(entryId);
265                    }
266                    catch (Exception e) {
267                            _log.error(e, e);
268    
269                            throw new RemoteException(e.getMessage());
270                    }
271            }
272    
273            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap updateEntry(
274                    long entryId, long groupId, long folderId, java.lang.String name,
275                    java.lang.String url, java.lang.String description,
276                    com.liferay.portal.service.ServiceContext serviceContext)
277                    throws RemoteException {
278                    try {
279                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.updateEntry(entryId,
280                                            groupId, folderId, name, url, description, serviceContext);
281    
282                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModel(returnValue);
283                    }
284                    catch (Exception e) {
285                            _log.error(e, e);
286    
287                            throw new RemoteException(e.getMessage());
288                    }
289            }
290    
291            private static Log _log = LogFactoryUtil.getLog(BookmarksEntryServiceSoap.class);
292    }