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.blogs.service.http;
016    
017    import com.liferay.portal.kernel.log.Log;
018    import com.liferay.portal.kernel.log.LogFactoryUtil;
019    
020    import com.liferay.portlet.blogs.service.BlogsEntryServiceUtil;
021    
022    import java.rmi.RemoteException;
023    
024    /**
025     * Provides the SOAP utility for the
026     * {@link com.liferay.portlet.blogs.service.BlogsEntryServiceUtil} service utility. The
027     * static methods of this class calls the same methods of the service utility.
028     * However, the signatures are different because it is difficult for SOAP to
029     * support certain types.
030     *
031     * <p>
032     * ServiceBuilder follows certain rules in translating the methods. For example,
033     * if the method in the service utility returns a {@link java.util.List}, that
034     * is translated to an array of {@link com.liferay.portlet.blogs.model.BlogsEntrySoap}.
035     * If the method in the service utility returns a
036     * {@link com.liferay.portlet.blogs.model.BlogsEntry}, that is translated to a
037     * {@link com.liferay.portlet.blogs.model.BlogsEntrySoap}. Methods that SOAP cannot
038     * safely wire are skipped.
039     * </p>
040     *
041     * <p>
042     * The benefits of using the SOAP utility is that it is cross platform
043     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
044     * even Perl, to call the generated services. One drawback of SOAP is that it is
045     * slow because it needs to serialize all calls into a text format (XML).
046     * </p>
047     *
048     * <p>
049     * You can see a list of services at http://localhost:8080/api/axis. Set the
050     * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
051     * security.
052     * </p>
053     *
054     * <p>
055     * The SOAP utility is only generated for remote services.
056     * </p>
057     *
058     * @author Brian Wing Shun Chan
059     * @see BlogsEntryServiceHttp
060     * @see com.liferay.portlet.blogs.model.BlogsEntrySoap
061     * @see com.liferay.portlet.blogs.service.BlogsEntryServiceUtil
062     * @generated
063     */
064    public class BlogsEntryServiceSoap {
065            public static void deleteEntry(long entryId) throws RemoteException {
066                    try {
067                            BlogsEntryServiceUtil.deleteEntry(entryId);
068                    }
069                    catch (Exception e) {
070                            _log.error(e, e);
071    
072                            throw new RemoteException(e.getMessage());
073                    }
074            }
075    
076            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getCompanyEntries(
077                    long companyId, java.util.Date displayDate, int status, int max)
078                    throws RemoteException {
079                    try {
080                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
081                                    BlogsEntryServiceUtil.getCompanyEntries(companyId, displayDate,
082                                            status, max);
083    
084                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
085                    }
086                    catch (Exception e) {
087                            _log.error(e, e);
088    
089                            throw new RemoteException(e.getMessage());
090                    }
091            }
092    
093            public static com.liferay.portlet.blogs.model.BlogsEntrySoap getEntry(
094                    long entryId) throws RemoteException {
095                    try {
096                            com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.getEntry(entryId);
097    
098                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModel(returnValue);
099                    }
100                    catch (Exception e) {
101                            _log.error(e, e);
102    
103                            throw new RemoteException(e.getMessage());
104                    }
105            }
106    
107            public static com.liferay.portlet.blogs.model.BlogsEntrySoap getEntry(
108                    long groupId, java.lang.String urlTitle) throws RemoteException {
109                    try {
110                            com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.getEntry(groupId,
111                                            urlTitle);
112    
113                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.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 com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupEntries(
123                    long groupId, java.util.Date displayDate, int status, int max)
124                    throws RemoteException {
125                    try {
126                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
127                                    BlogsEntryServiceUtil.getGroupEntries(groupId, displayDate,
128                                            status, max);
129    
130                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
131                    }
132                    catch (Exception e) {
133                            _log.error(e, e);
134    
135                            throw new RemoteException(e.getMessage());
136                    }
137            }
138    
139            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupEntries(
140                    long groupId, java.util.Date displayDate, int status, int start, int end)
141                    throws RemoteException {
142                    try {
143                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
144                                    BlogsEntryServiceUtil.getGroupEntries(groupId, displayDate,
145                                            status, start, end);
146    
147                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
148                    }
149                    catch (Exception e) {
150                            _log.error(e, e);
151    
152                            throw new RemoteException(e.getMessage());
153                    }
154            }
155    
156            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupEntries(
157                    long groupId, int status, int max) throws RemoteException {
158                    try {
159                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
160                                    BlogsEntryServiceUtil.getGroupEntries(groupId, status, max);
161    
162                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
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.blogs.model.BlogsEntrySoap[] getGroupEntries(
172                    long groupId, int status, int start, int end) throws RemoteException {
173                    try {
174                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
175                                    BlogsEntryServiceUtil.getGroupEntries(groupId, status, start,
176                                            end);
177    
178                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
179                    }
180                    catch (Exception e) {
181                            _log.error(e, e);
182    
183                            throw new RemoteException(e.getMessage());
184                    }
185            }
186    
187            public static int getGroupEntriesCount(long groupId,
188                    java.util.Date displayDate, int status) throws RemoteException {
189                    try {
190                            int returnValue = BlogsEntryServiceUtil.getGroupEntriesCount(groupId,
191                                            displayDate, status);
192    
193                            return returnValue;
194                    }
195                    catch (Exception e) {
196                            _log.error(e, e);
197    
198                            throw new RemoteException(e.getMessage());
199                    }
200            }
201    
202            public static int getGroupEntriesCount(long groupId, int status)
203                    throws RemoteException {
204                    try {
205                            int returnValue = BlogsEntryServiceUtil.getGroupEntriesCount(groupId,
206                                            status);
207    
208                            return returnValue;
209                    }
210                    catch (Exception e) {
211                            _log.error(e, e);
212    
213                            throw new RemoteException(e.getMessage());
214                    }
215            }
216    
217            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupsEntries(
218                    long companyId, long groupId, java.util.Date displayDate, int status,
219                    int max) throws RemoteException {
220                    try {
221                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
222                                    BlogsEntryServiceUtil.getGroupsEntries(companyId, groupId,
223                                            displayDate, status, max);
224    
225                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
226                    }
227                    catch (Exception e) {
228                            _log.error(e, e);
229    
230                            throw new RemoteException(e.getMessage());
231                    }
232            }
233    
234            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getOrganizationEntries(
235                    long organizationId, java.util.Date displayDate, int status, int max)
236                    throws RemoteException {
237                    try {
238                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
239                                    BlogsEntryServiceUtil.getOrganizationEntries(organizationId,
240                                            displayDate, status, max);
241    
242                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
243                    }
244                    catch (Exception e) {
245                            _log.error(e, e);
246    
247                            throw new RemoteException(e.getMessage());
248                    }
249            }
250    
251            public static com.liferay.portlet.blogs.model.BlogsEntrySoap moveEntryToTrash(
252                    long entryId) throws RemoteException {
253                    try {
254                            com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.moveEntryToTrash(entryId);
255    
256                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModel(returnValue);
257                    }
258                    catch (Exception e) {
259                            _log.error(e, e);
260    
261                            throw new RemoteException(e.getMessage());
262                    }
263            }
264    
265            public static void restoreEntryFromTrash(long entryId)
266                    throws RemoteException {
267                    try {
268                            BlogsEntryServiceUtil.restoreEntryFromTrash(entryId);
269                    }
270                    catch (Exception e) {
271                            _log.error(e, e);
272    
273                            throw new RemoteException(e.getMessage());
274                    }
275            }
276    
277            public static void subscribe(long groupId) throws RemoteException {
278                    try {
279                            BlogsEntryServiceUtil.subscribe(groupId);
280                    }
281                    catch (Exception e) {
282                            _log.error(e, e);
283    
284                            throw new RemoteException(e.getMessage());
285                    }
286            }
287    
288            public static void unsubscribe(long groupId) throws RemoteException {
289                    try {
290                            BlogsEntryServiceUtil.unsubscribe(groupId);
291                    }
292                    catch (Exception e) {
293                            _log.error(e, e);
294    
295                            throw new RemoteException(e.getMessage());
296                    }
297            }
298    
299            private static Log _log = LogFactoryUtil.getLog(BlogsEntryServiceSoap.class);
300    }