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.tags.service;
24  
25  /**
26   * <a href="TagsAssetLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be overwritten
30   * the next time is generated.
31   * </p>
32   *
33   * <p>
34   * This class provides static methods for the <code>com.liferay.portlet.tags.service.TagsAssetLocalService</code>
35   * bean. The static methods of this class calls the same methods of the bean instance.
36   * It's convenient to be able to just write one line to call a method on a bean
37   * instead of writing a lookup call and a method call.
38   * </p>
39   *
40   * <p>
41   * <code>com.liferay.portlet.tags.service.TagsAssetLocalServiceFactory</code> is
42   * responsible for the lookup of the bean.
43   * </p>
44   *
45   * @author Brian Wing Shun Chan
46   *
47   * @see com.liferay.portlet.tags.service.TagsAssetLocalService
48   * @see com.liferay.portlet.tags.service.TagsAssetLocalServiceFactory
49   *
50   */
51  public class TagsAssetLocalServiceUtil {
52      public static com.liferay.portlet.tags.model.TagsAsset addTagsAsset(
53          com.liferay.portlet.tags.model.TagsAsset model)
54          throws com.liferay.portal.SystemException {
55          TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
56  
57          return tagsAssetLocalService.addTagsAsset(model);
58      }
59  
60      public static java.util.List dynamicQuery(
61          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
62          throws com.liferay.portal.SystemException {
63          TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
64  
65          return tagsAssetLocalService.dynamicQuery(queryInitializer);
66      }
67  
68      public static java.util.List dynamicQuery(
69          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
70          int begin, int end) throws com.liferay.portal.SystemException {
71          TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
72  
73          return tagsAssetLocalService.dynamicQuery(queryInitializer, begin, end);
74      }
75  
76      public static com.liferay.portlet.tags.model.TagsAsset updateTagsAsset(
77          com.liferay.portlet.tags.model.TagsAsset model)
78          throws com.liferay.portal.SystemException {
79          TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
80  
81          return tagsAssetLocalService.updateTagsAsset(model);
82      }
83  
84      public static void deleteAsset(long assetId)
85          throws com.liferay.portal.PortalException, 
86              com.liferay.portal.SystemException {
87          TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
88          tagsAssetLocalService.deleteAsset(assetId);
89      }
90  
91      public static void deleteAsset(java.lang.String className, long classPK)
92          throws com.liferay.portal.PortalException, 
93              com.liferay.portal.SystemException {
94          TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
95          tagsAssetLocalService.deleteAsset(className, classPK);
96      }
97  
98      public static void deleteAsset(
99          com.liferay.portlet.tags.model.TagsAsset asset)
100         throws com.liferay.portal.PortalException, 
101             com.liferay.portal.SystemException {
102         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
103         tagsAssetLocalService.deleteAsset(asset);
104     }
105 
106     public static com.liferay.portlet.tags.model.TagsAsset getAsset(
107         long assetId)
108         throws com.liferay.portal.PortalException, 
109             com.liferay.portal.SystemException {
110         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
111 
112         return tagsAssetLocalService.getAsset(assetId);
113     }
114 
115     public static com.liferay.portlet.tags.model.TagsAsset getAsset(
116         java.lang.String className, long classPK)
117         throws com.liferay.portal.PortalException, 
118             com.liferay.portal.SystemException {
119         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
120 
121         return tagsAssetLocalService.getAsset(className, classPK);
122     }
123 
124     public static com.liferay.portlet.tags.model.TagsAssetType[] getAssetTypes(
125         java.lang.String languageId) {
126         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
127 
128         return tagsAssetLocalService.getAssetTypes(languageId);
129     }
130 
131     public static java.util.List getAssets(long[] entryIds, long[] notEntryIds,
132         boolean andOperator, int begin, int end)
133         throws com.liferay.portal.SystemException {
134         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
135 
136         return tagsAssetLocalService.getAssets(entryIds, notEntryIds,
137             andOperator, begin, end);
138     }
139 
140     public static java.util.List getAssets(long[] entryIds, long[] notEntryIds,
141         boolean andOperator, java.util.Date publishDate,
142         java.util.Date expirationDate, int begin, int end)
143         throws com.liferay.portal.SystemException {
144         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
145 
146         return tagsAssetLocalService.getAssets(entryIds, notEntryIds,
147             andOperator, publishDate, expirationDate, begin, end);
148     }
149 
150     public static int getAssetsCount(long[] entryIds, long[] notEntryIds,
151         boolean andOperator) throws com.liferay.portal.SystemException {
152         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
153 
154         return tagsAssetLocalService.getAssetsCount(entryIds, notEntryIds,
155             andOperator);
156     }
157 
158     public static int getAssetsCount(long[] entryIds, long[] notEntryIds,
159         boolean andOperator, java.util.Date publishDate,
160         java.util.Date expirationDate)
161         throws com.liferay.portal.SystemException {
162         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
163 
164         return tagsAssetLocalService.getAssetsCount(entryIds, notEntryIds,
165             andOperator, publishDate, expirationDate);
166     }
167 
168     public static com.liferay.portlet.tags.model.TagsAssetDisplay[] getCompanyAssetDisplays(
169         long companyId, int begin, int end, java.lang.String languageId)
170         throws com.liferay.portal.PortalException, 
171             com.liferay.portal.SystemException {
172         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
173 
174         return tagsAssetLocalService.getCompanyAssetDisplays(companyId, begin,
175             end, languageId);
176     }
177 
178     public static java.util.List getCompanyAssets(long companyId, int begin,
179         int end) throws com.liferay.portal.SystemException {
180         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
181 
182         return tagsAssetLocalService.getCompanyAssets(companyId, begin, end);
183     }
184 
185     public static int getCompanyAssetsCount(long companyId)
186         throws com.liferay.portal.SystemException {
187         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
188 
189         return tagsAssetLocalService.getCompanyAssetsCount(companyId);
190     }
191 
192     public static com.liferay.portal.kernel.search.Hits search(long companyId,
193         java.lang.String portletId, java.lang.String keywords)
194         throws com.liferay.portal.SystemException {
195         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
196 
197         return tagsAssetLocalService.search(companyId, portletId, keywords);
198     }
199 
200     public static com.liferay.portlet.tags.model.TagsAssetDisplay[] searchAssetDisplays(
201         long companyId, java.lang.String portletId, java.lang.String keywords,
202         java.lang.String languageId, int begin, int end)
203         throws com.liferay.portal.PortalException, 
204             com.liferay.portal.SystemException {
205         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
206 
207         return tagsAssetLocalService.searchAssetDisplays(companyId, portletId,
208             keywords, languageId, begin, end);
209     }
210 
211     public static int searchAssetDisplaysCount(long companyId,
212         java.lang.String portletId, java.lang.String keywords,
213         java.lang.String languageId) throws com.liferay.portal.SystemException {
214         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
215 
216         return tagsAssetLocalService.searchAssetDisplaysCount(companyId,
217             portletId, keywords, languageId);
218     }
219 
220     public static com.liferay.portlet.tags.model.TagsAsset updateAsset(
221         long userId, java.lang.String className, long classPK,
222         java.lang.String[] entryNames)
223         throws com.liferay.portal.PortalException, 
224             com.liferay.portal.SystemException {
225         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
226 
227         return tagsAssetLocalService.updateAsset(userId, className, classPK,
228             entryNames);
229     }
230 
231     public static com.liferay.portlet.tags.model.TagsAsset updateAsset(
232         long userId, java.lang.String className, long classPK,
233         java.lang.String[] entryNames, java.util.Date startDate,
234         java.util.Date endDate, java.util.Date publishDate,
235         java.util.Date expirationDate, java.lang.String mimeType,
236         java.lang.String title, java.lang.String description,
237         java.lang.String summary, java.lang.String url, int height, int width)
238         throws com.liferay.portal.PortalException, 
239             com.liferay.portal.SystemException {
240         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
241 
242         return tagsAssetLocalService.updateAsset(userId, className, classPK,
243             entryNames, startDate, endDate, publishDate, expirationDate,
244             mimeType, title, description, summary, url, height, width);
245     }
246 
247     public static void validate(java.lang.String className,
248         java.lang.String[] entryNames)
249         throws com.liferay.portal.PortalException {
250         TagsAssetLocalService tagsAssetLocalService = TagsAssetLocalServiceFactory.getService();
251         tagsAssetLocalService.validate(className, entryNames);
252     }
253 }