1   /**
2    * Copyright (c) 2000-2007 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.blogs.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.blogs.service.BlogsEntryServiceUtil;
29  
30  import java.rmi.RemoteException;
31  
32  /**
33   * <a href="BlogsEntryServiceSoap.java.html"><b><i>View Source</i></b></a>
34   *
35   * <p>
36   * ServiceBuilder generated this class. Modifications in this class will be overwritten
37   * the next time is generated.
38   * </p>
39   *
40   * <p>
41   * This class provides a SOAP utility for the <code>com.liferay.portlet.blogs.service.BlogsEntryServiceUtil</code>
42   * service utility. The static methods of this class calls the same methods of the
43   * service utility. However, the signatures are different because it is difficult
44   * for SOAP to support certain types.
45   * </p>
46   *
47   * <p>
48   * ServiceBuilder follows certain rules in translating the methods. For example,
49   * if the method in the service utility returns a <code>java.util.List</code>, that
50   * is translated to an array of <code>com.liferay.portlet.blogs.model.BlogsEntrySoap</code>.
51   * If the method in the service utility returns a <code>com.liferay.portlet.blogs.model.BlogsEntry</code>,
52   * that is translated to a <code>com.liferay.portlet.blogs.model.BlogsEntrySoap</code>.
53   * Methods that SOAP cannot safely wire are skipped.
54   * </p>
55   *
56   * <p>
57   * The benefits of using the SOAP utility is that it is cross platform compatible.
58   * SOAP allows different languages like Java, .NET, C++, PHP, and even Perl, to
59   * call the generated services. One drawback of SOAP is that it is slow because
60   * it needs to serialize all calls into a text format (XML).
61   * </p>
62   *
63   * <p>
64   * You can see a list of services at http://localhost:8080/tunnel-web/secure/axis.
65   * Set the property <code>tunnel.servlet.hosts.allowed</code> in portal.properties
66   * to configure security.
67   * </p>
68   *
69   * <p>
70   * The SOAP utility is only generated for remote services.
71   * </p>
72   *
73   * @author Brian Wing Shun Chan
74   *
75   * @see com.liferay.portlet.blogs.service.BlogsEntryServiceUtil
76   * @see com.liferay.portlet.blogs.service.http.BlogsEntryServiceHttp
77   * @see com.liferay.portlet.blogs.service.model.BlogsEntrySoap
78   *
79   */
80  public class BlogsEntryServiceSoap {
81      public static void deleteEntry(long entryId) throws RemoteException {
82          try {
83              BlogsEntryServiceUtil.deleteEntry(entryId);
84          }
85          catch (Exception e) {
86              _log.error(e, e);
87              throw new RemoteException(e.getMessage());
88          }
89      }
90  
91      public static java.lang.String getCategoryBlogsRSS(long categoryId,
92          int max, java.lang.String type, double version,
93          java.lang.String feedURL, java.lang.String entryURL)
94          throws RemoteException {
95          try {
96              java.lang.String returnValue = BlogsEntryServiceUtil.getCategoryBlogsRSS(categoryId,
97                      max, type, version, feedURL, entryURL);
98  
99              return returnValue;
100         }
101         catch (Exception e) {
102             _log.error(e, e);
103             throw new RemoteException(e.getMessage());
104         }
105     }
106 
107     public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getCompanyEntries(
108         long companyId, int max) throws RemoteException {
109         try {
110             java.util.List returnValue = BlogsEntryServiceUtil.getCompanyEntries(companyId,
111                     max);
112 
113             return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
114         }
115         catch (Exception e) {
116             _log.error(e, e);
117             throw new RemoteException(e.getMessage());
118         }
119     }
120 
121     public static java.lang.String getCompanyEntriesRSS(long companyId,
122         int max, java.lang.String type, double version,
123         java.lang.String feedURL, java.lang.String entryURL)
124         throws RemoteException {
125         try {
126             java.lang.String returnValue = BlogsEntryServiceUtil.getCompanyEntriesRSS(companyId,
127                     max, type, version, feedURL, entryURL);
128 
129             return returnValue;
130         }
131         catch (Exception e) {
132             _log.error(e, e);
133             throw new RemoteException(e.getMessage());
134         }
135     }
136 
137     public static com.liferay.portlet.blogs.model.BlogsEntrySoap getEntry(
138         long entryId) throws RemoteException {
139         try {
140             com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.getEntry(entryId);
141 
142             return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModel(returnValue);
143         }
144         catch (Exception e) {
145             _log.error(e, e);
146             throw new RemoteException(e.getMessage());
147         }
148     }
149 
150     public static com.liferay.portlet.blogs.model.BlogsEntrySoap getEntry(
151         long groupId, java.lang.String urlTitle) throws RemoteException {
152         try {
153             com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.getEntry(groupId,
154                     urlTitle);
155 
156             return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModel(returnValue);
157         }
158         catch (Exception e) {
159             _log.error(e, e);
160             throw new RemoteException(e.getMessage());
161         }
162     }
163 
164     public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getGroupEntries(
165         long groupId, int max) throws RemoteException {
166         try {
167             java.util.List returnValue = BlogsEntryServiceUtil.getGroupEntries(groupId,
168                     max);
169 
170             return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
171         }
172         catch (Exception e) {
173             _log.error(e, e);
174             throw new RemoteException(e.getMessage());
175         }
176     }
177 
178     public static java.lang.String getGroupEntriesRSS(long groupId, int max,
179         java.lang.String type, double version, java.lang.String feedURL,
180         java.lang.String entryURL) throws RemoteException {
181         try {
182             java.lang.String returnValue = BlogsEntryServiceUtil.getGroupEntriesRSS(groupId,
183                     max, type, version, feedURL, entryURL);
184 
185             return returnValue;
186         }
187         catch (Exception e) {
188             _log.error(e, e);
189             throw new RemoteException(e.getMessage());
190         }
191     }
192 
193     public static com.liferay.portlet.blogs.model.BlogsEntrySoap[] getOrganizationEntries(
194         long organizationId, int max) throws RemoteException {
195         try {
196             java.util.List returnValue = BlogsEntryServiceUtil.getOrganizationEntries(organizationId,
197                     max);
198 
199             return com.liferay.portlet.blogs.model.BlogsEntrySoap.toSoapModels(returnValue);
200         }
201         catch (Exception e) {
202             _log.error(e, e);
203             throw new RemoteException(e.getMessage());
204         }
205     }
206 
207     public static java.lang.String getOrganizationEntriesRSS(
208         long organizationId, int max, java.lang.String type, double version,
209         java.lang.String feedURL, java.lang.String entryURL)
210         throws RemoteException {
211         try {
212             java.lang.String returnValue = BlogsEntryServiceUtil.getOrganizationEntriesRSS(organizationId,
213                     max, type, version, feedURL, entryURL);
214 
215             return returnValue;
216         }
217         catch (Exception e) {
218             _log.error(e, e);
219             throw new RemoteException(e.getMessage());
220         }
221     }
222 
223     private static Log _log = LogFactoryUtil.getLog(BlogsEntryServiceSoap.class);
224 }