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     * <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
052     * http://localhost:8080/api/secure/axis. Set the property
053     * <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       BlogsEntryServiceHttp
063     * @see       com.liferay.portlet.blogs.model.BlogsEntrySoap
064     * @see       com.liferay.portlet.blogs.service.BlogsEntryServiceUtil
065     * @generated
066     */
067    public class BlogsEntryServiceSoap {
068            public static void deleteEntry(long entryId) throws RemoteException {
069                    try {
070                            BlogsEntryServiceUtil.deleteEntry(entryId);
071                    }
072                    catch (Exception e) {
073                            _log.error(e, e);
074    
075                            throw new RemoteException(e.getMessage());
076                    }
077            }
078    
079            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getCompanyEntries(
080                    long companyId, java.util.Date displayDate, int status, int max)
081                    throws RemoteException {
082                    try {
083                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
084                                    BlogsEntryServiceUtil.getCompanyEntries(companyId, displayDate,
085                                            status, max);
086    
087                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
088                    }
089                    catch (Exception e) {
090                            _log.error(e, e);
091    
092                            throw new RemoteException(e.getMessage());
093                    }
094            }
095    
096            public static com.liferay.portlet.blogs.model.BlogsEntrySoap getEntry(
097                    long entryId) throws RemoteException {
098                    try {
099                            com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.getEntry(entryId);
100    
101                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModel(returnValue);
102                    }
103                    catch (Exception e) {
104                            _log.error(e, e);
105    
106                            throw new RemoteException(e.getMessage());
107                    }
108            }
109    
110            public static com.liferay.portlet.blogs.model.BlogsEntrySoap getEntry(
111                    long groupId, java.lang.String urlTitle) throws RemoteException {
112                    try {
113                            com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.getEntry(groupId,
114                                            urlTitle);
115    
116                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModel(returnValue);
117                    }
118                    catch (Exception e) {
119                            _log.error(e, e);
120    
121                            throw new RemoteException(e.getMessage());
122                    }
123            }
124    
125            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupEntries(
126                    long groupId, java.util.Date displayDate, int status, int max)
127                    throws RemoteException {
128                    try {
129                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
130                                    BlogsEntryServiceUtil.getGroupEntries(groupId, displayDate,
131                                            status, max);
132    
133                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
134                    }
135                    catch (Exception e) {
136                            _log.error(e, e);
137    
138                            throw new RemoteException(e.getMessage());
139                    }
140            }
141    
142            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupEntries(
143                    long groupId, java.util.Date displayDate, int status, int start, int end)
144                    throws RemoteException {
145                    try {
146                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
147                                    BlogsEntryServiceUtil.getGroupEntries(groupId, displayDate,
148                                            status, start, end);
149    
150                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
151                    }
152                    catch (Exception e) {
153                            _log.error(e, e);
154    
155                            throw new RemoteException(e.getMessage());
156                    }
157            }
158    
159            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupEntries(
160                    long groupId, int status, int max) throws RemoteException {
161                    try {
162                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
163                                    BlogsEntryServiceUtil.getGroupEntries(groupId, status, max);
164    
165                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
166                    }
167                    catch (Exception e) {
168                            _log.error(e, e);
169    
170                            throw new RemoteException(e.getMessage());
171                    }
172            }
173    
174            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupEntries(
175                    long groupId, int status, int start, int end) throws RemoteException {
176                    try {
177                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
178                                    BlogsEntryServiceUtil.getGroupEntries(groupId, status, start,
179                                            end);
180    
181                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
182                    }
183                    catch (Exception e) {
184                            _log.error(e, e);
185    
186                            throw new RemoteException(e.getMessage());
187                    }
188            }
189    
190            public static int getGroupEntriesCount(long groupId,
191                    java.util.Date displayDate, int status) throws RemoteException {
192                    try {
193                            int returnValue = BlogsEntryServiceUtil.getGroupEntriesCount(groupId,
194                                            displayDate, status);
195    
196                            return returnValue;
197                    }
198                    catch (Exception e) {
199                            _log.error(e, e);
200    
201                            throw new RemoteException(e.getMessage());
202                    }
203            }
204    
205            public static int getGroupEntriesCount(long groupId, int status)
206                    throws RemoteException {
207                    try {
208                            int returnValue = BlogsEntryServiceUtil.getGroupEntriesCount(groupId,
209                                            status);
210    
211                            return returnValue;
212                    }
213                    catch (Exception e) {
214                            _log.error(e, e);
215    
216                            throw new RemoteException(e.getMessage());
217                    }
218            }
219    
220            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupsEntries(
221                    long companyId, long groupId, java.util.Date displayDate, int status,
222                    int max) throws RemoteException {
223                    try {
224                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
225                                    BlogsEntryServiceUtil.getGroupsEntries(companyId, groupId,
226                                            displayDate, status, max);
227    
228                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(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.blogs.model.BlogsEntrySoap[] getOrganizationEntries(
238                    long organizationId, java.util.Date displayDate, int status, int max)
239                    throws RemoteException {
240                    try {
241                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
242                                    BlogsEntryServiceUtil.getOrganizationEntries(organizationId,
243                                            displayDate, status, max);
244    
245                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
246                    }
247                    catch (Exception e) {
248                            _log.error(e, e);
249    
250                            throw new RemoteException(e.getMessage());
251                    }
252            }
253    
254            public static void subscribe(long groupId) throws RemoteException {
255                    try {
256                            BlogsEntryServiceUtil.subscribe(groupId);
257                    }
258                    catch (Exception e) {
259                            _log.error(e, e);
260    
261                            throw new RemoteException(e.getMessage());
262                    }
263            }
264    
265            public static void unsubscribe(long groupId) throws RemoteException {
266                    try {
267                            BlogsEntryServiceUtil.unsubscribe(groupId);
268                    }
269                    catch (Exception e) {
270                            _log.error(e, e);
271    
272                            throw new RemoteException(e.getMessage());
273                    }
274            }
275    
276            private static Log _log = LogFactoryUtil.getLog(BlogsEntryServiceSoap.class);
277    }