001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.log.Log;
020    import com.liferay.portal.kernel.log.LogFactoryUtil;
021    
022    import com.liferay.portlet.blogs.service.BlogsEntryServiceUtil;
023    
024    import java.rmi.RemoteException;
025    
026    /**
027     * Provides the SOAP utility for the
028     * {@link com.liferay.portlet.blogs.service.BlogsEntryServiceUtil} 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     *
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    @ProviderType
067    public class BlogsEntryServiceSoap {
068            public static com.liferay.portlet.blogs.model.BlogsEntrySoap addEntry(
069                    java.lang.String title, java.lang.String subtitle,
070                    java.lang.String description, java.lang.String content,
071                    int displayDateMonth, int displayDateDay, int displayDateYear,
072                    int displayDateHour, int displayDateMinute, boolean allowPingbacks,
073                    boolean allowTrackbacks, java.lang.String[] trackbacks,
074                    com.liferay.portal.kernel.servlet.taglib.ui.ImageSelector coverImageImageSelector,
075                    com.liferay.portal.kernel.servlet.taglib.ui.ImageSelector smallImageImageSelector,
076                    com.liferay.portal.service.ServiceContext serviceContext)
077                    throws RemoteException {
078                    try {
079                            com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.addEntry(title,
080                                            subtitle, description, content, displayDateMonth,
081                                            displayDateDay, displayDateYear, displayDateHour,
082                                            displayDateMinute, allowPingbacks, allowTrackbacks,
083                                            trackbacks, coverImageImageSelector,
084                                            smallImageImageSelector, serviceContext);
085    
086                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModel(returnValue);
087                    }
088                    catch (Exception e) {
089                            _log.error(e, e);
090    
091                            throw new RemoteException(e.getMessage());
092                    }
093            }
094    
095            public static void deleteEntry(long entryId) throws RemoteException {
096                    try {
097                            BlogsEntryServiceUtil.deleteEntry(entryId);
098                    }
099                    catch (Exception e) {
100                            _log.error(e, e);
101    
102                            throw new RemoteException(e.getMessage());
103                    }
104            }
105    
106            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getCompanyEntries(
107                    long companyId, java.util.Date displayDate, int status, int max)
108                    throws RemoteException {
109                    try {
110                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
111                                    BlogsEntryServiceUtil.getCompanyEntries(companyId, displayDate,
112                                            status, max);
113    
114                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
115                    }
116                    catch (Exception e) {
117                            _log.error(e, e);
118    
119                            throw new RemoteException(e.getMessage());
120                    }
121            }
122    
123            public static com.liferay.portlet.blogs.model.BlogsEntrySoap getEntry(
124                    long entryId) throws RemoteException {
125                    try {
126                            com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.getEntry(entryId);
127    
128                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModel(returnValue);
129                    }
130                    catch (Exception e) {
131                            _log.error(e, e);
132    
133                            throw new RemoteException(e.getMessage());
134                    }
135            }
136    
137            public static com.liferay.portlet.blogs.model.BlogsEntrySoap getEntry(
138                    long groupId, java.lang.String urlTitle) throws RemoteException {
139                    try {
140                            com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.getEntry(groupId,
141                                            urlTitle);
142    
143                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModel(returnValue);
144                    }
145                    catch (Exception e) {
146                            _log.error(e, e);
147    
148                            throw new RemoteException(e.getMessage());
149                    }
150            }
151    
152            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupEntries(
153                    long groupId, java.util.Date displayDate, int status, int max)
154                    throws RemoteException {
155                    try {
156                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
157                                    BlogsEntryServiceUtil.getGroupEntries(groupId, displayDate,
158                                            status, max);
159    
160                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
161                    }
162                    catch (Exception e) {
163                            _log.error(e, e);
164    
165                            throw new RemoteException(e.getMessage());
166                    }
167            }
168    
169            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupEntries(
170                    long groupId, java.util.Date displayDate, int status, int start, int end)
171                    throws RemoteException {
172                    try {
173                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
174                                    BlogsEntryServiceUtil.getGroupEntries(groupId, displayDate,
175                                            status, start, end);
176    
177                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
178                    }
179                    catch (Exception e) {
180                            _log.error(e, e);
181    
182                            throw new RemoteException(e.getMessage());
183                    }
184            }
185    
186            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupEntries(
187                    long groupId, int status, int max) throws RemoteException {
188                    try {
189                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
190                                    BlogsEntryServiceUtil.getGroupEntries(groupId, status, max);
191    
192                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
193                    }
194                    catch (Exception e) {
195                            _log.error(e, e);
196    
197                            throw new RemoteException(e.getMessage());
198                    }
199            }
200    
201            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupEntries(
202                    long groupId, int status, int start, int end) throws RemoteException {
203                    try {
204                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
205                                    BlogsEntryServiceUtil.getGroupEntries(groupId, status, start,
206                                            end);
207    
208                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
209                    }
210                    catch (Exception e) {
211                            _log.error(e, e);
212    
213                            throw new RemoteException(e.getMessage());
214                    }
215            }
216    
217            public static int getGroupEntriesCount(long groupId,
218                    java.util.Date displayDate, int status) throws RemoteException {
219                    try {
220                            int returnValue = BlogsEntryServiceUtil.getGroupEntriesCount(groupId,
221                                            displayDate, status);
222    
223                            return returnValue;
224                    }
225                    catch (Exception e) {
226                            _log.error(e, e);
227    
228                            throw new RemoteException(e.getMessage());
229                    }
230            }
231    
232            public static int getGroupEntriesCount(long groupId, int status)
233                    throws RemoteException {
234                    try {
235                            int returnValue = BlogsEntryServiceUtil.getGroupEntriesCount(groupId,
236                                            status);
237    
238                            return returnValue;
239                    }
240                    catch (Exception e) {
241                            _log.error(e, e);
242    
243                            throw new RemoteException(e.getMessage());
244                    }
245            }
246    
247            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupsEntries(
248                    long companyId, long groupId, java.util.Date displayDate, int status,
249                    int max) throws RemoteException {
250                    try {
251                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
252                                    BlogsEntryServiceUtil.getGroupsEntries(companyId, groupId,
253                                            displayDate, status, max);
254    
255                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
256                    }
257                    catch (Exception e) {
258                            _log.error(e, e);
259    
260                            throw new RemoteException(e.getMessage());
261                    }
262            }
263    
264            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getOrganizationEntries(
265                    long organizationId, java.util.Date displayDate, int status, int max)
266                    throws RemoteException {
267                    try {
268                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
269                                    BlogsEntryServiceUtil.getOrganizationEntries(organizationId,
270                                            displayDate, status, max);
271    
272                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
273                    }
274                    catch (Exception e) {
275                            _log.error(e, e);
276    
277                            throw new RemoteException(e.getMessage());
278                    }
279            }
280    
281            public static com.liferay.portlet.blogs.model.BlogsEntrySoap moveEntryToTrash(
282                    long entryId) throws RemoteException {
283                    try {
284                            com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.moveEntryToTrash(entryId);
285    
286                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModel(returnValue);
287                    }
288                    catch (Exception e) {
289                            _log.error(e, e);
290    
291                            throw new RemoteException(e.getMessage());
292                    }
293            }
294    
295            public static void restoreEntryFromTrash(long entryId)
296                    throws RemoteException {
297                    try {
298                            BlogsEntryServiceUtil.restoreEntryFromTrash(entryId);
299                    }
300                    catch (Exception e) {
301                            _log.error(e, e);
302    
303                            throw new RemoteException(e.getMessage());
304                    }
305            }
306    
307            public static void subscribe(long groupId) throws RemoteException {
308                    try {
309                            BlogsEntryServiceUtil.subscribe(groupId);
310                    }
311                    catch (Exception e) {
312                            _log.error(e, e);
313    
314                            throw new RemoteException(e.getMessage());
315                    }
316            }
317    
318            public static void unsubscribe(long groupId) throws RemoteException {
319                    try {
320                            BlogsEntryServiceUtil.unsubscribe(groupId);
321                    }
322                    catch (Exception e) {
323                            _log.error(e, e);
324    
325                            throw new RemoteException(e.getMessage());
326                    }
327            }
328    
329            public static com.liferay.portlet.blogs.model.BlogsEntrySoap updateEntry(
330                    long entryId, java.lang.String title, java.lang.String subtitle,
331                    java.lang.String description, java.lang.String content,
332                    int displayDateMonth, int displayDateDay, int displayDateYear,
333                    int displayDateHour, int displayDateMinute, boolean allowPingbacks,
334                    boolean allowTrackbacks, java.lang.String[] trackbacks,
335                    com.liferay.portal.kernel.servlet.taglib.ui.ImageSelector coverImageImageSelector,
336                    com.liferay.portal.kernel.servlet.taglib.ui.ImageSelector smallImageImageSelector,
337                    com.liferay.portal.service.ServiceContext serviceContext)
338                    throws RemoteException {
339                    try {
340                            com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.updateEntry(entryId,
341                                            title, subtitle, description, content, displayDateMonth,
342                                            displayDateDay, displayDateYear, displayDateHour,
343                                            displayDateMinute, allowPingbacks, allowTrackbacks,
344                                            trackbacks, coverImageImageSelector,
345                                            smallImageImageSelector, serviceContext);
346    
347                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModel(returnValue);
348                    }
349                    catch (Exception e) {
350                            _log.error(e, e);
351    
352                            throw new RemoteException(e.getMessage());
353                    }
354            }
355    
356            private static Log _log = LogFactoryUtil.getLog(BlogsEntryServiceSoap.class);
357    }