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.tags.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.tags.service.TagsAssetServiceUtil;
29  
30  import java.rmi.RemoteException;
31  
32  /**
33   * <a href="TagsAssetServiceSoap.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.tags.service.TagsAssetServiceUtil} 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.tags.model.TagsAssetSoap}.
52   * If the method in the service utility returns a
53   * {@link com.liferay.portlet.tags.model.TagsAsset}, that is translated to a
54   * {@link com.liferay.portlet.tags.model.TagsAssetSoap}. 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       TagsAssetServiceHttp
78   * @see       com.liferay.portlet.tags.model.TagsAssetSoap
79   * @see       com.liferay.portlet.tags.service.TagsAssetServiceUtil
80   * @generated
81   */
82  public class TagsAssetServiceSoap {
83      public static void deleteAsset(long assetId) throws RemoteException {
84          try {
85              TagsAssetServiceUtil.deleteAsset(assetId);
86          }
87          catch (Exception e) {
88              _log.error(e, e);
89  
90              throw new RemoteException(e.getMessage());
91          }
92      }
93  
94      public static com.liferay.portlet.tags.model.TagsAssetSoap getAsset(
95          long assetId) throws RemoteException {
96          try {
97              com.liferay.portlet.tags.model.TagsAsset returnValue = TagsAssetServiceUtil.getAsset(assetId);
98  
99              return com.liferay.portlet.tags.model.TagsAssetSoap.toSoapModel(returnValue);
100         }
101         catch (Exception e) {
102             _log.error(e, e);
103 
104             throw new RemoteException(e.getMessage());
105         }
106     }
107 
108     public static com.liferay.portlet.tags.model.TagsAssetSoap[] getAssets(
109         long groupId, long[] classNameIds, long[] entryIds, long[] notEntryIds,
110         boolean andOperator, java.lang.String orderByCol1,
111         java.lang.String orderByCol2, java.lang.String orderByType1,
112         java.lang.String orderByType2, boolean excludeZeroViewCount,
113         java.util.Date publishDate, java.util.Date expirationDate, int start,
114         int end) throws RemoteException {
115         try {
116             java.util.List<com.liferay.portlet.tags.model.TagsAsset> returnValue =
117                 TagsAssetServiceUtil.getAssets(groupId, classNameIds, entryIds,
118                     notEntryIds, andOperator, orderByCol1, orderByCol2,
119                     orderByType1, orderByType2, excludeZeroViewCount,
120                     publishDate, expirationDate, start, end);
121 
122             return com.liferay.portlet.tags.model.TagsAssetSoap.toSoapModels(returnValue);
123         }
124         catch (Exception e) {
125             _log.error(e, e);
126 
127             throw new RemoteException(e.getMessage());
128         }
129     }
130 
131     public static int getAssetsCount(long groupId, long[] classNameIds,
132         long[] entryIds, long[] notEntryIds, boolean andOperator,
133         boolean excludeZeroViewCount, java.util.Date publishDate,
134         java.util.Date expirationDate) throws RemoteException {
135         try {
136             int returnValue = TagsAssetServiceUtil.getAssetsCount(groupId,
137                     classNameIds, entryIds, notEntryIds, andOperator,
138                     excludeZeroViewCount, publishDate, expirationDate);
139 
140             return returnValue;
141         }
142         catch (Exception e) {
143             _log.error(e, e);
144 
145             throw new RemoteException(e.getMessage());
146         }
147     }
148 
149     public static java.lang.String getAssetsRSS(long groupId,
150         long[] classNameIds, long[] entryIds, long[] notEntryIds,
151         boolean andOperator, java.lang.String orderByCol1,
152         java.lang.String orderByCol2, java.lang.String orderByType1,
153         java.lang.String orderByType2, boolean excludeZeroViewCount,
154         java.util.Date publishDate, java.util.Date expirationDate, int max,
155         java.lang.String type, double version, java.lang.String displayStyle,
156         java.lang.String feedURL, java.lang.String entryURL)
157         throws RemoteException {
158         try {
159             java.lang.String returnValue = TagsAssetServiceUtil.getAssetsRSS(groupId,
160                     classNameIds, entryIds, notEntryIds, andOperator,
161                     orderByCol1, orderByCol2, orderByType1, orderByType2,
162                     excludeZeroViewCount, publishDate, expirationDate, max,
163                     type, version, displayStyle, feedURL, entryURL);
164 
165             return returnValue;
166         }
167         catch (Exception e) {
168             _log.error(e, e);
169 
170             throw new RemoteException(e.getMessage());
171         }
172     }
173 
174     public static com.liferay.portlet.tags.model.TagsAssetType[] getAssetTypes(
175         java.lang.String languageId) throws RemoteException {
176         try {
177             com.liferay.portlet.tags.model.TagsAssetType[] returnValue = TagsAssetServiceUtil.getAssetTypes(languageId);
178 
179             return returnValue;
180         }
181         catch (Exception e) {
182             _log.error(e, e);
183 
184             throw new RemoteException(e.getMessage());
185         }
186     }
187 
188     public static com.liferay.portlet.tags.model.TagsAssetDisplay[] getCompanyAssetDisplays(
189         long companyId, int start, int end, java.lang.String languageId)
190         throws RemoteException {
191         try {
192             com.liferay.portlet.tags.model.TagsAssetDisplay[] returnValue = TagsAssetServiceUtil.getCompanyAssetDisplays(companyId,
193                     start, end, languageId);
194 
195             return returnValue;
196         }
197         catch (Exception e) {
198             _log.error(e, e);
199 
200             throw new RemoteException(e.getMessage());
201         }
202     }
203 
204     public static com.liferay.portlet.tags.model.TagsAssetSoap[] getCompanyAssets(
205         long companyId, int start, int end) throws RemoteException {
206         try {
207             java.util.List<com.liferay.portlet.tags.model.TagsAsset> returnValue =
208                 TagsAssetServiceUtil.getCompanyAssets(companyId, start, end);
209 
210             return com.liferay.portlet.tags.model.TagsAssetSoap.toSoapModels(returnValue);
211         }
212         catch (Exception e) {
213             _log.error(e, e);
214 
215             throw new RemoteException(e.getMessage());
216         }
217     }
218 
219     public static int getCompanyAssetsCount(long companyId)
220         throws RemoteException {
221         try {
222             int returnValue = TagsAssetServiceUtil.getCompanyAssetsCount(companyId);
223 
224             return returnValue;
225         }
226         catch (Exception e) {
227             _log.error(e, e);
228 
229             throw new RemoteException(e.getMessage());
230         }
231     }
232 
233     public static java.lang.String getCompanyAssetsRSS(long companyId, int max,
234         java.lang.String type, double version, java.lang.String displayStyle,
235         java.lang.String feedURL, java.lang.String entryURL)
236         throws RemoteException {
237         try {
238             java.lang.String returnValue = TagsAssetServiceUtil.getCompanyAssetsRSS(companyId,
239                     max, type, version, displayStyle, feedURL, entryURL);
240 
241             return returnValue;
242         }
243         catch (Exception e) {
244             _log.error(e, e);
245 
246             throw new RemoteException(e.getMessage());
247         }
248     }
249 
250     public static com.liferay.portlet.tags.model.TagsAssetSoap incrementViewCounter(
251         java.lang.String className, long classPK) throws RemoteException {
252         try {
253             com.liferay.portlet.tags.model.TagsAsset returnValue = TagsAssetServiceUtil.incrementViewCounter(className,
254                     classPK);
255 
256             return com.liferay.portlet.tags.model.TagsAssetSoap.toSoapModel(returnValue);
257         }
258         catch (Exception e) {
259             _log.error(e, e);
260 
261             throw new RemoteException(e.getMessage());
262         }
263     }
264 
265     public static com.liferay.portlet.tags.model.TagsAssetDisplay[] searchAssetDisplays(
266         long companyId, java.lang.String portletId, java.lang.String keywords,
267         java.lang.String languageId, int start, int end)
268         throws RemoteException {
269         try {
270             com.liferay.portlet.tags.model.TagsAssetDisplay[] returnValue = TagsAssetServiceUtil.searchAssetDisplays(companyId,
271                     portletId, keywords, languageId, start, end);
272 
273             return returnValue;
274         }
275         catch (Exception e) {
276             _log.error(e, e);
277 
278             throw new RemoteException(e.getMessage());
279         }
280     }
281 
282     public static int searchAssetDisplaysCount(long companyId,
283         java.lang.String portletId, java.lang.String keywords,
284         java.lang.String languageId) throws RemoteException {
285         try {
286             int returnValue = TagsAssetServiceUtil.searchAssetDisplaysCount(companyId,
287                     portletId, keywords, languageId);
288 
289             return returnValue;
290         }
291         catch (Exception e) {
292             _log.error(e, e);
293 
294             throw new RemoteException(e.getMessage());
295         }
296     }
297 
298     public static com.liferay.portlet.tags.model.TagsAssetSoap updateAsset(
299         long groupId, java.lang.String className, long classPK,
300         java.lang.String[] categoryNames, java.lang.String[] entryNames,
301         boolean visible, java.util.Date startDate, java.util.Date endDate,
302         java.util.Date publishDate, java.util.Date expirationDate,
303         java.lang.String mimeType, java.lang.String title,
304         java.lang.String description, java.lang.String summary,
305         java.lang.String url, int height, int width, java.lang.Integer priority)
306         throws RemoteException {
307         try {
308             com.liferay.portlet.tags.model.TagsAsset returnValue = TagsAssetServiceUtil.updateAsset(groupId,
309                     className, classPK, categoryNames, entryNames, visible,
310                     startDate, endDate, publishDate, expirationDate, mimeType,
311                     title, description, summary, url, height, width, priority);
312 
313             return com.liferay.portlet.tags.model.TagsAssetSoap.toSoapModel(returnValue);
314         }
315         catch (Exception e) {
316             _log.error(e, e);
317 
318             throw new RemoteException(e.getMessage());
319         }
320     }
321 
322     private static Log _log = LogFactoryUtil.getLog(TagsAssetServiceSoap.class);
323 }