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 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 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                    java.lang.String coverImageCaption,
075                    com.liferay.portal.kernel.servlet.taglib.ui.ImageSelector coverImageImageSelector,
076                    com.liferay.portal.kernel.servlet.taglib.ui.ImageSelector smallImageImageSelector,
077                    com.liferay.portal.service.ServiceContext serviceContext)
078                    throws RemoteException {
079                    try {
080                            com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.addEntry(title,
081                                            subtitle, description, content, displayDateMonth,
082                                            displayDateDay, displayDateYear, displayDateHour,
083                                            displayDateMinute, allowPingbacks, allowTrackbacks,
084                                            trackbacks, coverImageCaption, coverImageImageSelector,
085                                            smallImageImageSelector, serviceContext);
086    
087                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModel(returnValue);
088                    }
089                    catch (Exception e) {
090                            _log.error(e, e);
091    
092                            throw new RemoteException(e.getMessage());
093                    }
094            }
095    
096            public static void deleteEntry(long entryId) throws RemoteException {
097                    try {
098                            BlogsEntryServiceUtil.deleteEntry(entryId);
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[] getCompanyEntries(
108                    long companyId, java.util.Date displayDate, int status, int max)
109                    throws RemoteException {
110                    try {
111                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
112                                    BlogsEntryServiceUtil.getCompanyEntries(companyId, displayDate,
113                                            status, max);
114    
115                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(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 getEntry(
125                    long entryId) throws RemoteException {
126                    try {
127                            com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.getEntry(entryId);
128    
129                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModel(returnValue);
130                    }
131                    catch (Exception e) {
132                            _log.error(e, e);
133    
134                            throw new RemoteException(e.getMessage());
135                    }
136            }
137    
138            public static com.liferay.portlet.blogs.model.BlogsEntrySoap getEntry(
139                    long groupId, java.lang.String urlTitle) throws RemoteException {
140                    try {
141                            com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.getEntry(groupId,
142                                            urlTitle);
143    
144                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModel(returnValue);
145                    }
146                    catch (Exception e) {
147                            _log.error(e, e);
148    
149                            throw new RemoteException(e.getMessage());
150                    }
151            }
152    
153            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupEntries(
154                    long groupId, java.util.Date displayDate, int status, int max)
155                    throws RemoteException {
156                    try {
157                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
158                                    BlogsEntryServiceUtil.getGroupEntries(groupId, displayDate,
159                                            status, max);
160    
161                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
162                    }
163                    catch (Exception e) {
164                            _log.error(e, e);
165    
166                            throw new RemoteException(e.getMessage());
167                    }
168            }
169    
170            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupEntries(
171                    long groupId, java.util.Date displayDate, int status, int start, int end)
172                    throws RemoteException {
173                    try {
174                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
175                                    BlogsEntryServiceUtil.getGroupEntries(groupId, displayDate,
176                                            status, start, 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 com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupEntries(
188                    long groupId, int status, int max) throws RemoteException {
189                    try {
190                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
191                                    BlogsEntryServiceUtil.getGroupEntries(groupId, status, max);
192    
193                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
194                    }
195                    catch (Exception e) {
196                            _log.error(e, e);
197    
198                            throw new RemoteException(e.getMessage());
199                    }
200            }
201    
202            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupEntries(
203                    long groupId, int status, int start, int end) throws RemoteException {
204                    try {
205                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
206                                    BlogsEntryServiceUtil.getGroupEntries(groupId, status, start,
207                                            end);
208    
209                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
210                    }
211                    catch (Exception e) {
212                            _log.error(e, e);
213    
214                            throw new RemoteException(e.getMessage());
215                    }
216            }
217    
218            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupEntries(
219                    long groupId, int status, int start, int end,
220                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.blogs.model.BlogsEntry> obc)
221                    throws RemoteException {
222                    try {
223                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
224                                    BlogsEntryServiceUtil.getGroupEntries(groupId, status, start,
225                                            end, obc);
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 int getGroupEntriesCount(long groupId,
237                    java.util.Date displayDate, int status) throws RemoteException {
238                    try {
239                            int returnValue = BlogsEntryServiceUtil.getGroupEntriesCount(groupId,
240                                            displayDate, status);
241    
242                            return returnValue;
243                    }
244                    catch (Exception e) {
245                            _log.error(e, e);
246    
247                            throw new RemoteException(e.getMessage());
248                    }
249            }
250    
251            public static int getGroupEntriesCount(long groupId, int status)
252                    throws RemoteException {
253                    try {
254                            int returnValue = BlogsEntryServiceUtil.getGroupEntriesCount(groupId,
255                                            status);
256    
257                            return returnValue;
258                    }
259                    catch (Exception e) {
260                            _log.error(e, e);
261    
262                            throw new RemoteException(e.getMessage());
263                    }
264            }
265    
266            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupsEntries(
267                    long companyId, long groupId, java.util.Date displayDate, int status,
268                    int max) throws RemoteException {
269                    try {
270                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
271                                    BlogsEntryServiceUtil.getGroupsEntries(companyId, groupId,
272                                            displayDate, status, max);
273    
274                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
275                    }
276                    catch (Exception e) {
277                            _log.error(e, e);
278    
279                            throw new RemoteException(e.getMessage());
280                    }
281            }
282    
283            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupUserEntries(
284                    long groupId, long userId, int status, int start, int end,
285                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.blogs.model.BlogsEntry> obc)
286                    throws RemoteException {
287                    try {
288                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
289                                    BlogsEntryServiceUtil.getGroupUserEntries(groupId, userId,
290                                            status, start, end, obc);
291    
292                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
293                    }
294                    catch (Exception e) {
295                            _log.error(e, e);
296    
297                            throw new RemoteException(e.getMessage());
298                    }
299            }
300    
301            public static int getGroupUserEntriesCount(long groupId, long userId,
302                    int status) throws RemoteException {
303                    try {
304                            int returnValue = BlogsEntryServiceUtil.getGroupUserEntriesCount(groupId,
305                                            userId, status);
306    
307                            return returnValue;
308                    }
309                    catch (Exception e) {
310                            _log.error(e, e);
311    
312                            throw new RemoteException(e.getMessage());
313                    }
314            }
315    
316            public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getOrganizationEntries(
317                    long organizationId, java.util.Date displayDate, int status, int max)
318                    throws RemoteException {
319                    try {
320                            java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue =
321                                    BlogsEntryServiceUtil.getOrganizationEntries(organizationId,
322                                            displayDate, status, max);
323    
324                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
325                    }
326                    catch (Exception e) {
327                            _log.error(e, e);
328    
329                            throw new RemoteException(e.getMessage());
330                    }
331            }
332    
333            public static com.liferay.portlet.blogs.model.BlogsEntrySoap moveEntryToTrash(
334                    long entryId) throws RemoteException {
335                    try {
336                            com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.moveEntryToTrash(entryId);
337    
338                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModel(returnValue);
339                    }
340                    catch (Exception e) {
341                            _log.error(e, e);
342    
343                            throw new RemoteException(e.getMessage());
344                    }
345            }
346    
347            public static void restoreEntryFromTrash(long entryId)
348                    throws RemoteException {
349                    try {
350                            BlogsEntryServiceUtil.restoreEntryFromTrash(entryId);
351                    }
352                    catch (Exception e) {
353                            _log.error(e, e);
354    
355                            throw new RemoteException(e.getMessage());
356                    }
357            }
358    
359            public static void subscribe(long groupId) throws RemoteException {
360                    try {
361                            BlogsEntryServiceUtil.subscribe(groupId);
362                    }
363                    catch (Exception e) {
364                            _log.error(e, e);
365    
366                            throw new RemoteException(e.getMessage());
367                    }
368            }
369    
370            public static void unsubscribe(long groupId) throws RemoteException {
371                    try {
372                            BlogsEntryServiceUtil.unsubscribe(groupId);
373                    }
374                    catch (Exception e) {
375                            _log.error(e, e);
376    
377                            throw new RemoteException(e.getMessage());
378                    }
379            }
380    
381            public static com.liferay.portlet.blogs.model.BlogsEntrySoap updateEntry(
382                    long entryId, java.lang.String title, java.lang.String subtitle,
383                    java.lang.String description, java.lang.String content,
384                    int displayDateMonth, int displayDateDay, int displayDateYear,
385                    int displayDateHour, int displayDateMinute, boolean allowPingbacks,
386                    boolean allowTrackbacks, java.lang.String[] trackbacks,
387                    java.lang.String coverImageCaption,
388                    com.liferay.portal.kernel.servlet.taglib.ui.ImageSelector coverImageImageSelector,
389                    com.liferay.portal.kernel.servlet.taglib.ui.ImageSelector smallImageImageSelector,
390                    com.liferay.portal.service.ServiceContext serviceContext)
391                    throws RemoteException {
392                    try {
393                            com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.updateEntry(entryId,
394                                            title, subtitle, description, content, displayDateMonth,
395                                            displayDateDay, displayDateYear, displayDateHour,
396                                            displayDateMinute, allowPingbacks, allowTrackbacks,
397                                            trackbacks, coverImageCaption, coverImageImageSelector,
398                                            smallImageImageSelector, serviceContext);
399    
400                            return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModel(returnValue);
401                    }
402                    catch (Exception e) {
403                            _log.error(e, e);
404    
405                            throw new RemoteException(e.getMessage());
406                    }
407            }
408    
409            private static Log _log = LogFactoryUtil.getLog(BlogsEntryServiceSoap.class);
410    }