1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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   * {@link com.liferay.portlet.journal.service.JournalArticleServiceUtil} service utility. The
43   * static methods of this class calls the same methods of the service utility.
44   * However, the signatures are different because it is difficult for SOAP to
45   * 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 {@link java.util.List}, that
51   * is translated to an array of {@link com.liferay.portlet.journal.model.JournalArticleSoap}.
52   * If the method in the service utility returns a
53   * {@link com.liferay.portlet.journal.model.JournalArticle}, that is translated to a
54   * {@link com.liferay.portlet.journal.model.JournalArticleSoap}. Methods that SOAP cannot
55   * 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   * <b>tunnel.servlet.hosts.allowed</b> 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   * @see       JournalArticleServiceHttp
78   * @see       com.liferay.portlet.journal.model.JournalArticleSoap
79   * @see       com.liferay.portlet.journal.service.JournalArticleServiceUtil
80   * @generated
81   */
82  public class JournalArticleServiceSoap {
83      public static com.liferay.portlet.journal.model.JournalArticleSoap addArticle(
84          long groupId, java.lang.String articleId, boolean autoArticleId,
85          java.lang.String title, java.lang.String description,
86          java.lang.String content, java.lang.String type,
87          java.lang.String structureId, java.lang.String templateId,
88          int displayDateMonth, int displayDateDay, int displayDateYear,
89          int displayDateHour, int displayDateMinute, int expirationDateMonth,
90          int expirationDateDay, int expirationDateYear, int expirationDateHour,
91          int expirationDateMinute, boolean neverExpire, int reviewDateMonth,
92          int reviewDateDay, int reviewDateYear, int reviewDateHour,
93          int reviewDateMinute, boolean neverReview, boolean indexable,
94          java.lang.String articleURL,
95          com.liferay.portal.service.ServiceContext serviceContext)
96          throws RemoteException {
97          try {
98              com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.addArticle(groupId,
99                      articleId, autoArticleId, title, description, content,
100                     type, structureId, templateId, displayDateMonth,
101                     displayDateDay, displayDateYear, displayDateHour,
102                     displayDateMinute, expirationDateMonth, expirationDateDay,
103                     expirationDateYear, expirationDateHour,
104                     expirationDateMinute, neverExpire, reviewDateMonth,
105                     reviewDateDay, reviewDateYear, reviewDateHour,
106                     reviewDateMinute, neverReview, indexable, articleURL,
107                     serviceContext);
108 
109             return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
110         }
111         catch (Exception e) {
112             _log.error(e, e);
113 
114             throw new RemoteException(e.getMessage());
115         }
116     }
117 
118     public static com.liferay.portlet.journal.model.JournalArticleSoap approveArticle(
119         long groupId, java.lang.String articleId, double version,
120         java.lang.String articleURL,
121         com.liferay.portal.service.ServiceContext serviceContext)
122         throws RemoteException {
123         try {
124             com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.approveArticle(groupId,
125                     articleId, version, articleURL, serviceContext);
126 
127             return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
128         }
129         catch (Exception e) {
130             _log.error(e, e);
131 
132             throw new RemoteException(e.getMessage());
133         }
134     }
135 
136     public static com.liferay.portlet.journal.model.JournalArticleSoap copyArticle(
137         long groupId, java.lang.String oldArticleId,
138         java.lang.String newArticleId, boolean autoArticleId, double version)
139         throws RemoteException {
140         try {
141             com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.copyArticle(groupId,
142                     oldArticleId, newArticleId, autoArticleId, version);
143 
144             return com.liferay.portlet.journal.model.JournalArticleSoap.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.portlet.journal.model.JournalArticleSoap getArticle(
154         long groupId, java.lang.String articleId) throws RemoteException {
155         try {
156             com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getArticle(groupId,
157                     articleId);
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, double version)
170         throws RemoteException {
171         try {
172             com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getArticle(groupId,
173                     articleId, version);
174 
175             return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
176         }
177         catch (Exception e) {
178             _log.error(e, e);
179 
180             throw new RemoteException(e.getMessage());
181         }
182     }
183 
184     public static com.liferay.portlet.journal.model.JournalArticleSoap getArticleByUrlTitle(
185         long groupId, java.lang.String urlTitle) throws RemoteException {
186         try {
187             com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getArticleByUrlTitle(groupId,
188                     urlTitle);
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 void deleteArticle(long groupId, java.lang.String articleId,
200         double version, java.lang.String articleURL,
201         com.liferay.portal.service.ServiceContext serviceContext)
202         throws RemoteException {
203         try {
204             JournalArticleServiceUtil.deleteArticle(groupId, articleId,
205                 version, articleURL, serviceContext);
206         }
207         catch (Exception e) {
208             _log.error(e, e);
209 
210             throw new RemoteException(e.getMessage());
211         }
212     }
213 
214     public static void expireArticle(long groupId, java.lang.String articleId,
215         double version, java.lang.String articleURL,
216         com.liferay.portal.service.ServiceContext serviceContext)
217         throws RemoteException {
218         try {
219             JournalArticleServiceUtil.expireArticle(groupId, articleId,
220                 version, articleURL, serviceContext);
221         }
222         catch (Exception e) {
223             _log.error(e, e);
224 
225             throw new RemoteException(e.getMessage());
226         }
227     }
228 
229     public static void removeArticleLocale(long companyId,
230         java.lang.String languageId) throws RemoteException {
231         try {
232             JournalArticleServiceUtil.removeArticleLocale(companyId, languageId);
233         }
234         catch (Exception e) {
235             _log.error(e, e);
236 
237             throw new RemoteException(e.getMessage());
238         }
239     }
240 
241     public static com.liferay.portlet.journal.model.JournalArticleSoap removeArticleLocale(
242         long groupId, java.lang.String articleId, double version,
243         java.lang.String languageId) throws RemoteException {
244         try {
245             com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.removeArticleLocale(groupId,
246                     articleId, version, languageId);
247 
248             return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue);
249         }
250         catch (Exception e) {
251             _log.error(e, e);
252 
253             throw new RemoteException(e.getMessage());
254         }
255     }
256 
257     public static com.liferay.portlet.journal.model.JournalArticleSoap updateArticle(
258         long groupId, java.lang.String articleId, double version,
259         boolean incrementVersion, java.lang.String content)
260         throws RemoteException {
261         try {
262             com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.updateArticle(groupId,
263                     articleId, version, incrementVersion, 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 }