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 AssetCategoryServiceUtil {
035
040 public static com.liferay.portlet.asset.model.AssetCategory addCategory(
041 long parentCategoryId,
042 java.util.Map<java.util.Locale, java.lang.String> titleMap,
043 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
044 long vocabularyId, java.lang.String[] categoryProperties,
045 com.liferay.portal.service.ServiceContext serviceContext)
046 throws com.liferay.portal.kernel.exception.PortalException,
047 com.liferay.portal.kernel.exception.SystemException {
048 return getService()
049 .addCategory(parentCategoryId, titleMap, descriptionMap,
050 vocabularyId, categoryProperties, serviceContext);
051 }
052
053 public static void deleteCategories(long[] categoryIds)
054 throws com.liferay.portal.kernel.exception.PortalException,
055 com.liferay.portal.kernel.exception.SystemException {
056 getService().deleteCategories(categoryIds);
057 }
058
059 public static void deleteCategory(long categoryId)
060 throws com.liferay.portal.kernel.exception.PortalException,
061 com.liferay.portal.kernel.exception.SystemException {
062 getService().deleteCategory(categoryId);
063 }
064
065 public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getCategories(
066 java.lang.String className, long classPK)
067 throws com.liferay.portal.kernel.exception.PortalException,
068 com.liferay.portal.kernel.exception.SystemException {
069 return getService().getCategories(className, classPK);
070 }
071
072 public static com.liferay.portlet.asset.model.AssetCategory getCategory(
073 long categoryId)
074 throws com.liferay.portal.kernel.exception.PortalException,
075 com.liferay.portal.kernel.exception.SystemException {
076 return getService().getCategory(categoryId);
077 }
078
079 public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getChildCategories(
080 long parentCategoryId)
081 throws com.liferay.portal.kernel.exception.PortalException,
082 com.liferay.portal.kernel.exception.SystemException {
083 return getService().getChildCategories(parentCategoryId);
084 }
085
086 public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getChildCategories(
087 long parentCategoryId, int start, int end,
088 com.liferay.portal.kernel.util.OrderByComparator obc)
089 throws com.liferay.portal.kernel.exception.PortalException,
090 com.liferay.portal.kernel.exception.SystemException {
091 return getService().getChildCategories(parentCategoryId, start, end, obc);
092 }
093
094 public static com.liferay.portal.kernel.json.JSONObject getJSONVocabularyCategories(
095 long groupId, java.lang.String name, long vocabularyId, int start,
096 int end, com.liferay.portal.kernel.util.OrderByComparator obc)
097 throws com.liferay.portal.kernel.exception.PortalException,
098 com.liferay.portal.kernel.exception.SystemException {
099 return getService()
100 .getJSONVocabularyCategories(groupId, name, vocabularyId,
101 start, end, obc);
102 }
103
104 public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
105 long vocabularyId, int start, int end,
106 com.liferay.portal.kernel.util.OrderByComparator obc)
107 throws com.liferay.portal.kernel.exception.PortalException,
108 com.liferay.portal.kernel.exception.SystemException {
109 return getService()
110 .getVocabularyCategories(vocabularyId, start, end, obc);
111 }
112
113 public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
114 long parentCategoryId, long vocabularyId, int start, int end,
115 com.liferay.portal.kernel.util.OrderByComparator obc)
116 throws com.liferay.portal.kernel.exception.PortalException,
117 com.liferay.portal.kernel.exception.SystemException {
118 return getService()
119 .getVocabularyCategories(parentCategoryId, vocabularyId,
120 start, end, obc);
121 }
122
123 public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
124 long groupId, java.lang.String name, long vocabularyId, int start,
125 int end, com.liferay.portal.kernel.util.OrderByComparator obc)
126 throws com.liferay.portal.kernel.exception.SystemException {
127 return getService()
128 .getVocabularyCategories(groupId, name, vocabularyId, start,
129 end, obc);
130 }
131
132 public static int getVocabularyCategoriesCount(long groupId,
133 long vocabularyId)
134 throws com.liferay.portal.kernel.exception.SystemException {
135 return getService().getVocabularyCategoriesCount(groupId, vocabularyId);
136 }
137
138 public static int getVocabularyCategoriesCount(long groupId,
139 java.lang.String name, long vocabularyId)
140 throws com.liferay.portal.kernel.exception.SystemException {
141 return getService()
142 .getVocabularyCategoriesCount(groupId, name, vocabularyId);
143 }
144
145 public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyRootCategories(
146 long vocabularyId, int start, int end,
147 com.liferay.portal.kernel.util.OrderByComparator obc)
148 throws com.liferay.portal.kernel.exception.PortalException,
149 com.liferay.portal.kernel.exception.SystemException {
150 return getService()
151 .getVocabularyRootCategories(vocabularyId, start, end, obc);
152 }
153
154 public static com.liferay.portlet.asset.model.AssetCategory moveCategory(
155 long categoryId, long parentCategoryId, long vocabularyId,
156 com.liferay.portal.service.ServiceContext serviceContext)
157 throws com.liferay.portal.kernel.exception.PortalException,
158 com.liferay.portal.kernel.exception.SystemException {
159 return getService()
160 .moveCategory(categoryId, parentCategoryId, vocabularyId,
161 serviceContext);
162 }
163
164 public static com.liferay.portal.kernel.json.JSONArray search(
165 long groupId, java.lang.String name,
166 java.lang.String[] categoryProperties, int start, int end)
167 throws com.liferay.portal.kernel.exception.PortalException,
168 com.liferay.portal.kernel.exception.SystemException {
169 return getService().search(groupId, name, categoryProperties, start, end);
170 }
171
172 public static com.liferay.portlet.asset.model.AssetCategory updateCategory(
173 long categoryId, long parentCategoryId,
174 java.util.Map<java.util.Locale, java.lang.String> titleMap,
175 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
176 long vocabularyId, java.lang.String[] categoryProperties,
177 com.liferay.portal.service.ServiceContext serviceContext)
178 throws com.liferay.portal.kernel.exception.PortalException,
179 com.liferay.portal.kernel.exception.SystemException {
180 return getService()
181 .updateCategory(categoryId, parentCategoryId, titleMap,
182 descriptionMap, vocabularyId, categoryProperties, serviceContext);
183 }
184
185 public static AssetCategoryService getService() {
186 if (_service == null) {
187 _service = (AssetCategoryService)PortalBeanLocatorUtil.locate(AssetCategoryService.class.getName());
188
189 ReferenceRegistry.registerReference(AssetCategoryServiceUtil.class,
190 "_service");
191 MethodCache.remove(AssetCategoryService.class);
192 }
193
194 return _service;
195 }
196
197 public void setService(AssetCategoryService service) {
198 MethodCache.remove(AssetCategoryService.class);
199
200 _service = service;
201
202 ReferenceRegistry.registerReference(AssetCategoryServiceUtil.class,
203 "_service");
204 MethodCache.remove(AssetCategoryService.class);
205 }
206
207 private static AssetCategoryService _service;
208 }