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="AssetTagServiceUtil.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 AssetTagService} 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       AssetTagService
37   * @generated
38   */
39  public class AssetTagServiceUtil {
40      public static com.liferay.portlet.asset.model.AssetTag addTag(
41          java.lang.String name, java.lang.String[] tagProperties,
42          com.liferay.portal.service.ServiceContext serviceContext)
43          throws com.liferay.portal.kernel.exception.PortalException,
44              com.liferay.portal.kernel.exception.SystemException {
45          return getService().addTag(name, tagProperties, serviceContext);
46      }
47  
48      public static void deleteTag(long tagId)
49          throws com.liferay.portal.kernel.exception.PortalException,
50              com.liferay.portal.kernel.exception.SystemException {
51          getService().deleteTag(tagId);
52      }
53  
54      public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getGroupTags(
55          long groupId)
56          throws com.liferay.portal.kernel.exception.PortalException,
57              com.liferay.portal.kernel.exception.SystemException {
58          return getService().getGroupTags(groupId);
59      }
60  
61      public static com.liferay.portlet.asset.model.AssetTag getTag(long tagId)
62          throws com.liferay.portal.kernel.exception.PortalException,
63              com.liferay.portal.kernel.exception.SystemException {
64          return getService().getTag(tagId);
65      }
66  
67      public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
68          long groupId, long classNameId, java.lang.String name)
69          throws com.liferay.portal.kernel.exception.PortalException,
70              com.liferay.portal.kernel.exception.SystemException {
71          return getService().getTags(groupId, classNameId, name);
72      }
73  
74      public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
75          java.lang.String className, long classPK)
76          throws com.liferay.portal.kernel.exception.PortalException,
77              com.liferay.portal.kernel.exception.SystemException {
78          return getService().getTags(className, classPK);
79      }
80  
81      public static void mergeTags(long fromTagId, long toTagId)
82          throws com.liferay.portal.kernel.exception.PortalException,
83              com.liferay.portal.kernel.exception.SystemException {
84          getService().mergeTags(fromTagId, toTagId);
85      }
86  
87      public static com.liferay.portal.kernel.json.JSONArray search(
88          long groupId, java.lang.String name, java.lang.String[] tagProperties,
89          int start, int end)
90          throws com.liferay.portal.kernel.exception.SystemException {
91          return getService().search(groupId, name, tagProperties, start, end);
92      }
93  
94      public static com.liferay.portlet.asset.model.AssetTag updateTag(
95          long tagId, java.lang.String name, java.lang.String[] tagProperties,
96          com.liferay.portal.service.ServiceContext serviceContext)
97          throws com.liferay.portal.kernel.exception.PortalException,
98              com.liferay.portal.kernel.exception.SystemException {
99          return getService().updateTag(tagId, name, tagProperties, serviceContext);
100     }
101 
102     public static AssetTagService getService() {
103         if (_service == null) {
104             _service = (AssetTagService)PortalBeanLocatorUtil.locate(AssetTagService.class.getName());
105         }
106 
107         return _service;
108     }
109 
110     public void setService(AssetTagService service) {
111         _service = service;
112     }
113 
114     private static AssetTagService _service;
115 }