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, java.lang.String name,
125 java.lang.String[] tagProperties)
126 throws com.liferay.portal.kernel.exception.SystemException {
127 return getService().getTagsCount(groupId, name, tagProperties);
128 }
129
130
133 public static void mergeTags(long fromTagId, long toTagId)
134 throws com.liferay.portal.kernel.exception.PortalException,
135 com.liferay.portal.kernel.exception.SystemException {
136 getService().mergeTags(fromTagId, toTagId);
137 }
138
139 public static void mergeTags(long fromTagId, long toTagId,
140 boolean overrideProperties)
141 throws com.liferay.portal.kernel.exception.PortalException,
142 com.liferay.portal.kernel.exception.SystemException {
143 getService().mergeTags(fromTagId, toTagId, overrideProperties);
144 }
145
146 public static void mergeTags(long[] fromTagIds, long toTagId,
147 boolean overrideProperties)
148 throws com.liferay.portal.kernel.exception.PortalException,
149 com.liferay.portal.kernel.exception.SystemException {
150 getService().mergeTags(fromTagIds, toTagId, overrideProperties);
151 }
152
153 public static com.liferay.portal.kernel.json.JSONArray search(
154 long groupId, java.lang.String name, java.lang.String[] tagProperties,
155 int start, int end)
156 throws com.liferay.portal.kernel.exception.SystemException {
157 return getService().search(groupId, name, tagProperties, start, end);
158 }
159
160 public static com.liferay.portlet.asset.model.AssetTag updateTag(
161 long tagId, java.lang.String name, java.lang.String[] tagProperties,
162 com.liferay.portal.service.ServiceContext serviceContext)
163 throws com.liferay.portal.kernel.exception.PortalException,
164 com.liferay.portal.kernel.exception.SystemException {
165 return getService().updateTag(tagId, name, tagProperties, serviceContext);
166 }
167
168 public static AssetTagService getService() {
169 if (_service == null) {
170 _service = (AssetTagService)PortalBeanLocatorUtil.locate(AssetTagService.class.getName());
171
172 ReferenceRegistry.registerReference(AssetTagServiceUtil.class,
173 "_service");
174 MethodCache.remove(AssetTagService.class);
175 }
176
177 return _service;
178 }
179
180 public void setService(AssetTagService service) {
181 MethodCache.remove(AssetTagService.class);
182
183 _service = service;
184
185 ReferenceRegistry.registerReference(AssetTagServiceUtil.class,
186 "_service");
187 MethodCache.remove(AssetTagService.class);
188 }
189
190 private static AssetTagService _service;
191 }