1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.journal.service.http;
24  
25  import com.liferay.portal.kernel.log.Log;
26  import com.liferay.portal.kernel.log.LogFactoryUtil;
27  
28  import com.liferay.portlet.journal.service.JournalArticleServiceUtil;
29  
30  import java.rmi.RemoteException;
31  
32  /**
33   * <a href="JournalArticleServiceSoap.java.html"><b><i>View Source</i></b></a>
34   *
35   * <p>
36   * ServiceBuilder generated this class. Modifications in this class will be
37   * overwritten the next time is generated.
38   * </p>
39   *
40   * <p>
41   * This class provides a SOAP utility for the
42   * <code>com.liferay.portlet.journal.service.JournalArticleServiceUtil</code> service
43   * utility. The static methods of this class calls the same methods of the
44   * service utility. However, the signatures are different because it is
45   * difficult for SOAP to support certain types.
46   * </p>
47   *
48   * <p>
49   * ServiceBuilder follows certain rules in translating the methods. For example,
50   * if the method in the service utility returns a <code>java.util.List</code>,
51   * that is translated to an array of
52   * <code>com.liferay.portlet.journal.model.JournalArticleSoap</code>. If the method in the
53   * service utility returns a <code>com.liferay.portlet.journal.model.JournalArticle</code>,
54   * that is translated to a <code>com.liferay.portlet.journal.model.JournalArticleSoap</code>.
55   * Methods that SOAP cannot safely wire are skipped.
56   * </p>
57   *
58   * <p>
59   * The benefits of using the SOAP utility is that it is cross platform
60   * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
61   * even Perl, to call the generated services. One drawback of SOAP is that it is
62   * slow because it needs to serialize all calls into a text format (XML).
63   * </p>
64   *
65   * <p>
66   * You can see a list of services at
67   * http://localhost:8080/tunnel-web/secure/axis. Set the property
68   * <code>tunnel.servlet.hosts.allowed</code> in portal.properties to configure
69   * security.
70   * </p>
71   *
72   * <p>
73   * The SOAP utility is only generated for remote services.
74   * </p>
75   *
76   * @author Brian Wing Shun Chan
77   *
78   * @see com.liferay.portlet.journal.model.JournalArticleSoap
79   * @see com.liferay.portlet.journal.service.JournalArticleServiceUtil
80   * @see com.liferay.portlet.journal.service.http.JournalArticleServiceHttp
81   *
82   */
83  public class JournalArticleServiceSoap {
84      public static com.liferay.portlet.journal.model.JournalArticleSoap addArticle(
85          long groupId, java.lang.String articleId, boolean autoArticleId,
86          java.lang.String title, java.lang.String description,
87          java.lang.String content, java.lang.String type,
88          java.lang.String structureId, java.lang.String templateId,
89          int displayDateMonth, int displayDateDay, int displayDateYear,
90          int displayDateHour, int displayDateMinute, int expirationDateMonth,
91          int expirationDateDay, int expirationDateYear, int expirationDateHour,
92          int expirationDateMinute, boolean neverExpire, int reviewDateMonth,
93          int reviewDateDay, int reviewDateYear, int reviewDateHour,
94          int reviewDateMinute, boolean neverReview, boolean indexable,
95          java.lang.String articleURL,
96          com.liferay.portal.service.ServiceContext serviceContext)
97          throws RemoteException {
98          try {
99              com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.addArticle(groupId,
100                     articleId, autoArticleId, title, description, content,
101                     type, structureId, templateId, displayDateMonth,
102                     displayDateDay, displayDateYear, displayDateHour,
103                     displayDateMinute, expirationDateMonth, expirationDateDay,
104                     expirationDateYear, expirationDateHour,
105                     expirationDateMinute, neverExpire, reviewDateMonth,
106                     reviewDateDay, reviewDateYear, reviewDateHour,
107                     reviewDateMinute, neverReview, indexable, articleURL,
108                     serviceContext);
109 
110             return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
111         }
112         catch (Exception e) {
113             _log.error(e, e);
114 
115             throw new RemoteException(e.getMessage());
116         }
117     }
118 
119     public static com.liferay.portlet.journal.model.JournalArticleSoap approveArticle(
120         long groupId, java.lang.String articleId, double version,
121         java.lang.String articleURL,
122         com.liferay.portal.service.ServiceContext serviceContext)
123         throws RemoteException {
124         try {
125             com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.approveArticle(groupId,
126                     articleId, version, articleURL, serviceContext);
127 
128             return com.liferay.portlet.journal.model.JournalArticleSoap.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.journal.model.JournalArticleSoap copyArticle(
138         long groupId, java.lang.String oldArticleId,
139         java.lang.String newArticleId, boolean autoArticleId, double version)
140         throws RemoteException {
141         try {
142             com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.copyArticle(groupId,
143                     oldArticleId, newArticleId, autoArticleId, version);
144 
145             return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
146         }
147         catch (Exception e) {
148             _log.error(e, e);
149 
150             throw new RemoteException(e.getMessage());
151         }
152     }
153 
154     public static com.liferay.portlet.journal.model.JournalArticleSoap getArticle(
155         long groupId, java.lang.String articleId) throws RemoteException {
156         try {
157             com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getArticle(groupId,
158                     articleId);
159 
160             return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(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.journal.model.JournalArticleSoap getArticle(
170         long groupId, java.lang.String articleId, double version)
171         throws RemoteException {
172         try {
173             com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getArticle(groupId,
174                     articleId, version);
175 
176             return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
177         }
178         catch (Exception e) {
179             _log.error(e, e);
180 
181             throw new RemoteException(e.getMessage());
182         }
183     }
184 
185     public static com.liferay.portlet.journal.model.JournalArticleSoap getArticleByUrlTitle(
186         long groupId, java.lang.String urlTitle) throws RemoteException {
187         try {
188             com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getArticleByUrlTitle(groupId,
189                     urlTitle);
190 
191             return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
192         }
193         catch (Exception e) {
194             _log.error(e, e);
195 
196             throw new RemoteException(e.getMessage());
197         }
198     }
199 
200     public static void deleteArticle(long groupId, java.lang.String articleId,
201         double version, java.lang.String articleURL,
202         com.liferay.portal.service.ServiceContext serviceContext)
203         throws RemoteException {
204         try {
205             JournalArticleServiceUtil.deleteArticle(groupId, articleId,
206                 version, articleURL, serviceContext);
207         }
208         catch (Exception e) {
209             _log.error(e, e);
210 
211             throw new RemoteException(e.getMessage());
212         }
213     }
214 
215     public static void expireArticle(long groupId, java.lang.String articleId,
216         double version, java.lang.String articleURL,
217         com.liferay.portal.service.ServiceContext serviceContext)
218         throws RemoteException {
219         try {
220             JournalArticleServiceUtil.expireArticle(groupId, articleId,
221                 version, articleURL, serviceContext);
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         boolean incrementVersion, java.lang.String content)
261         throws RemoteException {
262         try {
263             com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.updateArticle(groupId,
264                     articleId, version, incrementVersion, content);
265 
266             return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
267         }
268         catch (Exception e) {
269             _log.error(e, e);
270 
271             throw new RemoteException(e.getMessage());
272         }
273     }
274 
275     public static com.liferay.portlet.journal.model.JournalArticleSoap updateContent(
276         long groupId, java.lang.String articleId, double version,
277         java.lang.String content) throws RemoteException {
278         try {
279             com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.updateContent(groupId,
280                     articleId, version, content);
281 
282             return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
283         }
284         catch (Exception e) {
285             _log.error(e, e);
286 
287             throw new RemoteException(e.getMessage());
288         }
289     }
290 
291     private static Log _log = LogFactoryUtil.getLog(JournalArticleServiceSoap.class);
292 }