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
053     * http://localhost:8080/api/secure/axis. Set the property
054     * <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
055     * security.
056     * </p>
057     *
058     * <p>
059     * The SOAP utility is only generated for remote services.
060     * </p>
061     *
062     * @author    Brian Wing Shun Chan
063     * @see       BookmarksEntryServiceHttp
064     * @see       com.liferay.portlet.bookmarks.model.BookmarksEntrySoap
065     * @see       com.liferay.portlet.bookmarks.service.BookmarksEntryServiceUtil
066     * @generated
067     */
068    public class BookmarksEntryServiceSoap {
069            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap addEntry(
070                    long groupId, long folderId, java.lang.String name,
071                    java.lang.String url, java.lang.String description,
072                    com.liferay.portal.service.ServiceContext serviceContext)
073                    throws RemoteException {
074                    try {
075                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.addEntry(groupId,
076                                            folderId, name, url, description, serviceContext);
077    
078                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.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 deleteEntry(long entryId) throws RemoteException {
088                    try {
089                            BookmarksEntryServiceUtil.deleteEntry(entryId);
090                    }
091                    catch (Exception e) {
092                            _log.error(e, e);
093    
094                            throw new RemoteException(e.getMessage());
095                    }
096            }
097    
098            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap[] getEntries(
099                    long groupId, long folderId, int start, int end)
100                    throws RemoteException {
101                    try {
102                            java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> returnValue =
103                                    BookmarksEntryServiceUtil.getEntries(groupId, folderId, start,
104                                            end);
105    
106                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModels(returnValue);
107                    }
108                    catch (Exception e) {
109                            _log.error(e, e);
110    
111                            throw new RemoteException(e.getMessage());
112                    }
113            }
114    
115            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap[] getEntries(
116                    long groupId, long folderId, int start, int end,
117                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
118                    throws RemoteException {
119                    try {
120                            java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> returnValue =
121                                    BookmarksEntryServiceUtil.getEntries(groupId, folderId, start,
122                                            end, orderByComparator);
123    
124                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModels(returnValue);
125                    }
126                    catch (Exception e) {
127                            _log.error(e, e);
128    
129                            throw new RemoteException(e.getMessage());
130                    }
131            }
132    
133            public static int getEntriesCount(long groupId, long folderId)
134                    throws RemoteException {
135                    try {
136                            int returnValue = BookmarksEntryServiceUtil.getEntriesCount(groupId,
137                                            folderId);
138    
139                            return returnValue;
140                    }
141                    catch (Exception e) {
142                            _log.error(e, e);
143    
144                            throw new RemoteException(e.getMessage());
145                    }
146            }
147    
148            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap getEntry(
149                    long entryId) throws RemoteException {
150                    try {
151                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.getEntry(entryId);
152    
153                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModel(returnValue);
154                    }
155                    catch (Exception e) {
156                            _log.error(e, e);
157    
158                            throw new RemoteException(e.getMessage());
159                    }
160            }
161    
162            public static int getFoldersEntriesCount(long groupId, Long[] folderIds)
163                    throws RemoteException {
164                    try {
165                            int returnValue = BookmarksEntryServiceUtil.getFoldersEntriesCount(groupId,
166                                            ListUtil.toList(folderIds));
167    
168                            return returnValue;
169                    }
170                    catch (Exception e) {
171                            _log.error(e, e);
172    
173                            throw new RemoteException(e.getMessage());
174                    }
175            }
176    
177            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap[] getGroupEntries(
178                    long groupId, int start, int end) throws RemoteException {
179                    try {
180                            java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> returnValue =
181                                    BookmarksEntryServiceUtil.getGroupEntries(groupId, start, end);
182    
183                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModels(returnValue);
184                    }
185                    catch (Exception e) {
186                            _log.error(e, e);
187    
188                            throw new RemoteException(e.getMessage());
189                    }
190            }
191    
192            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap[] getGroupEntries(
193                    long groupId, long userId, int start, int end)
194                    throws RemoteException {
195                    try {
196                            java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> returnValue =
197                                    BookmarksEntryServiceUtil.getGroupEntries(groupId, userId,
198                                            start, end);
199    
200                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModels(returnValue);
201                    }
202                    catch (Exception e) {
203                            _log.error(e, e);
204    
205                            throw new RemoteException(e.getMessage());
206                    }
207            }
208    
209            public static int getGroupEntriesCount(long groupId)
210                    throws RemoteException {
211                    try {
212                            int returnValue = BookmarksEntryServiceUtil.getGroupEntriesCount(groupId);
213    
214                            return returnValue;
215                    }
216                    catch (Exception e) {
217                            _log.error(e, e);
218    
219                            throw new RemoteException(e.getMessage());
220                    }
221            }
222    
223            public static int getGroupEntriesCount(long groupId, long userId)
224                    throws RemoteException {
225                    try {
226                            int returnValue = BookmarksEntryServiceUtil.getGroupEntriesCount(groupId,
227                                            userId);
228    
229                            return returnValue;
230                    }
231                    catch (Exception e) {
232                            _log.error(e, e);
233    
234                            throw new RemoteException(e.getMessage());
235                    }
236            }
237    
238            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap openEntry(
239                    long entryId) throws RemoteException {
240                    try {
241                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.openEntry(entryId);
242    
243                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModel(returnValue);
244                    }
245                    catch (Exception e) {
246                            _log.error(e, e);
247    
248                            throw new RemoteException(e.getMessage());
249                    }
250            }
251    
252            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap updateEntry(
253                    long entryId, long groupId, long folderId, java.lang.String name,
254                    java.lang.String url, java.lang.String description,
255                    com.liferay.portal.service.ServiceContext serviceContext)
256                    throws RemoteException {
257                    try {
258                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.updateEntry(entryId,
259                                            groupId, folderId, name, url, description, serviceContext);
260    
261                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModel(returnValue);
262                    }
263                    catch (Exception e) {
264                            _log.error(e, e);
265    
266                            throw new RemoteException(e.getMessage());
267                    }
268            }
269    
270            private static Log _log = LogFactoryUtil.getLog(BookmarksEntryServiceSoap.class);
271    }