001    /**
002     * Copyright (c) 2000-2010 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/tunnel-web/secure/axis. Set the property
053     * <b>tunnel.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 addArticle(
069                    long groupId, java.lang.String articleId, boolean autoArticleId,
070                    java.lang.String title, java.lang.String description,
071                    java.lang.String content, java.lang.String type,
072                    java.lang.String structureId, java.lang.String templateId,
073                    int displayDateMonth, int displayDateDay, int displayDateYear,
074                    int displayDateHour, int displayDateMinute, int expirationDateMonth,
075                    int expirationDateDay, int expirationDateYear, int expirationDateHour,
076                    int expirationDateMinute, boolean neverExpire, int reviewDateMonth,
077                    int reviewDateDay, int reviewDateYear, int reviewDateHour,
078                    int reviewDateMinute, boolean neverReview, boolean indexable,
079                    java.lang.String articleURL,
080                    com.liferay.portal.service.ServiceContext serviceContext)
081                    throws RemoteException {
082                    try {
083                            com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.addArticle(groupId,
084                                            articleId, autoArticleId, title, description, content,
085                                            type, structureId, templateId, displayDateMonth,
086                                            displayDateDay, displayDateYear, displayDateHour,
087                                            displayDateMinute, expirationDateMonth, expirationDateDay,
088                                            expirationDateYear, expirationDateHour,
089                                            expirationDateMinute, neverExpire, reviewDateMonth,
090                                            reviewDateDay, reviewDateYear, reviewDateHour,
091                                            reviewDateMinute, neverReview, indexable, articleURL,
092                                            serviceContext);
093    
094                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
095                    }
096                    catch (Exception e) {
097                            _log.error(e, e);
098    
099                            throw new RemoteException(e.getMessage());
100                    }
101            }
102    
103            public static com.liferay.portlet.journal.model.JournalArticleSoap copyArticle(
104                    long groupId, java.lang.String oldArticleId,
105                    java.lang.String newArticleId, boolean autoArticleId, double version)
106                    throws RemoteException {
107                    try {
108                            com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.copyArticle(groupId,
109                                            oldArticleId, newArticleId, autoArticleId, version);
110    
111                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
112                    }
113                    catch (Exception e) {
114                            _log.error(e, e);
115    
116                            throw new RemoteException(e.getMessage());
117                    }
118            }
119    
120            public static void deleteArticle(long groupId, java.lang.String articleId,
121                    double version, java.lang.String articleURL,
122                    com.liferay.portal.service.ServiceContext serviceContext)
123                    throws RemoteException {
124                    try {
125                            JournalArticleServiceUtil.deleteArticle(groupId, articleId,
126                                    version, articleURL, serviceContext);
127                    }
128                    catch (Exception e) {
129                            _log.error(e, e);
130    
131                            throw new RemoteException(e.getMessage());
132                    }
133            }
134    
135            public static void deleteArticle(long groupId, java.lang.String articleId,
136                    java.lang.String articleURL,
137                    com.liferay.portal.service.ServiceContext serviceContext)
138                    throws RemoteException {
139                    try {
140                            JournalArticleServiceUtil.deleteArticle(groupId, articleId,
141                                    articleURL, serviceContext);
142                    }
143                    catch (Exception e) {
144                            _log.error(e, e);
145    
146                            throw new RemoteException(e.getMessage());
147                    }
148            }
149    
150            public static com.liferay.portlet.journal.model.JournalArticleSoap expireArticle(
151                    long groupId, java.lang.String articleId, double version,
152                    java.lang.String articleURL,
153                    com.liferay.portal.service.ServiceContext serviceContext)
154                    throws RemoteException {
155                    try {
156                            com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.expireArticle(groupId,
157                                            articleId, version, articleURL, serviceContext);
158    
159                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
160                    }
161                    catch (Exception e) {
162                            _log.error(e, e);
163    
164                            throw new RemoteException(e.getMessage());
165                    }
166            }
167    
168            public static com.liferay.portlet.journal.model.JournalArticleSoap getArticle(
169                    long groupId, java.lang.String articleId) throws RemoteException {
170                    try {
171                            com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getArticle(groupId,
172                                            articleId);
173    
174                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
175                    }
176                    catch (Exception e) {
177                            _log.error(e, e);
178    
179                            throw new RemoteException(e.getMessage());
180                    }
181            }
182    
183            public static com.liferay.portlet.journal.model.JournalArticleSoap getArticle(
184                    long groupId, java.lang.String articleId, double version)
185                    throws RemoteException {
186                    try {
187                            com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getArticle(groupId,
188                                            articleId, version);
189    
190                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
191                    }
192                    catch (Exception e) {
193                            _log.error(e, e);
194    
195                            throw new RemoteException(e.getMessage());
196                    }
197            }
198    
199            public static com.liferay.portlet.journal.model.JournalArticleSoap getArticleByUrlTitle(
200                    long groupId, java.lang.String urlTitle) throws RemoteException {
201                    try {
202                            com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getArticleByUrlTitle(groupId,
203                                            urlTitle);
204    
205                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
206                    }
207                    catch (Exception e) {
208                            _log.error(e, e);
209    
210                            throw new RemoteException(e.getMessage());
211                    }
212            }
213    
214            public static com.liferay.portlet.journal.model.JournalArticleSoap getLatestArticle(
215                    long groupId, java.lang.String articleId, int status)
216                    throws RemoteException {
217                    try {
218                            com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getLatestArticle(groupId,
219                                            articleId, status);
220    
221                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
222                    }
223                    catch (Exception e) {
224                            _log.error(e, e);
225    
226                            throw new RemoteException(e.getMessage());
227                    }
228            }
229    
230            public static void removeArticleLocale(long companyId,
231                    java.lang.String languageId) throws RemoteException {
232                    try {
233                            JournalArticleServiceUtil.removeArticleLocale(companyId, languageId);
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 removeArticleLocale(
243                    long groupId, java.lang.String articleId, double version,
244                    java.lang.String languageId) throws RemoteException {
245                    try {
246                            com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.removeArticleLocale(groupId,
247                                            articleId, version, languageId);
248    
249                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
250                    }
251                    catch (Exception e) {
252                            _log.error(e, e);
253    
254                            throw new RemoteException(e.getMessage());
255                    }
256            }
257    
258            public static com.liferay.portlet.journal.model.JournalArticleSoap updateArticle(
259                    long groupId, java.lang.String articleId, double version,
260                    java.lang.String content) throws RemoteException {
261                    try {
262                            com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.updateArticle(groupId,
263                                            articleId, version, content);
264    
265                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
266                    }
267                    catch (Exception e) {
268                            _log.error(e, e);
269    
270                            throw new RemoteException(e.getMessage());
271                    }
272            }
273    
274            public static com.liferay.portlet.journal.model.JournalArticleSoap updateContent(
275                    long groupId, java.lang.String articleId, double version,
276                    java.lang.String content) throws RemoteException {
277                    try {
278                            com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.updateContent(groupId,
279                                            articleId, version, content);
280    
281                            return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
282                    }
283                    catch (Exception e) {
284                            _log.error(e, e);
285    
286                            throw new RemoteException(e.getMessage());
287                    }
288            }
289    
290            private static Log _log = LogFactoryUtil.getLog(JournalArticleServiceSoap.class);
291    }