1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.asset.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="AssetTagLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link AssetTagLocalService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       AssetTagLocalService
37   * @generated
38   */
39  public class AssetTagLocalServiceUtil {
40      public static com.liferay.portlet.asset.model.AssetTag addAssetTag(
41          com.liferay.portlet.asset.model.AssetTag assetTag)
42          throws com.liferay.portal.kernel.exception.SystemException {
43          return getService().addAssetTag(assetTag);
44      }
45  
46      public static com.liferay.portlet.asset.model.AssetTag createAssetTag(
47          long tagId) {
48          return getService().createAssetTag(tagId);
49      }
50  
51      public static void deleteAssetTag(long tagId)
52          throws com.liferay.portal.kernel.exception.PortalException,
53              com.liferay.portal.kernel.exception.SystemException {
54          getService().deleteAssetTag(tagId);
55      }
56  
57      public static void deleteAssetTag(
58          com.liferay.portlet.asset.model.AssetTag assetTag)
59          throws com.liferay.portal.kernel.exception.SystemException {
60          getService().deleteAssetTag(assetTag);
61      }
62  
63      @SuppressWarnings("unchecked")
64      public static java.util.List dynamicQuery(
65          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
66          throws com.liferay.portal.kernel.exception.SystemException {
67          return getService().dynamicQuery(dynamicQuery);
68      }
69  
70      @SuppressWarnings("unchecked")
71      public static java.util.List dynamicQuery(
72          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
73          int end) throws com.liferay.portal.kernel.exception.SystemException {
74          return getService().dynamicQuery(dynamicQuery, start, end);
75      }
76  
77      @SuppressWarnings("unchecked")
78      public static java.util.List dynamicQuery(
79          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
80          int end,
81          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
82          throws com.liferay.portal.kernel.exception.SystemException {
83          return getService()
84                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
85      }
86  
87      public static long dynamicQueryCount(
88          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
89          throws com.liferay.portal.kernel.exception.SystemException {
90          return getService().dynamicQueryCount(dynamicQuery);
91      }
92  
93      public static com.liferay.portlet.asset.model.AssetTag getAssetTag(
94          long tagId)
95          throws com.liferay.portal.kernel.exception.PortalException,
96              com.liferay.portal.kernel.exception.SystemException {
97          return getService().getAssetTag(tagId);
98      }
99  
100     public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getAssetTags(
101         int start, int end)
102         throws com.liferay.portal.kernel.exception.SystemException {
103         return getService().getAssetTags(start, end);
104     }
105 
106     public static int getAssetTagsCount()
107         throws com.liferay.portal.kernel.exception.SystemException {
108         return getService().getAssetTagsCount();
109     }
110 
111     public static com.liferay.portlet.asset.model.AssetTag updateAssetTag(
112         com.liferay.portlet.asset.model.AssetTag assetTag)
113         throws com.liferay.portal.kernel.exception.SystemException {
114         return getService().updateAssetTag(assetTag);
115     }
116 
117     public static com.liferay.portlet.asset.model.AssetTag updateAssetTag(
118         com.liferay.portlet.asset.model.AssetTag assetTag, boolean merge)
119         throws com.liferay.portal.kernel.exception.SystemException {
120         return getService().updateAssetTag(assetTag, merge);
121     }
122 
123     public static com.liferay.portlet.asset.model.AssetTag addTag(long userId,
124         java.lang.String name, java.lang.String[] tagProperties,
125         com.liferay.portal.service.ServiceContext serviceContext)
126         throws com.liferay.portal.kernel.exception.PortalException,
127             com.liferay.portal.kernel.exception.SystemException {
128         return getService().addTag(userId, name, tagProperties, serviceContext);
129     }
130 
131     public static void addTagResources(
132         com.liferay.portlet.asset.model.AssetTag tag,
133         boolean addCommunityPermissions, boolean addGuestPermissions)
134         throws com.liferay.portal.kernel.exception.PortalException,
135             com.liferay.portal.kernel.exception.SystemException {
136         getService()
137             .addTagResources(tag, addCommunityPermissions, addGuestPermissions);
138     }
139 
140     public static void addTagResources(
141         com.liferay.portlet.asset.model.AssetTag tag,
142         java.lang.String[] communityPermissions,
143         java.lang.String[] guestPermissions)
144         throws com.liferay.portal.kernel.exception.PortalException,
145             com.liferay.portal.kernel.exception.SystemException {
146         getService().addTagResources(tag, communityPermissions, guestPermissions);
147     }
148 
149     public static void checkTags(long userId, long groupId,
150         java.lang.String[] names)
151         throws com.liferay.portal.kernel.exception.PortalException,
152             com.liferay.portal.kernel.exception.SystemException {
153         getService().checkTags(userId, groupId, names);
154     }
155 
156     public static com.liferay.portlet.asset.model.AssetTag decrementAssetCount(
157         long tagId, long classNameId)
158         throws com.liferay.portal.kernel.exception.PortalException,
159             com.liferay.portal.kernel.exception.SystemException {
160         return getService().decrementAssetCount(tagId, classNameId);
161     }
162 
163     public static void deleteTag(com.liferay.portlet.asset.model.AssetTag tag)
164         throws com.liferay.portal.kernel.exception.PortalException,
165             com.liferay.portal.kernel.exception.SystemException {
166         getService().deleteTag(tag);
167     }
168 
169     public static void deleteTag(long tagId)
170         throws com.liferay.portal.kernel.exception.PortalException,
171             com.liferay.portal.kernel.exception.SystemException {
172         getService().deleteTag(tagId);
173     }
174 
175     public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getEntryTags(
176         long entryId)
177         throws com.liferay.portal.kernel.exception.SystemException {
178         return getService().getEntryTags(entryId);
179     }
180 
181     public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getGroupTags(
182         long groupId)
183         throws com.liferay.portal.kernel.exception.SystemException {
184         return getService().getGroupTags(groupId);
185     }
186 
187     public static com.liferay.portlet.asset.model.AssetTag getTag(long tagId)
188         throws com.liferay.portal.kernel.exception.PortalException,
189             com.liferay.portal.kernel.exception.SystemException {
190         return getService().getTag(tagId);
191     }
192 
193     public static com.liferay.portlet.asset.model.AssetTag getTag(
194         long groupId, java.lang.String name)
195         throws com.liferay.portal.kernel.exception.PortalException,
196             com.liferay.portal.kernel.exception.SystemException {
197         return getService().getTag(groupId, name);
198     }
199 
200     public static long[] getTagIds(long groupId, java.lang.String[] names)
201         throws com.liferay.portal.kernel.exception.PortalException,
202             com.liferay.portal.kernel.exception.SystemException {
203         return getService().getTagIds(groupId, names);
204     }
205 
206     public static java.lang.String[] getTagNames()
207         throws com.liferay.portal.kernel.exception.SystemException {
208         return getService().getTagNames();
209     }
210 
211     public static java.lang.String[] getTagNames(long classNameId, long classPK)
212         throws com.liferay.portal.kernel.exception.SystemException {
213         return getService().getTagNames(classNameId, classPK);
214     }
215 
216     public static java.lang.String[] getTagNames(java.lang.String className,
217         long classPK)
218         throws com.liferay.portal.kernel.exception.SystemException {
219         return getService().getTagNames(className, classPK);
220     }
221 
222     public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags()
223         throws com.liferay.portal.kernel.exception.SystemException {
224         return getService().getTags();
225     }
226 
227     public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
228         long classNameId, long classPK)
229         throws com.liferay.portal.kernel.exception.SystemException {
230         return getService().getTags(classNameId, classPK);
231     }
232 
233     public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
234         long groupId, long classNameId, java.lang.String name)
235         throws com.liferay.portal.kernel.exception.SystemException {
236         return getService().getTags(groupId, classNameId, name);
237     }
238 
239     public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
240         long groupId, long classNameId, java.lang.String name, int start,
241         int end) throws com.liferay.portal.kernel.exception.SystemException {
242         return getService().getTags(groupId, classNameId, name, start, end);
243     }
244 
245     public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
246         java.lang.String className, long classPK)
247         throws com.liferay.portal.kernel.exception.SystemException {
248         return getService().getTags(className, classPK);
249     }
250 
251     public static int getTagsSize(long groupId, long classNameId,
252         java.lang.String name)
253         throws com.liferay.portal.kernel.exception.SystemException {
254         return getService().getTagsSize(groupId, classNameId, name);
255     }
256 
257     public static boolean hasTag(long groupId, java.lang.String name)
258         throws com.liferay.portal.kernel.exception.PortalException,
259             com.liferay.portal.kernel.exception.SystemException {
260         return getService().hasTag(groupId, name);
261     }
262 
263     public static com.liferay.portlet.asset.model.AssetTag incrementAssetCount(
264         long tagId, long classNameId)
265         throws com.liferay.portal.kernel.exception.PortalException,
266             com.liferay.portal.kernel.exception.SystemException {
267         return getService().incrementAssetCount(tagId, classNameId);
268     }
269 
270     public static void mergeTags(long fromTagId, long toTagId)
271         throws com.liferay.portal.kernel.exception.PortalException,
272             com.liferay.portal.kernel.exception.SystemException {
273         getService().mergeTags(fromTagId, toTagId);
274     }
275 
276     public static com.liferay.portal.kernel.json.JSONArray search(
277         long groupId, java.lang.String name, java.lang.String[] tagProperties,
278         int start, int end)
279         throws com.liferay.portal.kernel.exception.SystemException {
280         return getService().search(groupId, name, tagProperties, start, end);
281     }
282 
283     public static com.liferay.portlet.asset.model.AssetTag updateTag(
284         long userId, long tagId, java.lang.String name,
285         java.lang.String[] tagProperties,
286         com.liferay.portal.service.ServiceContext serviceContext)
287         throws com.liferay.portal.kernel.exception.PortalException,
288             com.liferay.portal.kernel.exception.SystemException {
289         return getService()
290                    .updateTag(userId, tagId, name, tagProperties, serviceContext);
291     }
292 
293     public static AssetTagLocalService getService() {
294         if (_service == null) {
295             _service = (AssetTagLocalService)PortalBeanLocatorUtil.locate(AssetTagLocalService.class.getName());
296         }
297 
298         return _service;
299     }
300 
301     public void setService(AssetTagLocalService service) {
302         _service = service;
303     }
304 
305     private static AssetTagLocalService _service;
306 }