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.blogs.kernel.service.BlogsEntryServiceUtil;
020    
021    import com.liferay.portal.kernel.log.Log;
022    import com.liferay.portal.kernel.log.LogFactoryUtil;
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.blogs.kernel.model.BlogsEntrySoap}.
037     * If the method in the service utility returns a
038     * {@link com.liferay.blogs.kernel.model.BlogsEntry}, that is translated to a
039     * {@link com.liferay.blogs.kernel.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.blogs.kernel.model.BlogsEntrySoap
063     * @see BlogsEntryServiceUtil
064     * @generated
065     */
066    @ProviderType
067    public class BlogsEntryServiceSoap {
068            public static com.liferay.blogs.kernel.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.kernel.service.ServiceContext serviceContext)
078                    throws RemoteException {
079                    try {
080                            com.liferay.blogs.kernel.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.blogs.kernel.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.blogs.kernel.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.blogs.kernel.model.BlogsEntry> returnValue =
112                                    BlogsEntryServiceUtil.getCompanyEntries(companyId, displayDate,
113                                            status, max);
114    
115                            return com.liferay.blogs.kernel.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.blogs.kernel.model.BlogsEntrySoap getEntry(
125                    long entryId) throws RemoteException {
126                    try {
127                            com.liferay.blogs.kernel.model.BlogsEntry returnValue = BlogsEntryServiceUtil.getEntry(entryId);
128    
129                            return com.liferay.blogs.kernel.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.blogs.kernel.model.BlogsEntrySoap getEntry(
139                    long groupId, java.lang.String urlTitle) throws RemoteException {
140                    try {
141                            com.liferay.blogs.kernel.model.BlogsEntry returnValue = BlogsEntryServiceUtil.getEntry(groupId,
142                                            urlTitle);
143    
144                            return com.liferay.blogs.kernel.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.blogs.kernel.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.blogs.kernel.model.BlogsEntry> returnValue =
158                                    BlogsEntryServiceUtil.getGroupEntries(groupId, displayDate,
159                                            status, max);
160    
161                            return com.liferay.blogs.kernel.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.blogs.kernel.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.blogs.kernel.model.BlogsEntry> returnValue =
175                                    BlogsEntryServiceUtil.getGroupEntries(groupId, displayDate,
176                                            status, start, end);
177    
178                            return com.liferay.blogs.kernel.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.blogs.kernel.model.BlogsEntrySoap[] getGroupEntries(
188                    long groupId, int status, int max) throws RemoteException {
189                    try {
190                            java.util.List<com.liferay.blogs.kernel.model.BlogsEntry> returnValue =
191                                    BlogsEntryServiceUtil.getGroupEntries(groupId, status, max);
192    
193                            return com.liferay.blogs.kernel.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.blogs.kernel.model.BlogsEntrySoap[] getGroupEntries(
203                    long groupId, int status, int start, int end) throws RemoteException {
204                    try {
205                            java.util.List<com.liferay.blogs.kernel.model.BlogsEntry> returnValue =
206                                    BlogsEntryServiceUtil.getGroupEntries(groupId, status, start,
207                                            end);
208    
209                            return com.liferay.blogs.kernel.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.blogs.kernel.model.BlogsEntrySoap[] getGroupEntries(
219                    long groupId, int status, int start, int end,
220                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.blogs.kernel.model.BlogsEntry> obc)
221                    throws RemoteException {
222                    try {
223                            java.util.List<com.liferay.blogs.kernel.model.BlogsEntry> returnValue =
224                                    BlogsEntryServiceUtil.getGroupEntries(groupId, status, start,
225                                            end, obc);
226    
227                            return com.liferay.blogs.kernel.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.blogs.kernel.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.blogs.kernel.model.BlogsEntry> returnValue =
271                                    BlogsEntryServiceUtil.getGroupsEntries(companyId, groupId,
272                                            displayDate, status, max);
273    
274                            return com.liferay.blogs.kernel.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.blogs.kernel.model.BlogsEntrySoap[] getGroupUserEntries(
284                    long groupId, long userId, int status, int start, int end,
285                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.blogs.kernel.model.BlogsEntry> obc)
286                    throws RemoteException {
287                    try {
288                            java.util.List<com.liferay.blogs.kernel.model.BlogsEntry> returnValue =
289                                    BlogsEntryServiceUtil.getGroupUserEntries(groupId, userId,
290                                            status, start, end, obc);
291    
292                            return com.liferay.blogs.kernel.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 com.liferay.blogs.kernel.model.BlogsEntrySoap[] getGroupUserEntries(
302                    long groupId, long userId, int[] statuses, int start, int end,
303                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.blogs.kernel.model.BlogsEntry> obc)
304                    throws RemoteException {
305                    try {
306                            java.util.List<com.liferay.blogs.kernel.model.BlogsEntry> returnValue =
307                                    BlogsEntryServiceUtil.getGroupUserEntries(groupId, userId,
308                                            statuses, start, end, obc);
309    
310                            return com.liferay.blogs.kernel.model.BlogsEntrySoap.toSoapModels(returnValue);
311                    }
312                    catch (Exception e) {
313                            _log.error(e, e);
314    
315                            throw new RemoteException(e.getMessage());
316                    }
317            }
318    
319            public static int getGroupUserEntriesCount(long groupId, long userId,
320                    int status) throws RemoteException {
321                    try {
322                            int returnValue = BlogsEntryServiceUtil.getGroupUserEntriesCount(groupId,
323                                            userId, status);
324    
325                            return returnValue;
326                    }
327                    catch (Exception e) {
328                            _log.error(e, e);
329    
330                            throw new RemoteException(e.getMessage());
331                    }
332            }
333    
334            public static int getGroupUserEntriesCount(long groupId, long userId,
335                    int[] statuses) throws RemoteException {
336                    try {
337                            int returnValue = BlogsEntryServiceUtil.getGroupUserEntriesCount(groupId,
338                                            userId, statuses);
339    
340                            return returnValue;
341                    }
342                    catch (Exception e) {
343                            _log.error(e, e);
344    
345                            throw new RemoteException(e.getMessage());
346                    }
347            }
348    
349            public static com.liferay.blogs.kernel.model.BlogsEntrySoap[] getOrganizationEntries(
350                    long organizationId, java.util.Date displayDate, int status, int max)
351                    throws RemoteException {
352                    try {
353                            java.util.List<com.liferay.blogs.kernel.model.BlogsEntry> returnValue =
354                                    BlogsEntryServiceUtil.getOrganizationEntries(organizationId,
355                                            displayDate, status, max);
356    
357                            return com.liferay.blogs.kernel.model.BlogsEntrySoap.toSoapModels(returnValue);
358                    }
359                    catch (Exception e) {
360                            _log.error(e, e);
361    
362                            throw new RemoteException(e.getMessage());
363                    }
364            }
365    
366            public static com.liferay.blogs.kernel.model.BlogsEntrySoap moveEntryToTrash(
367                    long entryId) throws RemoteException {
368                    try {
369                            com.liferay.blogs.kernel.model.BlogsEntry returnValue = BlogsEntryServiceUtil.moveEntryToTrash(entryId);
370    
371                            return com.liferay.blogs.kernel.model.BlogsEntrySoap.toSoapModel(returnValue);
372                    }
373                    catch (Exception e) {
374                            _log.error(e, e);
375    
376                            throw new RemoteException(e.getMessage());
377                    }
378            }
379    
380            public static void restoreEntryFromTrash(long entryId)
381                    throws RemoteException {
382                    try {
383                            BlogsEntryServiceUtil.restoreEntryFromTrash(entryId);
384                    }
385                    catch (Exception e) {
386                            _log.error(e, e);
387    
388                            throw new RemoteException(e.getMessage());
389                    }
390            }
391    
392            public static void subscribe(long groupId) throws RemoteException {
393                    try {
394                            BlogsEntryServiceUtil.subscribe(groupId);
395                    }
396                    catch (Exception e) {
397                            _log.error(e, e);
398    
399                            throw new RemoteException(e.getMessage());
400                    }
401            }
402    
403            public static void unsubscribe(long groupId) throws RemoteException {
404                    try {
405                            BlogsEntryServiceUtil.unsubscribe(groupId);
406                    }
407                    catch (Exception e) {
408                            _log.error(e, e);
409    
410                            throw new RemoteException(e.getMessage());
411                    }
412            }
413    
414            public static com.liferay.blogs.kernel.model.BlogsEntrySoap updateEntry(
415                    long entryId, java.lang.String title, java.lang.String subtitle,
416                    java.lang.String description, java.lang.String content,
417                    int displayDateMonth, int displayDateDay, int displayDateYear,
418                    int displayDateHour, int displayDateMinute, boolean allowPingbacks,
419                    boolean allowTrackbacks, java.lang.String[] trackbacks,
420                    java.lang.String coverImageCaption,
421                    com.liferay.portal.kernel.servlet.taglib.ui.ImageSelector coverImageImageSelector,
422                    com.liferay.portal.kernel.servlet.taglib.ui.ImageSelector smallImageImageSelector,
423                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
424                    throws RemoteException {
425                    try {
426                            com.liferay.blogs.kernel.model.BlogsEntry returnValue = BlogsEntryServiceUtil.updateEntry(entryId,
427                                            title, subtitle, description, content, displayDateMonth,
428                                            displayDateDay, displayDateYear, displayDateHour,
429                                            displayDateMinute, allowPingbacks, allowTrackbacks,
430                                            trackbacks, coverImageCaption, coverImageImageSelector,
431                                            smallImageImageSelector, serviceContext);
432    
433                            return com.liferay.blogs.kernel.model.BlogsEntrySoap.toSoapModel(returnValue);
434                    }
435                    catch (Exception e) {
436                            _log.error(e, e);
437    
438                            throw new RemoteException(e.getMessage());
439                    }
440            }
441    
442            private static Log _log = LogFactoryUtil.getLog(BlogsEntryServiceSoap.class);
443    }