001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.asset.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link AssetTagLocalService} bean. The static methods of
023     * this class calls the same methods of the bean instance. It's convenient to be
024     * able to just write one line to call a method on a bean instead of writing a
025     * lookup call and a method call.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       AssetTagLocalService
030     * @generated
031     */
032    public class AssetTagLocalServiceUtil {
033            public static com.liferay.portlet.asset.model.AssetTag addAssetTag(
034                    com.liferay.portlet.asset.model.AssetTag assetTag)
035                    throws com.liferay.portal.kernel.exception.SystemException {
036                    return getService().addAssetTag(assetTag);
037            }
038    
039            public static com.liferay.portlet.asset.model.AssetTag createAssetTag(
040                    long tagId) {
041                    return getService().createAssetTag(tagId);
042            }
043    
044            public static void deleteAssetTag(long tagId)
045                    throws com.liferay.portal.kernel.exception.PortalException,
046                            com.liferay.portal.kernel.exception.SystemException {
047                    getService().deleteAssetTag(tagId);
048            }
049    
050            public static void deleteAssetTag(
051                    com.liferay.portlet.asset.model.AssetTag assetTag)
052                    throws com.liferay.portal.kernel.exception.SystemException {
053                    getService().deleteAssetTag(assetTag);
054            }
055    
056            @SuppressWarnings("unchecked")
057            public static java.util.List dynamicQuery(
058                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
059                    throws com.liferay.portal.kernel.exception.SystemException {
060                    return getService().dynamicQuery(dynamicQuery);
061            }
062    
063            @SuppressWarnings("unchecked")
064            public static java.util.List dynamicQuery(
065                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
066                    int end) throws com.liferay.portal.kernel.exception.SystemException {
067                    return getService().dynamicQuery(dynamicQuery, start, end);
068            }
069    
070            @SuppressWarnings("unchecked")
071            public static java.util.List dynamicQuery(
072                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
073                    int end,
074                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
075                    throws com.liferay.portal.kernel.exception.SystemException {
076                    return getService()
077                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
078            }
079    
080            public static long dynamicQueryCount(
081                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
082                    throws com.liferay.portal.kernel.exception.SystemException {
083                    return getService().dynamicQueryCount(dynamicQuery);
084            }
085    
086            public static com.liferay.portlet.asset.model.AssetTag getAssetTag(
087                    long tagId)
088                    throws com.liferay.portal.kernel.exception.PortalException,
089                            com.liferay.portal.kernel.exception.SystemException {
090                    return getService().getAssetTag(tagId);
091            }
092    
093            public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getAssetTags(
094                    int start, int end)
095                    throws com.liferay.portal.kernel.exception.SystemException {
096                    return getService().getAssetTags(start, end);
097            }
098    
099            public static int getAssetTagsCount()
100                    throws com.liferay.portal.kernel.exception.SystemException {
101                    return getService().getAssetTagsCount();
102            }
103    
104            public static com.liferay.portlet.asset.model.AssetTag updateAssetTag(
105                    com.liferay.portlet.asset.model.AssetTag assetTag)
106                    throws com.liferay.portal.kernel.exception.SystemException {
107                    return getService().updateAssetTag(assetTag);
108            }
109    
110            public static com.liferay.portlet.asset.model.AssetTag updateAssetTag(
111                    com.liferay.portlet.asset.model.AssetTag assetTag, boolean merge)
112                    throws com.liferay.portal.kernel.exception.SystemException {
113                    return getService().updateAssetTag(assetTag, merge);
114            }
115    
116            public static com.liferay.portlet.asset.model.AssetTag addTag(long userId,
117                    java.lang.String name, java.lang.String[] tagProperties,
118                    com.liferay.portal.service.ServiceContext serviceContext)
119                    throws com.liferay.portal.kernel.exception.PortalException,
120                            com.liferay.portal.kernel.exception.SystemException {
121                    return getService().addTag(userId, name, tagProperties, serviceContext);
122            }
123    
124            public static void addTagResources(
125                    com.liferay.portlet.asset.model.AssetTag tag,
126                    boolean addCommunityPermissions, boolean addGuestPermissions)
127                    throws com.liferay.portal.kernel.exception.PortalException,
128                            com.liferay.portal.kernel.exception.SystemException {
129                    getService()
130                            .addTagResources(tag, addCommunityPermissions, addGuestPermissions);
131            }
132    
133            public static void addTagResources(
134                    com.liferay.portlet.asset.model.AssetTag tag,
135                    java.lang.String[] communityPermissions,
136                    java.lang.String[] guestPermissions)
137                    throws com.liferay.portal.kernel.exception.PortalException,
138                            com.liferay.portal.kernel.exception.SystemException {
139                    getService().addTagResources(tag, communityPermissions, guestPermissions);
140            }
141    
142            public static void checkTags(long userId, long groupId,
143                    java.lang.String[] names)
144                    throws com.liferay.portal.kernel.exception.PortalException,
145                            com.liferay.portal.kernel.exception.SystemException {
146                    getService().checkTags(userId, groupId, names);
147            }
148    
149            public static com.liferay.portlet.asset.model.AssetTag decrementAssetCount(
150                    long tagId, long classNameId)
151                    throws com.liferay.portal.kernel.exception.PortalException,
152                            com.liferay.portal.kernel.exception.SystemException {
153                    return getService().decrementAssetCount(tagId, classNameId);
154            }
155    
156            public static void deleteTag(com.liferay.portlet.asset.model.AssetTag tag)
157                    throws com.liferay.portal.kernel.exception.PortalException,
158                            com.liferay.portal.kernel.exception.SystemException {
159                    getService().deleteTag(tag);
160            }
161    
162            public static void deleteTag(long tagId)
163                    throws com.liferay.portal.kernel.exception.PortalException,
164                            com.liferay.portal.kernel.exception.SystemException {
165                    getService().deleteTag(tagId);
166            }
167    
168            public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getEntryTags(
169                    long entryId)
170                    throws com.liferay.portal.kernel.exception.SystemException {
171                    return getService().getEntryTags(entryId);
172            }
173    
174            public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getGroupTags(
175                    long groupId)
176                    throws com.liferay.portal.kernel.exception.SystemException {
177                    return getService().getGroupTags(groupId);
178            }
179    
180            public static com.liferay.portlet.asset.model.AssetTag getTag(long tagId)
181                    throws com.liferay.portal.kernel.exception.PortalException,
182                            com.liferay.portal.kernel.exception.SystemException {
183                    return getService().getTag(tagId);
184            }
185    
186            public static com.liferay.portlet.asset.model.AssetTag getTag(
187                    long groupId, java.lang.String name)
188                    throws com.liferay.portal.kernel.exception.PortalException,
189                            com.liferay.portal.kernel.exception.SystemException {
190                    return getService().getTag(groupId, name);
191            }
192    
193            public static long[] getTagIds(long groupId, java.lang.String[] names)
194                    throws com.liferay.portal.kernel.exception.PortalException,
195                            com.liferay.portal.kernel.exception.SystemException {
196                    return getService().getTagIds(groupId, names);
197            }
198    
199            public static java.lang.String[] getTagNames()
200                    throws com.liferay.portal.kernel.exception.SystemException {
201                    return getService().getTagNames();
202            }
203    
204            public static java.lang.String[] getTagNames(long classNameId, long classPK)
205                    throws com.liferay.portal.kernel.exception.SystemException {
206                    return getService().getTagNames(classNameId, classPK);
207            }
208    
209            public static java.lang.String[] getTagNames(java.lang.String className,
210                    long classPK)
211                    throws com.liferay.portal.kernel.exception.SystemException {
212                    return getService().getTagNames(className, classPK);
213            }
214    
215            public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags()
216                    throws com.liferay.portal.kernel.exception.SystemException {
217                    return getService().getTags();
218            }
219    
220            public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
221                    long classNameId, long classPK)
222                    throws com.liferay.portal.kernel.exception.SystemException {
223                    return getService().getTags(classNameId, classPK);
224            }
225    
226            public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
227                    long groupId, long classNameId, java.lang.String name)
228                    throws com.liferay.portal.kernel.exception.SystemException {
229                    return getService().getTags(groupId, classNameId, name);
230            }
231    
232            public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
233                    long groupId, long classNameId, java.lang.String name, int start,
234                    int end) throws com.liferay.portal.kernel.exception.SystemException {
235                    return getService().getTags(groupId, classNameId, name, start, end);
236            }
237    
238            public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
239                    java.lang.String className, long classPK)
240                    throws com.liferay.portal.kernel.exception.SystemException {
241                    return getService().getTags(className, classPK);
242            }
243    
244            public static int getTagsSize(long groupId, long classNameId,
245                    java.lang.String name)
246                    throws com.liferay.portal.kernel.exception.SystemException {
247                    return getService().getTagsSize(groupId, classNameId, name);
248            }
249    
250            public static boolean hasTag(long groupId, java.lang.String name)
251                    throws com.liferay.portal.kernel.exception.PortalException,
252                            com.liferay.portal.kernel.exception.SystemException {
253                    return getService().hasTag(groupId, name);
254            }
255    
256            public static com.liferay.portlet.asset.model.AssetTag incrementAssetCount(
257                    long tagId, long classNameId)
258                    throws com.liferay.portal.kernel.exception.PortalException,
259                            com.liferay.portal.kernel.exception.SystemException {
260                    return getService().incrementAssetCount(tagId, classNameId);
261            }
262    
263            public static void mergeTags(long fromTagId, long toTagId)
264                    throws com.liferay.portal.kernel.exception.PortalException,
265                            com.liferay.portal.kernel.exception.SystemException {
266                    getService().mergeTags(fromTagId, toTagId);
267            }
268    
269            public static com.liferay.portal.kernel.json.JSONArray search(
270                    long groupId, java.lang.String name, java.lang.String[] tagProperties,
271                    int start, int end)
272                    throws com.liferay.portal.kernel.exception.SystemException {
273                    return getService().search(groupId, name, tagProperties, start, end);
274            }
275    
276            public static com.liferay.portlet.asset.model.AssetTag updateTag(
277                    long userId, long tagId, java.lang.String name,
278                    java.lang.String[] tagProperties,
279                    com.liferay.portal.service.ServiceContext serviceContext)
280                    throws com.liferay.portal.kernel.exception.PortalException,
281                            com.liferay.portal.kernel.exception.SystemException {
282                    return getService()
283                                       .updateTag(userId, tagId, name, tagProperties, serviceContext);
284            }
285    
286            public static AssetTagLocalService getService() {
287                    if (_service == null) {
288                            _service = (AssetTagLocalService)PortalBeanLocatorUtil.locate(AssetTagLocalService.class.getName());
289                    }
290    
291                    return _service;
292            }
293    
294            public void setService(AssetTagLocalService service) {
295                    _service = service;
296            }
297    
298            private static AssetTagLocalService _service;
299    }