1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portlet.journal.service.http;
16  
17  import com.liferay.portal.kernel.log.Log;
18  import com.liferay.portal.kernel.log.LogFactoryUtil;
19  
20  import com.liferay.portlet.journal.service.JournalArticleServiceUtil;
21  
22  import java.rmi.RemoteException;
23  
24  /**
25   * <a href="JournalArticleServiceSoap.java.html"><b><i>View Source</i></b></a>
26   *
27   * <p>
28   * ServiceBuilder generated this class. Modifications in this class will be
29   * overwritten the next time is generated.
30   * </p>
31   *
32   * <p>
33   * This class provides a SOAP utility for the
34   * {@link com.liferay.portlet.journal.service.JournalArticleServiceUtil} service utility. The
35   * static methods of this class calls the same methods of the service utility.
36   * However, the signatures are different because it is difficult for SOAP to
37   * support certain types.
38   * </p>
39   *
40   * <p>
41   * ServiceBuilder follows certain rules in translating the methods. For example,
42   * if the method in the service utility returns a {@link java.util.List}, that
43   * is translated to an array of {@link com.liferay.portlet.journal.model.JournalArticleSoap}.
44   * If the method in the service utility returns a
45   * {@link com.liferay.portlet.journal.model.JournalArticle}, that is translated to a
46   * {@link com.liferay.portlet.journal.model.JournalArticleSoap}. Methods that SOAP cannot
47   * safely wire are skipped.
48   * </p>
49   *
50   * <p>
51   * The benefits of using the SOAP utility is that it is cross platform
52   * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
53   * even Perl, to call the generated services. One drawback of SOAP is that it is
54   * slow because it needs to serialize all calls into a text format (XML).
55   * </p>
56   *
57   * <p>
58   * You can see a list of services at
59   * http://localhost:8080/tunnel-web/secure/axis. Set the property
60   * <b>tunnel.servlet.hosts.allowed</b> in portal.properties to configure
61   * security.
62   * </p>
63   *
64   * <p>
65   * The SOAP utility is only generated for remote services.
66   * </p>
67   *
68   * @author    Brian Wing Shun Chan
69   * @see       JournalArticleServiceHttp
70   * @see       com.liferay.portlet.journal.model.JournalArticleSoap
71   * @see       com.liferay.portlet.journal.service.JournalArticleServiceUtil
72   * @generated
73   */
74  public class JournalArticleServiceSoap {
75      public static com.liferay.portlet.journal.model.JournalArticleSoap addArticle(
76          long groupId, java.lang.String articleId, boolean autoArticleId,
77          java.lang.String title, java.lang.String description,
78          java.lang.String content, java.lang.String type,
79          java.lang.String structureId, java.lang.String templateId,
80          int displayDateMonth, int displayDateDay, int displayDateYear,
81          int displayDateHour, int displayDateMinute, int expirationDateMonth,
82          int expirationDateDay, int expirationDateYear, int expirationDateHour,
83          int expirationDateMinute, boolean neverExpire, int reviewDateMonth,
84          int reviewDateDay, int reviewDateYear, int reviewDateHour,
85          int reviewDateMinute, boolean neverReview, boolean indexable,
86          java.lang.String articleURL,
87          com.liferay.portal.service.ServiceContext serviceContext)
88          throws RemoteException {
89          try {
90              com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.addArticle(groupId,
91                      articleId, autoArticleId, title, description, content,
92                      type, structureId, templateId, displayDateMonth,
93                      displayDateDay, displayDateYear, displayDateHour,
94                      displayDateMinute, expirationDateMonth, expirationDateDay,
95                      expirationDateYear, expirationDateHour,
96                      expirationDateMinute, neverExpire, reviewDateMonth,
97                      reviewDateDay, reviewDateYear, reviewDateHour,
98                      reviewDateMinute, neverReview, indexable, articleURL,
99                      serviceContext);
100 
101             return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
102         }
103         catch (Exception e) {
104             _log.error(e, e);
105 
106             throw new RemoteException(e.getMessage());
107         }
108     }
109 
110     public static com.liferay.portlet.journal.model.JournalArticleSoap approveArticle(
111         long groupId, java.lang.String articleId, double version,
112         java.lang.String articleURL,
113         com.liferay.portal.service.ServiceContext serviceContext)
114         throws RemoteException {
115         try {
116             com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.approveArticle(groupId,
117                     articleId, version, articleURL, serviceContext);
118 
119             return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
120         }
121         catch (Exception e) {
122             _log.error(e, e);
123 
124             throw new RemoteException(e.getMessage());
125         }
126     }
127 
128     public static com.liferay.portlet.journal.model.JournalArticleSoap copyArticle(
129         long groupId, java.lang.String oldArticleId,
130         java.lang.String newArticleId, boolean autoArticleId, double version)
131         throws RemoteException {
132         try {
133             com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.copyArticle(groupId,
134                     oldArticleId, newArticleId, autoArticleId, version);
135 
136             return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
137         }
138         catch (Exception e) {
139             _log.error(e, e);
140 
141             throw new RemoteException(e.getMessage());
142         }
143     }
144 
145     public static com.liferay.portlet.journal.model.JournalArticleSoap getArticle(
146         long groupId, java.lang.String articleId) throws RemoteException {
147         try {
148             com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getArticle(groupId,
149                     articleId);
150 
151             return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
152         }
153         catch (Exception e) {
154             _log.error(e, e);
155 
156             throw new RemoteException(e.getMessage());
157         }
158     }
159 
160     public static com.liferay.portlet.journal.model.JournalArticleSoap getArticle(
161         long groupId, java.lang.String articleId, double version)
162         throws RemoteException {
163         try {
164             com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getArticle(groupId,
165                     articleId, version);
166 
167             return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
168         }
169         catch (Exception e) {
170             _log.error(e, e);
171 
172             throw new RemoteException(e.getMessage());
173         }
174     }
175 
176     public static com.liferay.portlet.journal.model.JournalArticleSoap getArticleByUrlTitle(
177         long groupId, java.lang.String urlTitle) throws RemoteException {
178         try {
179             com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getArticleByUrlTitle(groupId,
180                     urlTitle);
181 
182             return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
183         }
184         catch (Exception e) {
185             _log.error(e, e);
186 
187             throw new RemoteException(e.getMessage());
188         }
189     }
190 
191     public static void deleteArticle(long groupId, java.lang.String articleId,
192         double version, java.lang.String articleURL,
193         com.liferay.portal.service.ServiceContext serviceContext)
194         throws RemoteException {
195         try {
196             JournalArticleServiceUtil.deleteArticle(groupId, articleId,
197                 version, articleURL, serviceContext);
198         }
199         catch (Exception e) {
200             _log.error(e, e);
201 
202             throw new RemoteException(e.getMessage());
203         }
204     }
205 
206     public static void expireArticle(long groupId, java.lang.String articleId,
207         double version, java.lang.String articleURL,
208         com.liferay.portal.service.ServiceContext serviceContext)
209         throws RemoteException {
210         try {
211             JournalArticleServiceUtil.expireArticle(groupId, articleId,
212                 version, articleURL, serviceContext);
213         }
214         catch (Exception e) {
215             _log.error(e, e);
216 
217             throw new RemoteException(e.getMessage());
218         }
219     }
220 
221     public static void removeArticleLocale(long companyId,
222         java.lang.String languageId) throws RemoteException {
223         try {
224             JournalArticleServiceUtil.removeArticleLocale(companyId, languageId);
225         }
226         catch (Exception e) {
227             _log.error(e, e);
228 
229             throw new RemoteException(e.getMessage());
230         }
231     }
232 
233     public static com.liferay.portlet.journal.model.JournalArticleSoap removeArticleLocale(
234         long groupId, java.lang.String articleId, double version,
235         java.lang.String languageId) throws RemoteException {
236         try {
237             com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.removeArticleLocale(groupId,
238                     articleId, version, languageId);
239 
240             return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
241         }
242         catch (Exception e) {
243             _log.error(e, e);
244 
245             throw new RemoteException(e.getMessage());
246         }
247     }
248 
249     public static com.liferay.portlet.journal.model.JournalArticleSoap updateArticle(
250         long groupId, java.lang.String articleId, double version,
251         boolean incrementVersion, java.lang.String content)
252         throws RemoteException {
253         try {
254             com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.updateArticle(groupId,
255                     articleId, version, incrementVersion, content);
256 
257             return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(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.journal.model.JournalArticleSoap updateContent(
267         long groupId, java.lang.String articleId, double version,
268         java.lang.String content) throws RemoteException {
269         try {
270             com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.updateContent(groupId,
271                     articleId, version, content);
272 
273             return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
274         }
275         catch (Exception e) {
276             _log.error(e, e);
277 
278             throw new RemoteException(e.getMessage());
279         }
280     }
281 
282     private static Log _log = LogFactoryUtil.getLog(JournalArticleServiceSoap.class);
283 }