1   /**
2    * Copyright (c) 2000-2009 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   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.tags.service.http;
21  
22  import com.liferay.portal.kernel.log.Log;
23  import com.liferay.portal.kernel.log.LogFactoryUtil;
24  
25  import com.liferay.portlet.tags.service.TagsAssetServiceUtil;
26  
27  import java.rmi.RemoteException;
28  
29  /**
30   * <a href="TagsAssetServiceSoap.java.html"><b><i>View Source</i></b></a>
31   *
32   * <p>
33   * ServiceBuilder generated this class. Modifications in this class will be
34   * overwritten the next time is generated.
35   * </p>
36   *
37   * <p>
38   * This class provides a SOAP utility for the
39   * <code>com.liferay.portlet.tags.service.TagsAssetServiceUtil</code> service
40   * utility. The static methods of this class calls the same methods of the
41   * service utility. However, the signatures are different because it is
42   * difficult for SOAP to support certain types.
43   * </p>
44   *
45   * <p>
46   * ServiceBuilder follows certain rules in translating the methods. For example,
47   * if the method in the service utility returns a <code>java.util.List</code>,
48   * that is translated to an array of
49   * <code>com.liferay.portlet.tags.model.TagsAssetSoap</code>. If the method in the
50   * service utility returns a <code>com.liferay.portlet.tags.model.TagsAsset</code>,
51   * that is translated to a <code>com.liferay.portlet.tags.model.TagsAssetSoap</code>.
52   * Methods that SOAP cannot safely wire are skipped.
53   * </p>
54   *
55   * <p>
56   * The benefits of using the SOAP utility is that it is cross platform
57   * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
58   * even Perl, to call the generated services. One drawback of SOAP is that it is
59   * slow because it needs to serialize all calls into a text format (XML).
60   * </p>
61   *
62   * <p>
63   * You can see a list of services at
64   * http://localhost:8080/tunnel-web/secure/axis. Set the property
65   * <code>tunnel.servlet.hosts.allowed</code> in portal.properties to configure
66   * 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.tags.model.TagsAssetSoap
76   * @see com.liferay.portlet.tags.service.TagsAssetServiceUtil
77   * @see com.liferay.portlet.tags.service.http.TagsAssetServiceHttp
78   *
79   */
80  public class TagsAssetServiceSoap {
81      public static void deleteAsset(long assetId) throws RemoteException {
82          try {
83              TagsAssetServiceUtil.deleteAsset(assetId);
84          }
85          catch (Exception e) {
86              _log.error(e, e);
87  
88              throw new RemoteException(e.getMessage());
89          }
90      }
91  
92      public static com.liferay.portlet.tags.model.TagsAssetSoap getAsset(
93          long assetId) throws RemoteException {
94          try {
95              com.liferay.portlet.tags.model.TagsAsset returnValue = TagsAssetServiceUtil.getAsset(assetId);
96  
97              return com.liferay.portlet.tags.model.TagsAssetSoap.toSoapModel(returnValue);
98          }
99          catch (Exception e) {
100             _log.error(e, e);
101 
102             throw new RemoteException(e.getMessage());
103         }
104     }
105 
106     public static java.lang.String getAssetsRSS(long groupId,
107         long[] classNameIds, long[] entryIds, long[] notEntryIds,
108         boolean andOperator, java.lang.String orderByCol1,
109         java.lang.String orderByCol2, java.lang.String orderByType1,
110         java.lang.String orderByType2, boolean excludeZeroViewCount,
111         java.util.Date publishDate, java.util.Date expirationDate, int max,
112         java.lang.String type, double version, java.lang.String displayStyle,
113         java.lang.String feedURL, java.lang.String entryURL)
114         throws RemoteException {
115         try {
116             java.lang.String returnValue = TagsAssetServiceUtil.getAssetsRSS(groupId,
117                     classNameIds, entryIds, notEntryIds, andOperator,
118                     orderByCol1, orderByCol2, orderByType1, orderByType2,
119                     excludeZeroViewCount, publishDate, expirationDate, max,
120                     type, version, displayStyle, feedURL, entryURL);
121 
122             return returnValue;
123         }
124         catch (Exception e) {
125             _log.error(e, e);
126 
127             throw new RemoteException(e.getMessage());
128         }
129     }
130 
131     public static com.liferay.portlet.tags.model.TagsAssetType[] getAssetTypes(
132         java.lang.String languageId) throws RemoteException {
133         try {
134             com.liferay.portlet.tags.model.TagsAssetType[] returnValue = TagsAssetServiceUtil.getAssetTypes(languageId);
135 
136             return 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.tags.model.TagsAssetDisplay[] getCompanyAssetDisplays(
146         long companyId, int start, int end, java.lang.String languageId)
147         throws RemoteException {
148         try {
149             com.liferay.portlet.tags.model.TagsAssetDisplay[] returnValue = TagsAssetServiceUtil.getCompanyAssetDisplays(companyId,
150                     start, end, languageId);
151 
152             return returnValue;
153         }
154         catch (Exception e) {
155             _log.error(e, e);
156 
157             throw new RemoteException(e.getMessage());
158         }
159     }
160 
161     public static com.liferay.portlet.tags.model.TagsAssetSoap[] getCompanyAssets(
162         long companyId, int start, int end) throws RemoteException {
163         try {
164             java.util.List<com.liferay.portlet.tags.model.TagsAsset> returnValue =
165                 TagsAssetServiceUtil.getCompanyAssets(companyId, start, end);
166 
167             return com.liferay.portlet.tags.model.TagsAssetSoap.toSoapModels(returnValue);
168         }
169         catch (Exception e) {
170             _log.error(e, e);
171 
172             throw new RemoteException(e.getMessage());
173         }
174     }
175 
176     public static int getCompanyAssetsCount(long companyId)
177         throws RemoteException {
178         try {
179             int returnValue = TagsAssetServiceUtil.getCompanyAssetsCount(companyId);
180 
181             return returnValue;
182         }
183         catch (Exception e) {
184             _log.error(e, e);
185 
186             throw new RemoteException(e.getMessage());
187         }
188     }
189 
190     public static java.lang.String getCompanyAssetsRSS(long companyId, int max,
191         java.lang.String type, double version, java.lang.String displayStyle,
192         java.lang.String feedURL, java.lang.String entryURL)
193         throws RemoteException {
194         try {
195             java.lang.String returnValue = TagsAssetServiceUtil.getCompanyAssetsRSS(companyId,
196                     max, type, version, displayStyle, feedURL, entryURL);
197 
198             return returnValue;
199         }
200         catch (Exception e) {
201             _log.error(e, e);
202 
203             throw new RemoteException(e.getMessage());
204         }
205     }
206 
207     public static com.liferay.portlet.tags.model.TagsAssetSoap incrementViewCounter(
208         java.lang.String className, long classPK) throws RemoteException {
209         try {
210             com.liferay.portlet.tags.model.TagsAsset returnValue = TagsAssetServiceUtil.incrementViewCounter(className,
211                     classPK);
212 
213             return com.liferay.portlet.tags.model.TagsAssetSoap.toSoapModel(returnValue);
214         }
215         catch (Exception e) {
216             _log.error(e, e);
217 
218             throw new RemoteException(e.getMessage());
219         }
220     }
221 
222     public static com.liferay.portlet.tags.model.TagsAssetDisplay[] searchAssetDisplays(
223         long companyId, java.lang.String portletId, java.lang.String keywords,
224         java.lang.String languageId, int start, int end)
225         throws RemoteException {
226         try {
227             com.liferay.portlet.tags.model.TagsAssetDisplay[] returnValue = TagsAssetServiceUtil.searchAssetDisplays(companyId,
228                     portletId, keywords, languageId, start, end);
229 
230             return returnValue;
231         }
232         catch (Exception e) {
233             _log.error(e, e);
234 
235             throw new RemoteException(e.getMessage());
236         }
237     }
238 
239     public static int searchAssetDisplaysCount(long companyId,
240         java.lang.String portletId, java.lang.String keywords,
241         java.lang.String languageId) throws RemoteException {
242         try {
243             int returnValue = TagsAssetServiceUtil.searchAssetDisplaysCount(companyId,
244                     portletId, keywords, languageId);
245 
246             return returnValue;
247         }
248         catch (Exception e) {
249             _log.error(e, e);
250 
251             throw new RemoteException(e.getMessage());
252         }
253     }
254 
255     public static com.liferay.portlet.tags.model.TagsAssetSoap updateAsset(
256         long groupId, java.lang.String className, long classPK,
257         java.lang.String[] entryNames, java.util.Date startDate,
258         java.util.Date endDate, java.util.Date publishDate,
259         java.util.Date expirationDate, java.lang.String mimeType,
260         java.lang.String title, java.lang.String description,
261         java.lang.String summary, java.lang.String url, int height, int width,
262         java.lang.Integer priority) throws RemoteException {
263         try {
264             com.liferay.portlet.tags.model.TagsAsset returnValue = TagsAssetServiceUtil.updateAsset(groupId,
265                     className, classPK, entryNames, startDate, endDate,
266                     publishDate, expirationDate, mimeType, title, description,
267                     summary, url, height, width, priority);
268 
269             return com.liferay.portlet.tags.model.TagsAssetSoap.toSoapModel(returnValue);
270         }
271         catch (Exception e) {
272             _log.error(e, e);
273 
274             throw new RemoteException(e.getMessage());
275         }
276     }
277 
278     private static Log _log = LogFactoryUtil.getLog(TagsAssetServiceSoap.class);
279 }