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