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="TagsAssetLocalServiceUtil.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.TagsAssetLocalService</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.TagsAssetLocalServiceFactory</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.TagsAssetLocalService
50   * @see com.liferay.portlet.tags.service.TagsAssetLocalServiceFactory
51   *
52   */
53  public class TagsAssetLocalServiceUtil {
54      public static com.liferay.portlet.tags.model.TagsAsset addTagsAsset(
55          com.liferay.portlet.tags.model.TagsAsset tagsAsset)
56          throws com.liferay.portal.SystemException {
57          TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
58  
59          return tagsAssetLocalService.addTagsAsset(tagsAsset);
60      }
61  
62      public static void deleteTagsAsset(long assetId)
63          throws com.liferay.portal.PortalException,
64              com.liferay.portal.SystemException {
65          TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
66  
67          tagsAssetLocalService.deleteTagsAsset(assetId);
68      }
69  
70      public static void deleteTagsAsset(
71          com.liferay.portlet.tags.model.TagsAsset tagsAsset)
72          throws com.liferay.portal.SystemException {
73          TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
74  
75          tagsAssetLocalService.deleteTagsAsset(tagsAsset);
76      }
77  
78      public static java.util.List<Object> dynamicQuery(
79          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
80          throws com.liferay.portal.SystemException {
81          TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
82  
83          return tagsAssetLocalService.dynamicQuery(dynamicQuery);
84      }
85  
86      public static java.util.List<Object> dynamicQuery(
87          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
88          int end) throws com.liferay.portal.SystemException {
89          TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
90  
91          return tagsAssetLocalService.dynamicQuery(dynamicQuery, start, end);
92      }
93  
94      public static com.liferay.portlet.tags.model.TagsAsset getTagsAsset(
95          long assetId)
96          throws com.liferay.portal.PortalException,
97              com.liferay.portal.SystemException {
98          TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
99  
100         return tagsAssetLocalService.getTagsAsset(assetId);
101     }
102 
103     public static com.liferay.portlet.tags.model.TagsAsset updateTagsAsset(
104         com.liferay.portlet.tags.model.TagsAsset tagsAsset)
105         throws com.liferay.portal.SystemException {
106         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
107 
108         return tagsAssetLocalService.updateTagsAsset(tagsAsset);
109     }
110 
111     public static void deleteAsset(long assetId)
112         throws com.liferay.portal.PortalException,
113             com.liferay.portal.SystemException {
114         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
115 
116         tagsAssetLocalService.deleteAsset(assetId);
117     }
118 
119     public static void deleteAsset(java.lang.String className, long classPK)
120         throws com.liferay.portal.PortalException,
121             com.liferay.portal.SystemException {
122         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
123 
124         tagsAssetLocalService.deleteAsset(className, classPK);
125     }
126 
127     public static void deleteAsset(
128         com.liferay.portlet.tags.model.TagsAsset asset)
129         throws com.liferay.portal.PortalException,
130             com.liferay.portal.SystemException {
131         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
132 
133         tagsAssetLocalService.deleteAsset(asset);
134     }
135 
136     public static com.liferay.portlet.tags.model.TagsAsset getAsset(
137         long assetId)
138         throws com.liferay.portal.PortalException,
139             com.liferay.portal.SystemException {
140         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
141 
142         return tagsAssetLocalService.getAsset(assetId);
143     }
144 
145     public static com.liferay.portlet.tags.model.TagsAsset getAsset(
146         java.lang.String className, long classPK)
147         throws com.liferay.portal.PortalException,
148             com.liferay.portal.SystemException {
149         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
150 
151         return tagsAssetLocalService.getAsset(className, classPK);
152     }
153 
154     public static com.liferay.portlet.tags.model.TagsAssetType[] getAssetTypes(
155         java.lang.String languageId) {
156         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
157 
158         return tagsAssetLocalService.getAssetTypes(languageId);
159     }
160 
161     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getAssets(
162         long[] entryIds, long[] notEntryIds, boolean andOperator,
163         boolean excludeZeroViewCount, int start, int end)
164         throws com.liferay.portal.SystemException {
165         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
166 
167         return tagsAssetLocalService.getAssets(entryIds, notEntryIds,
168             andOperator, excludeZeroViewCount, start, end);
169     }
170 
171     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getAssets(
172         long groupId, long[] classNameIds, long[] entryIds, long[] notEntryIds,
173         boolean andOperator, boolean excludeZeroViewCount, int start, int end)
174         throws com.liferay.portal.SystemException {
175         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
176 
177         return tagsAssetLocalService.getAssets(groupId, classNameIds, entryIds,
178             notEntryIds, andOperator, excludeZeroViewCount, start, end);
179     }
180 
181     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getAssets(
182         long[] entryIds, long[] notEntryIds, boolean andOperator,
183         boolean excludeZeroViewCount, java.util.Date publishDate,
184         java.util.Date expirationDate, int start, int end)
185         throws com.liferay.portal.SystemException {
186         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
187 
188         return tagsAssetLocalService.getAssets(entryIds, notEntryIds,
189             andOperator, excludeZeroViewCount, publishDate, expirationDate,
190             start, end);
191     }
192 
193     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getAssets(
194         long groupId, long[] classNameIds, long[] entryIds, long[] notEntryIds,
195         boolean andOperator, boolean excludeZeroViewCount,
196         java.util.Date publishDate, java.util.Date expirationDate, int start,
197         int end) throws com.liferay.portal.SystemException {
198         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
199 
200         return tagsAssetLocalService.getAssets(groupId, classNameIds, entryIds,
201             notEntryIds, andOperator, excludeZeroViewCount, publishDate,
202             expirationDate, start, end);
203     }
204 
205     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getAssets(
206         long[] entryIds, long[] notEntryIds, boolean andOperator,
207         java.lang.String orderByCol1, java.lang.String orderByCol2,
208         java.lang.String orderByType1, java.lang.String orderByType2,
209         boolean excludeZeroViewCount, java.util.Date publishDate,
210         java.util.Date expirationDate, int start, int end)
211         throws com.liferay.portal.SystemException {
212         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
213 
214         return tagsAssetLocalService.getAssets(entryIds, notEntryIds,
215             andOperator, orderByCol1, orderByCol2, orderByType1, orderByType2,
216             excludeZeroViewCount, publishDate, expirationDate, start, end);
217     }
218 
219     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getAssets(
220         long groupId, long[] classNameIds, long[] entryIds, long[] notEntryIds,
221         boolean andOperator, java.lang.String orderByCol1,
222         java.lang.String orderByCol2, java.lang.String orderByType1,
223         java.lang.String orderByType2, boolean excludeZeroViewCount,
224         java.util.Date publishDate, java.util.Date expirationDate, int start,
225         int end) throws com.liferay.portal.SystemException {
226         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
227 
228         return tagsAssetLocalService.getAssets(groupId, classNameIds, entryIds,
229             notEntryIds, andOperator, orderByCol1, orderByCol2, orderByType1,
230             orderByType2, excludeZeroViewCount, publishDate, expirationDate,
231             start, end);
232     }
233 
234     public static int getAssetsCount(long[] entryIds, long[] notEntryIds,
235         boolean andOperator, boolean excludeZeroViewCount)
236         throws com.liferay.portal.SystemException {
237         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
238 
239         return tagsAssetLocalService.getAssetsCount(entryIds, notEntryIds,
240             andOperator, excludeZeroViewCount);
241     }
242 
243     public static int getAssetsCount(long groupId, long[] entryIds,
244         long[] notEntryIds, boolean andOperator, boolean excludeZeroViewCount)
245         throws com.liferay.portal.SystemException {
246         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
247 
248         return tagsAssetLocalService.getAssetsCount(groupId, entryIds,
249             notEntryIds, andOperator, excludeZeroViewCount);
250     }
251 
252     public static int getAssetsCount(long[] entryIds, long[] notEntryIds,
253         boolean andOperator, boolean excludeZeroViewCount,
254         java.util.Date publishDate, java.util.Date expirationDate)
255         throws com.liferay.portal.SystemException {
256         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
257 
258         return tagsAssetLocalService.getAssetsCount(entryIds, notEntryIds,
259             andOperator, excludeZeroViewCount, publishDate, expirationDate);
260     }
261 
262     public static int getAssetsCount(long groupId, long[] classNameIds,
263         long[] entryIds, long[] notEntryIds, boolean andOperator,
264         boolean excludeZeroViewCount, java.util.Date publishDate,
265         java.util.Date expirationDate)
266         throws com.liferay.portal.SystemException {
267         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
268 
269         return tagsAssetLocalService.getAssetsCount(groupId, classNameIds,
270             entryIds, notEntryIds, andOperator, excludeZeroViewCount,
271             publishDate, expirationDate);
272     }
273 
274     public static com.liferay.portlet.tags.model.TagsAssetDisplay[] getCompanyAssetDisplays(
275         long companyId, int start, int end, java.lang.String languageId)
276         throws com.liferay.portal.SystemException {
277         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
278 
279         return tagsAssetLocalService.getCompanyAssetDisplays(companyId, start,
280             end, languageId);
281     }
282 
283     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getCompanyAssets(
284         long companyId, int start, int end)
285         throws com.liferay.portal.SystemException {
286         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
287 
288         return tagsAssetLocalService.getCompanyAssets(companyId, start, end);
289     }
290 
291     public static int getCompanyAssetsCount(long companyId)
292         throws com.liferay.portal.SystemException {
293         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
294 
295         return tagsAssetLocalService.getCompanyAssetsCount(companyId);
296     }
297 
298     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getTopViewedAssets(
299         java.lang.String className, boolean asc, int start, int end)
300         throws com.liferay.portal.SystemException {
301         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
302 
303         return tagsAssetLocalService.getTopViewedAssets(className, asc, start,
304             end);
305     }
306 
307     public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getTopViewedAssets(
308         java.lang.String[] className, boolean asc, int start, int end)
309         throws com.liferay.portal.SystemException {
310         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
311 
312         return tagsAssetLocalService.getTopViewedAssets(className, asc, start,
313             end);
314     }
315 
316     public static com.liferay.portlet.tags.model.TagsAsset incrementViewCounter(
317         java.lang.String className, long classPK)
318         throws com.liferay.portal.SystemException {
319         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
320 
321         return tagsAssetLocalService.incrementViewCounter(className, classPK);
322     }
323 
324     public static com.liferay.portal.kernel.search.Hits search(long companyId,
325         java.lang.String portletId, java.lang.String keywords, int start,
326         int end) throws com.liferay.portal.SystemException {
327         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
328 
329         return tagsAssetLocalService.search(companyId, portletId, keywords,
330             start, end);
331     }
332 
333     public static com.liferay.portlet.tags.model.TagsAssetDisplay[] searchAssetDisplays(
334         long companyId, java.lang.String portletId, java.lang.String keywords,
335         java.lang.String languageId, int start, int end)
336         throws com.liferay.portal.SystemException {
337         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
338 
339         return tagsAssetLocalService.searchAssetDisplays(companyId, portletId,
340             keywords, languageId, start, end);
341     }
342 
343     public static int searchAssetDisplaysCount(long companyId,
344         java.lang.String portletId, java.lang.String keywords,
345         java.lang.String languageId) throws com.liferay.portal.SystemException {
346         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
347 
348         return tagsAssetLocalService.searchAssetDisplaysCount(companyId,
349             portletId, keywords, languageId);
350     }
351 
352     public static com.liferay.portlet.tags.model.TagsAsset updateAsset(
353         long userId, long groupId, java.lang.String className, long classPK,
354         java.lang.String[] entryNames)
355         throws com.liferay.portal.PortalException,
356             com.liferay.portal.SystemException {
357         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
358 
359         return tagsAssetLocalService.updateAsset(userId, groupId, className,
360             classPK, entryNames);
361     }
362 
363     public static com.liferay.portlet.tags.model.TagsAsset updateAsset(
364         long userId, long groupId, java.lang.String className, long classPK,
365         java.lang.String[] entryNames, java.util.Date startDate,
366         java.util.Date endDate, java.util.Date publishDate,
367         java.util.Date expirationDate, java.lang.String mimeType,
368         java.lang.String title, java.lang.String description,
369         java.lang.String summary, java.lang.String url, int height, int width,
370         java.lang.Integer priority)
371         throws com.liferay.portal.PortalException,
372             com.liferay.portal.SystemException {
373         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
374 
375         return tagsAssetLocalService.updateAsset(userId, groupId, className,
376             classPK, entryNames, startDate, endDate, publishDate,
377             expirationDate, mimeType, title, description, summary, url, height,
378             width, priority);
379     }
380 
381     public static com.liferay.portlet.tags.model.TagsAsset updateAsset(
382         long userId, long groupId, java.lang.String className, long classPK,
383         java.lang.String[] entryNames, java.util.Date startDate,
384         java.util.Date endDate, java.util.Date publishDate,
385         java.util.Date expirationDate, java.lang.String mimeType,
386         java.lang.String title, java.lang.String description,
387         java.lang.String summary, java.lang.String url, int height, int width,
388         java.lang.Integer priority, boolean sync)
389         throws com.liferay.portal.PortalException,
390             com.liferay.portal.SystemException {
391         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
392 
393         return tagsAssetLocalService.updateAsset(userId, groupId, className,
394             classPK, entryNames, startDate, endDate, publishDate,
395             expirationDate, mimeType, title, description, summary, url, height,
396             width, priority, sync);
397     }
398 
399     public static void validate(java.lang.String className,
400         java.lang.String[] entryNames)
401         throws com.liferay.portal.PortalException {
402         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
403 
404         tagsAssetLocalService.validate(className, entryNames);
405     }
406 }