001
014
015 package com.liferay.portlet.asset.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.MethodCache;
019 import com.liferay.portal.kernel.util.ReferenceRegistry;
020
021
034 public class AssetTagServiceUtil {
035
040 public static com.liferay.portlet.asset.model.AssetTag addTag(
041 java.lang.String name, java.lang.String[] tagProperties,
042 com.liferay.portal.service.ServiceContext serviceContext)
043 throws com.liferay.portal.kernel.exception.PortalException,
044 com.liferay.portal.kernel.exception.SystemException {
045 return getService().addTag(name, tagProperties, serviceContext);
046 }
047
048 public static void deleteTag(long tagId)
049 throws com.liferay.portal.kernel.exception.PortalException,
050 com.liferay.portal.kernel.exception.SystemException {
051 getService().deleteTag(tagId);
052 }
053
054 public static void deleteTags(long[] tagIds)
055 throws com.liferay.portal.kernel.exception.PortalException,
056 com.liferay.portal.kernel.exception.SystemException {
057 getService().deleteTags(tagIds);
058 }
059
060 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getGroupsTags(
061 long[] groupIds)
062 throws com.liferay.portal.kernel.exception.SystemException {
063 return getService().getGroupsTags(groupIds);
064 }
065
066 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getGroupTags(
067 long groupId)
068 throws com.liferay.portal.kernel.exception.SystemException {
069 return getService().getGroupTags(groupId);
070 }
071
072 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getGroupTags(
073 long groupId, int start, int end,
074 com.liferay.portal.kernel.util.OrderByComparator obc)
075 throws com.liferay.portal.kernel.exception.SystemException {
076 return getService().getGroupTags(groupId, start, end, obc);
077 }
078
079 public static int getGroupTagsCount(long groupId)
080 throws com.liferay.portal.kernel.exception.SystemException {
081 return getService().getGroupTagsCount(groupId);
082 }
083
084 public static com.liferay.portal.kernel.json.JSONObject getJSONGroupTags(
085 long groupId, java.lang.String name, int start, int end)
086 throws com.liferay.portal.kernel.exception.PortalException,
087 com.liferay.portal.kernel.exception.SystemException {
088 return getService().getJSONGroupTags(groupId, name, start, end);
089 }
090
091 public static com.liferay.portlet.asset.model.AssetTag getTag(long tagId)
092 throws com.liferay.portal.kernel.exception.PortalException,
093 com.liferay.portal.kernel.exception.SystemException {
094 return getService().getTag(tagId);
095 }
096
097 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
098 long groupId, long classNameId, java.lang.String name)
099 throws com.liferay.portal.kernel.exception.SystemException {
100 return getService().getTags(groupId, classNameId, name);
101 }
102
103 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
104 long groupId, long classNameId, java.lang.String name, int start,
105 int end, com.liferay.portal.kernel.util.OrderByComparator obc)
106 throws com.liferay.portal.kernel.exception.SystemException {
107 return getService().getTags(groupId, classNameId, name, start, end, obc);
108 }
109
110 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
111 long groupId, java.lang.String name, java.lang.String[] tagProperties,
112 int start, int end)
113 throws com.liferay.portal.kernel.exception.SystemException {
114 return getService().getTags(groupId, name, tagProperties, start, end);
115 }
116
117 public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
118 java.lang.String className, long classPK)
119 throws com.liferay.portal.kernel.exception.PortalException,
120 com.liferay.portal.kernel.exception.SystemException {
121 return getService().getTags(className, classPK);
122 }
123
124 public static int getTagsCount(long groupId, long classNameId,
125 java.lang.String name)
126 throws com.liferay.portal.kernel.exception.SystemException {
127 return getService().getTagsCount(groupId, classNameId, name);
128 }
129
130 public static int getTagsCount(long groupId, java.lang.String name)
131 throws com.liferay.portal.kernel.exception.SystemException {
132 return getService().getTagsCount(groupId, name);
133 }
134
135 public static int getTagsCount(long groupId, java.lang.String name,
136 java.lang.String[] tagProperties)
137 throws com.liferay.portal.kernel.exception.SystemException {
138 return getService().getTagsCount(groupId, name, tagProperties);
139 }
140
141 public static void mergeTags(long fromTagId, long toTagId,
142 boolean overrideProperties)
143 throws com.liferay.portal.kernel.exception.PortalException,
144 com.liferay.portal.kernel.exception.SystemException {
145 getService().mergeTags(fromTagId, toTagId, overrideProperties);
146 }
147
148 public static void mergeTags(long[] fromTagIds, long toTagId,
149 boolean overrideProperties)
150 throws com.liferay.portal.kernel.exception.PortalException,
151 com.liferay.portal.kernel.exception.SystemException {
152 getService().mergeTags(fromTagIds, toTagId, overrideProperties);
153 }
154
155 public static com.liferay.portal.kernel.json.JSONArray search(
156 long groupId, java.lang.String name, java.lang.String[] tagProperties,
157 int start, int end)
158 throws com.liferay.portal.kernel.exception.SystemException {
159 return getService().search(groupId, name, tagProperties, start, end);
160 }
161
162 public static com.liferay.portlet.asset.model.AssetTag updateTag(
163 long tagId, java.lang.String name, java.lang.String[] tagProperties,
164 com.liferay.portal.service.ServiceContext serviceContext)
165 throws com.liferay.portal.kernel.exception.PortalException,
166 com.liferay.portal.kernel.exception.SystemException {
167 return getService().updateTag(tagId, name, tagProperties, serviceContext);
168 }
169
170 public static AssetTagService getService() {
171 if (_service == null) {
172 _service = (AssetTagService)PortalBeanLocatorUtil.locate(AssetTagService.class.getName());
173
174 ReferenceRegistry.registerReference(AssetTagServiceUtil.class,
175 "_service");
176 MethodCache.remove(AssetTagService.class);
177 }
178
179 return _service;
180 }
181
182 public void setService(AssetTagService service) {
183 MethodCache.remove(AssetTagService.class);
184
185 _service = service;
186
187 ReferenceRegistry.registerReference(AssetTagServiceUtil.class,
188 "_service");
189 MethodCache.remove(AssetTagService.class);
190 }
191
192 private static AssetTagService _service;
193 }