1   /**
2    * Copyright (c) 2000-2008 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.tags.service;
24  
25  
26  /**
27   * <a href="TagsAssetServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * <code>com.liferay.portlet.tags.service.TagsAssetService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * <p>
43   * <code>com.liferay.portlet.tags.service.TagsAssetServiceFactory</code>
44   * is responsible for the lookup of the bean.
45   * </p>
46   *
47   * @author Brian Wing Shun Chan
48   *
49   * @see com.liferay.portlet.tags.service.TagsAssetService
50   * @see com.liferay.portlet.tags.service.TagsAssetServiceFactory
51   *
52   */
53  public class TagsAssetServiceUtil {
54      public static void deleteAsset(long assetId)
55          throws com.liferay.portal.PortalException,
56              com.liferay.portal.SystemException, java.rmi.RemoteException {
57          TagsAssetService tagsAssetService = TagsAssetServiceFactory.getService();
58  
59          tagsAssetService.deleteAsset(assetId);
60      }
61  
62      public static com.liferay.portlet.tags.model.TagsAsset getAsset(
63          long assetId)
64          throws com.liferay.portal.PortalException,
65              com.liferay.portal.SystemException, java.rmi.RemoteException {
66          TagsAssetService tagsAssetService = TagsAssetServiceFactory.getService();
67  
68          return tagsAssetService.getAsset(assetId);
69      }
70  
71      public static java.lang.String getAssetsRSS(long groupId,
72          long[] classNameIds, long[] entryIds, long[] notEntryIds,
73          boolean andOperator, java.lang.String orderByCol1,
74          java.lang.String orderByCol2, java.lang.String orderByType1,
75          java.lang.String orderByType2, boolean excludeZeroViewCount,
76          java.util.Date publishDate, java.util.Date expirationDate, int max,
77          java.lang.String type, double version, java.lang.String displayStyle,
78          java.lang.String feedURL, java.lang.String entryURL)
79          throws com.liferay.portal.PortalException,
80              com.liferay.portal.SystemException, java.rmi.RemoteException {
81          TagsAssetService tagsAssetService = TagsAssetServiceFactory.getService();
82  
83          return tagsAssetService.getAssetsRSS(groupId, classNameIds, entryIds,
84              notEntryIds, andOperator, orderByCol1, orderByCol2, orderByType1,
85              orderByType2, excludeZeroViewCount, publishDate, expirationDate,
86              max, type, version, displayStyle, feedURL, entryURL);
87      }
88  
89      public static com.liferay.portlet.tags.model.TagsAssetType[] getAssetTypes(
90          java.lang.String languageId) throws java.rmi.RemoteException {
91          TagsAssetService tagsAssetService = TagsAssetServiceFactory.getService();
92  
93          return tagsAssetService.getAssetTypes(languageId);
94      }
95  
96      public static com.liferay.portlet.tags.model.TagsAssetDisplay[] getCompanyAssetDisplays(
97          long companyId, int begin, int end, java.lang.String languageId)
98          throws com.liferay.portal.PortalException,
99              com.liferay.portal.SystemException, java.rmi.RemoteException {
100         TagsAssetService tagsAssetService = TagsAssetServiceFactory.getService();
101 
102         return tagsAssetService.getCompanyAssetDisplays(companyId, begin, end,
103             languageId);
104     }
105 
106     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getCompanyAssets(
107         long companyId, int begin, int end)
108         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
109         TagsAssetService tagsAssetService = TagsAssetServiceFactory.getService();
110 
111         return tagsAssetService.getCompanyAssets(companyId, begin, end);
112     }
113 
114     public static int getCompanyAssetsCount(long companyId)
115         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
116         TagsAssetService tagsAssetService = TagsAssetServiceFactory.getService();
117 
118         return tagsAssetService.getCompanyAssetsCount(companyId);
119     }
120 
121     public static java.lang.String getCompanyAssetsRSS(long companyId, int max,
122         java.lang.String type, double version, java.lang.String displayStyle,
123         java.lang.String feedURL, java.lang.String entryURL)
124         throws com.liferay.portal.PortalException,
125             com.liferay.portal.SystemException, java.rmi.RemoteException {
126         TagsAssetService tagsAssetService = TagsAssetServiceFactory.getService();
127 
128         return tagsAssetService.getCompanyAssetsRSS(companyId, max, type,
129             version, displayStyle, feedURL, entryURL);
130     }
131 
132     public static com.liferay.portlet.tags.model.TagsAsset incrementViewCounter(
133         java.lang.String className, long classPK)
134         throws com.liferay.portal.PortalException,
135             com.liferay.portal.SystemException, java.rmi.RemoteException {
136         TagsAssetService tagsAssetService = TagsAssetServiceFactory.getService();
137 
138         return tagsAssetService.incrementViewCounter(className, classPK);
139     }
140 
141     public static com.liferay.portlet.tags.model.TagsAssetDisplay[] searchAssetDisplays(
142         long companyId, java.lang.String portletId, java.lang.String keywords,
143         java.lang.String languageId, int begin, int end)
144         throws com.liferay.portal.PortalException,
145             com.liferay.portal.SystemException, java.rmi.RemoteException {
146         TagsAssetService tagsAssetService = TagsAssetServiceFactory.getService();
147 
148         return tagsAssetService.searchAssetDisplays(companyId, portletId,
149             keywords, languageId, begin, end);
150     }
151 
152     public static int searchAssetDisplaysCount(long companyId,
153         java.lang.String portletId, java.lang.String keywords,
154         java.lang.String languageId)
155         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
156         TagsAssetService tagsAssetService = TagsAssetServiceFactory.getService();
157 
158         return tagsAssetService.searchAssetDisplaysCount(companyId, portletId,
159             keywords, languageId);
160     }
161 
162     public static com.liferay.portlet.tags.model.TagsAsset updateAsset(
163         long groupId, java.lang.String className, long classPK,
164         java.lang.String[] entryNames, java.util.Date startDate,
165         java.util.Date endDate, java.util.Date publishDate,
166         java.util.Date expirationDate, java.lang.String mimeType,
167         java.lang.String title, java.lang.String description,
168         java.lang.String summary, java.lang.String url, int height, int width,
169         java.lang.Integer priority)
170         throws com.liferay.portal.PortalException,
171             com.liferay.portal.SystemException, java.rmi.RemoteException {
172         TagsAssetService tagsAssetService = TagsAssetServiceFactory.getService();
173 
174         return tagsAssetService.updateAsset(groupId, className, classPK,
175             entryNames, startDate, endDate, publishDate, expirationDate,
176             mimeType, title, description, summary, url, height, width, priority);
177     }
178 }