001    /**
002     * Copyright (c) 2000-2011 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.journal.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.journal.service.JournalArticleServiceUtil;
021    
022    import java.rmi.RemoteException;
023    
024    /**
025     * <p>
026     * This class provides a SOAP utility for the
027     * {@link com.liferay.portlet.journal.service.JournalArticleServiceUtil} 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.journal.model.JournalArticleSoap}.
037     * If the method in the service utility returns a
038     * {@link com.liferay.portlet.journal.model.JournalArticle}, that is translated to a
039     * {@link com.liferay.portlet.journal.model.JournalArticleSoap}. 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       JournalArticleServiceHttp
063     * @see       com.liferay.portlet.journal.model.JournalArticleSoap
064     * @see       com.liferay.portlet.journal.service.JournalArticleServiceUtil
065     * @generated
066     */
067    public class JournalArticleServiceSoap {
068            public static com.liferay.portlet.journal.model.JournalArticleSoap copyArticle(
069                    long groupId, java.lang.String oldArticleId,
070                    java.lang.String newArticleId, boolean autoArticleId, double version)
071                    throws RemoteException {
072                    try {
073                            com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.copyArticle(groupId,
074                                            oldArticleId, newArticleId, autoArticleId, version);
075    
076                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
077                    }
078                    catch (Exception e) {
079                            _log.error(e, e);
080    
081                            throw new RemoteException(e.getMessage());
082                    }
083            }
084    
085            public static void deleteArticle(long groupId, java.lang.String articleId,
086                    double version, java.lang.String articleURL,
087                    com.liferay.portal.service.ServiceContext serviceContext)
088                    throws RemoteException {
089                    try {
090                            JournalArticleServiceUtil.deleteArticle(groupId, articleId,
091                                    version, articleURL, serviceContext);
092                    }
093                    catch (Exception e) {
094                            _log.error(e, e);
095    
096                            throw new RemoteException(e.getMessage());
097                    }
098            }
099    
100            public static void deleteArticle(long groupId, java.lang.String articleId,
101                    java.lang.String articleURL,
102                    com.liferay.portal.service.ServiceContext serviceContext)
103                    throws RemoteException {
104                    try {
105                            JournalArticleServiceUtil.deleteArticle(groupId, articleId,
106                                    articleURL, serviceContext);
107                    }
108                    catch (Exception e) {
109                            _log.error(e, e);
110    
111                            throw new RemoteException(e.getMessage());
112                    }
113            }
114    
115            public static com.liferay.portlet.journal.model.JournalArticleSoap expireArticle(
116                    long groupId, java.lang.String articleId, double version,
117                    java.lang.String articleURL,
118                    com.liferay.portal.service.ServiceContext serviceContext)
119                    throws RemoteException {
120                    try {
121                            com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.expireArticle(groupId,
122                                            articleId, version, articleURL, serviceContext);
123    
124                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
125                    }
126                    catch (Exception e) {
127                            _log.error(e, e);
128    
129                            throw new RemoteException(e.getMessage());
130                    }
131            }
132    
133            public static void expireArticle(long groupId, java.lang.String articleId,
134                    java.lang.String articleURL,
135                    com.liferay.portal.service.ServiceContext serviceContext)
136                    throws RemoteException {
137                    try {
138                            JournalArticleServiceUtil.expireArticle(groupId, articleId,
139                                    articleURL, serviceContext);
140                    }
141                    catch (Exception e) {
142                            _log.error(e, e);
143    
144                            throw new RemoteException(e.getMessage());
145                    }
146            }
147    
148            public static com.liferay.portlet.journal.model.JournalArticleSoap getArticle(
149                    long id) throws RemoteException {
150                    try {
151                            com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getArticle(id);
152    
153                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
154                    }
155                    catch (Exception e) {
156                            _log.error(e, e);
157    
158                            throw new RemoteException(e.getMessage());
159                    }
160            }
161    
162            public static com.liferay.portlet.journal.model.JournalArticleSoap getArticle(
163                    long groupId, java.lang.String articleId) throws RemoteException {
164                    try {
165                            com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getArticle(groupId,
166                                            articleId);
167    
168                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
169                    }
170                    catch (Exception e) {
171                            _log.error(e, e);
172    
173                            throw new RemoteException(e.getMessage());
174                    }
175            }
176    
177            public static com.liferay.portlet.journal.model.JournalArticleSoap getArticle(
178                    long groupId, java.lang.String articleId, double version)
179                    throws RemoteException {
180                    try {
181                            com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getArticle(groupId,
182                                            articleId, version);
183    
184                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
185                    }
186                    catch (Exception e) {
187                            _log.error(e, e);
188    
189                            throw new RemoteException(e.getMessage());
190                    }
191            }
192    
193            public static com.liferay.portlet.journal.model.JournalArticleSoap getArticle(
194                    long groupId, java.lang.String className, long classPK)
195                    throws RemoteException {
196                    try {
197                            com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getArticle(groupId,
198                                            className, classPK);
199    
200                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
201                    }
202                    catch (Exception e) {
203                            _log.error(e, e);
204    
205                            throw new RemoteException(e.getMessage());
206                    }
207            }
208    
209            public static com.liferay.portlet.journal.model.JournalArticleSoap getArticleByUrlTitle(
210                    long groupId, java.lang.String urlTitle) throws RemoteException {
211                    try {
212                            com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getArticleByUrlTitle(groupId,
213                                            urlTitle);
214    
215                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
216                    }
217                    catch (Exception e) {
218                            _log.error(e, e);
219    
220                            throw new RemoteException(e.getMessage());
221                    }
222            }
223    
224            public static com.liferay.portlet.journal.model.JournalArticleSoap[] getArticlesByArticleId(
225                    long groupId, java.lang.String articleId, int start, int end,
226                    com.liferay.portal.kernel.util.OrderByComparator obc)
227                    throws RemoteException {
228                    try {
229                            java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue =
230                                    JournalArticleServiceUtil.getArticlesByArticleId(groupId,
231                                            articleId, start, end, obc);
232    
233                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue);
234                    }
235                    catch (Exception e) {
236                            _log.error(e, e);
237    
238                            throw new RemoteException(e.getMessage());
239                    }
240            }
241    
242            public static com.liferay.portlet.journal.model.JournalArticleSoap[] getArticlesByLayoutUuid(
243                    long groupId, java.lang.String layoutUuid) throws RemoteException {
244                    try {
245                            java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue =
246                                    JournalArticleServiceUtil.getArticlesByLayoutUuid(groupId,
247                                            layoutUuid);
248    
249                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue);
250                    }
251                    catch (Exception e) {
252                            _log.error(e, e);
253    
254                            throw new RemoteException(e.getMessage());
255                    }
256            }
257    
258            public static int getArticlesCountByArticleId(long groupId,
259                    java.lang.String articleId) throws RemoteException {
260                    try {
261                            int returnValue = JournalArticleServiceUtil.getArticlesCountByArticleId(groupId,
262                                            articleId);
263    
264                            return returnValue;
265                    }
266                    catch (Exception e) {
267                            _log.error(e, e);
268    
269                            throw new RemoteException(e.getMessage());
270                    }
271            }
272    
273            public static com.liferay.portlet.journal.model.JournalArticleSoap getDisplayArticleByUrlTitle(
274                    long groupId, java.lang.String urlTitle) throws RemoteException {
275                    try {
276                            com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getDisplayArticleByUrlTitle(groupId,
277                                            urlTitle);
278    
279                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
280                    }
281                    catch (Exception e) {
282                            _log.error(e, e);
283    
284                            throw new RemoteException(e.getMessage());
285                    }
286            }
287    
288            public static com.liferay.portlet.journal.model.JournalArticleSoap getLatestArticle(
289                    long resourcePrimKey) throws RemoteException {
290                    try {
291                            com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getLatestArticle(resourcePrimKey);
292    
293                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
294                    }
295                    catch (Exception e) {
296                            _log.error(e, e);
297    
298                            throw new RemoteException(e.getMessage());
299                    }
300            }
301    
302            public static com.liferay.portlet.journal.model.JournalArticleSoap getLatestArticle(
303                    long groupId, java.lang.String articleId, int status)
304                    throws RemoteException {
305                    try {
306                            com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getLatestArticle(groupId,
307                                            articleId, status);
308    
309                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
310                    }
311                    catch (Exception e) {
312                            _log.error(e, e);
313    
314                            throw new RemoteException(e.getMessage());
315                    }
316            }
317    
318            public static com.liferay.portlet.journal.model.JournalArticleSoap getLatestArticle(
319                    long groupId, java.lang.String className, long classPK)
320                    throws RemoteException {
321                    try {
322                            com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getLatestArticle(groupId,
323                                            className, classPK);
324    
325                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
326                    }
327                    catch (Exception e) {
328                            _log.error(e, e);
329    
330                            throw new RemoteException(e.getMessage());
331                    }
332            }
333    
334            public static void removeArticleLocale(long companyId,
335                    java.lang.String languageId) throws RemoteException {
336                    try {
337                            JournalArticleServiceUtil.removeArticleLocale(companyId, languageId);
338                    }
339                    catch (Exception e) {
340                            _log.error(e, e);
341    
342                            throw new RemoteException(e.getMessage());
343                    }
344            }
345    
346            public static com.liferay.portlet.journal.model.JournalArticleSoap removeArticleLocale(
347                    long groupId, java.lang.String articleId, double version,
348                    java.lang.String languageId) throws RemoteException {
349                    try {
350                            com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.removeArticleLocale(groupId,
351                                            articleId, version, languageId);
352    
353                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
354                    }
355                    catch (Exception e) {
356                            _log.error(e, e);
357    
358                            throw new RemoteException(e.getMessage());
359                    }
360            }
361    
362            public static com.liferay.portlet.journal.model.JournalArticleSoap[] search(
363                    long companyId, long groupId, long classNameId,
364                    java.lang.String keywords, java.lang.Double version,
365                    java.lang.String type, java.lang.String structureId,
366                    java.lang.String templateId, java.util.Date displayDateGT,
367                    java.util.Date displayDateLT, int status, java.util.Date reviewDate,
368                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
369                    throws RemoteException {
370                    try {
371                            java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue =
372                                    JournalArticleServiceUtil.search(companyId, groupId,
373                                            classNameId, keywords, version, type, structureId,
374                                            templateId, displayDateGT, displayDateLT, status,
375                                            reviewDate, start, end, obc);
376    
377                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue);
378                    }
379                    catch (Exception e) {
380                            _log.error(e, e);
381    
382                            throw new RemoteException(e.getMessage());
383                    }
384            }
385    
386            public static com.liferay.portlet.journal.model.JournalArticleSoap[] search(
387                    long companyId, long groupId, long classNameId,
388                    java.lang.String articleId, java.lang.Double version,
389                    java.lang.String title, java.lang.String description,
390                    java.lang.String content, java.lang.String type,
391                    java.lang.String structureId, java.lang.String templateId,
392                    java.util.Date displayDateGT, java.util.Date displayDateLT, int status,
393                    java.util.Date reviewDate, boolean andOperator, int start, int end,
394                    com.liferay.portal.kernel.util.OrderByComparator obc)
395                    throws RemoteException {
396                    try {
397                            java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue =
398                                    JournalArticleServiceUtil.search(companyId, groupId,
399                                            classNameId, articleId, version, title, description,
400                                            content, type, structureId, templateId, displayDateGT,
401                                            displayDateLT, status, reviewDate, andOperator, start, end,
402                                            obc);
403    
404                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue);
405                    }
406                    catch (Exception e) {
407                            _log.error(e, e);
408    
409                            throw new RemoteException(e.getMessage());
410                    }
411            }
412    
413            public static com.liferay.portlet.journal.model.JournalArticleSoap[] search(
414                    long companyId, long groupId, long classNameId,
415                    java.lang.String articleId, java.lang.Double version,
416                    java.lang.String title, java.lang.String description,
417                    java.lang.String content, java.lang.String type,
418                    java.lang.String[] structureIds, java.lang.String[] templateIds,
419                    java.util.Date displayDateGT, java.util.Date displayDateLT, int status,
420                    java.util.Date reviewDate, boolean andOperator, int start, int end,
421                    com.liferay.portal.kernel.util.OrderByComparator obc)
422                    throws RemoteException {
423                    try {
424                            java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue =
425                                    JournalArticleServiceUtil.search(companyId, groupId,
426                                            classNameId, articleId, version, title, description,
427                                            content, type, structureIds, templateIds, displayDateGT,
428                                            displayDateLT, status, reviewDate, andOperator, start, end,
429                                            obc);
430    
431                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue);
432                    }
433                    catch (Exception e) {
434                            _log.error(e, e);
435    
436                            throw new RemoteException(e.getMessage());
437                    }
438            }
439    
440            public static int searchCount(long companyId, long groupId,
441                    long classNameId, java.lang.String keywords, java.lang.Double version,
442                    java.lang.String type, java.lang.String structureId,
443                    java.lang.String templateId, java.util.Date displayDateGT,
444                    java.util.Date displayDateLT, int status, java.util.Date reviewDate)
445                    throws RemoteException {
446                    try {
447                            int returnValue = JournalArticleServiceUtil.searchCount(companyId,
448                                            groupId, classNameId, keywords, version, type, structureId,
449                                            templateId, displayDateGT, displayDateLT, status, reviewDate);
450    
451                            return returnValue;
452                    }
453                    catch (Exception e) {
454                            _log.error(e, e);
455    
456                            throw new RemoteException(e.getMessage());
457                    }
458            }
459    
460            public static int searchCount(long companyId, long groupId,
461                    long classNameId, java.lang.String articleId, java.lang.Double version,
462                    java.lang.String title, java.lang.String description,
463                    java.lang.String content, java.lang.String type,
464                    java.lang.String structureId, java.lang.String templateId,
465                    java.util.Date displayDateGT, java.util.Date displayDateLT, int status,
466                    java.util.Date reviewDate, boolean andOperator)
467                    throws RemoteException {
468                    try {
469                            int returnValue = JournalArticleServiceUtil.searchCount(companyId,
470                                            groupId, classNameId, articleId, version, title,
471                                            description, content, type, structureId, templateId,
472                                            displayDateGT, displayDateLT, status, reviewDate,
473                                            andOperator);
474    
475                            return returnValue;
476                    }
477                    catch (Exception e) {
478                            _log.error(e, e);
479    
480                            throw new RemoteException(e.getMessage());
481                    }
482            }
483    
484            public static int searchCount(long companyId, long groupId,
485                    long classNameId, java.lang.String articleId, java.lang.Double version,
486                    java.lang.String title, java.lang.String description,
487                    java.lang.String content, java.lang.String type,
488                    java.lang.String[] structureIds, java.lang.String[] templateIds,
489                    java.util.Date displayDateGT, java.util.Date displayDateLT, int status,
490                    java.util.Date reviewDate, boolean andOperator)
491                    throws RemoteException {
492                    try {
493                            int returnValue = JournalArticleServiceUtil.searchCount(companyId,
494                                            groupId, classNameId, articleId, version, title,
495                                            description, content, type, structureIds, templateIds,
496                                            displayDateGT, displayDateLT, status, reviewDate,
497                                            andOperator);
498    
499                            return returnValue;
500                    }
501                    catch (Exception e) {
502                            _log.error(e, e);
503    
504                            throw new RemoteException(e.getMessage());
505                    }
506            }
507    
508            public static void subscribe(long groupId) throws RemoteException {
509                    try {
510                            JournalArticleServiceUtil.subscribe(groupId);
511                    }
512                    catch (Exception e) {
513                            _log.error(e, e);
514    
515                            throw new RemoteException(e.getMessage());
516                    }
517            }
518    
519            public static void unsubscribe(long groupId) throws RemoteException {
520                    try {
521                            JournalArticleServiceUtil.unsubscribe(groupId);
522                    }
523                    catch (Exception e) {
524                            _log.error(e, e);
525    
526                            throw new RemoteException(e.getMessage());
527                    }
528            }
529    
530            public static com.liferay.portlet.journal.model.JournalArticleSoap updateArticle(
531                    long groupId, java.lang.String articleId, double version,
532                    java.lang.String content,
533                    com.liferay.portal.service.ServiceContext serviceContext)
534                    throws RemoteException {
535                    try {
536                            com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.updateArticle(groupId,
537                                            articleId, version, content, serviceContext);
538    
539                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
540                    }
541                    catch (Exception e) {
542                            _log.error(e, e);
543    
544                            throw new RemoteException(e.getMessage());
545                    }
546            }
547    
548            public static com.liferay.portlet.journal.model.JournalArticleSoap updateContent(
549                    long groupId, java.lang.String articleId, double version,
550                    java.lang.String content) throws RemoteException {
551                    try {
552                            com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.updateContent(groupId,
553                                            articleId, version, content);
554    
555                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
556                    }
557                    catch (Exception e) {
558                            _log.error(e, e);
559    
560                            throw new RemoteException(e.getMessage());
561                    }
562            }
563    
564            private static Log _log = LogFactoryUtil.getLog(JournalArticleServiceSoap.class);
565    }