001
014
015 package com.liferay.asset.kernel.service;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020 import com.liferay.portal.kernel.util.ReferenceRegistry;
021
022
036 @ProviderType
037 public class AssetCategoryServiceUtil {
038
043 public static com.liferay.asset.kernel.model.AssetCategory addCategory(
044 long groupId, long parentCategoryId,
045 java.util.Map<java.util.Locale, java.lang.String> titleMap,
046 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
047 long vocabularyId, java.lang.String[] categoryProperties,
048 com.liferay.portal.kernel.service.ServiceContext serviceContext)
049 throws com.liferay.portal.kernel.exception.PortalException {
050 return getService()
051 .addCategory(groupId, parentCategoryId, titleMap,
052 descriptionMap, vocabularyId, categoryProperties, serviceContext);
053 }
054
055 public static com.liferay.asset.kernel.model.AssetCategory addCategory(
056 long groupId, java.lang.String title, long vocabularyId,
057 com.liferay.portal.kernel.service.ServiceContext serviceContext)
058 throws com.liferay.portal.kernel.exception.PortalException {
059 return getService()
060 .addCategory(groupId, title, vocabularyId, serviceContext);
061 }
062
063 public static void deleteCategories(long[] categoryIds)
064 throws com.liferay.portal.kernel.exception.PortalException {
065 getService().deleteCategories(categoryIds);
066 }
067
068
071 @Deprecated
072 public static java.util.List<com.liferay.asset.kernel.model.AssetCategory> deleteCategories(
073 long[] categoryIds,
074 com.liferay.portal.kernel.service.ServiceContext serviceContext)
075 throws com.liferay.portal.kernel.exception.PortalException {
076 return getService().deleteCategories(categoryIds, serviceContext);
077 }
078
079 public static void deleteCategory(long categoryId)
080 throws com.liferay.portal.kernel.exception.PortalException {
081 getService().deleteCategory(categoryId);
082 }
083
084 public static com.liferay.asset.kernel.model.AssetCategory fetchCategory(
085 long categoryId)
086 throws com.liferay.portal.kernel.exception.PortalException {
087 return getService().fetchCategory(categoryId);
088 }
089
090 public static java.util.List<com.liferay.asset.kernel.model.AssetCategory> getCategories(
091 java.lang.String className, long classPK)
092 throws com.liferay.portal.kernel.exception.PortalException {
093 return getService().getCategories(className, classPK);
094 }
095
096 public static com.liferay.asset.kernel.model.AssetCategory getCategory(
097 long categoryId)
098 throws com.liferay.portal.kernel.exception.PortalException {
099 return getService().getCategory(categoryId);
100 }
101
102 public static java.lang.String getCategoryPath(long categoryId)
103 throws com.liferay.portal.kernel.exception.PortalException {
104 return getService().getCategoryPath(categoryId);
105 }
106
107 public static java.util.List<com.liferay.asset.kernel.model.AssetCategory> getChildCategories(
108 long parentCategoryId)
109 throws com.liferay.portal.kernel.exception.PortalException {
110 return getService().getChildCategories(parentCategoryId);
111 }
112
113 public static java.util.List<com.liferay.asset.kernel.model.AssetCategory> getChildCategories(
114 long parentCategoryId, int start, int end,
115 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> obc)
116 throws com.liferay.portal.kernel.exception.PortalException {
117 return getService().getChildCategories(parentCategoryId, start, end, obc);
118 }
119
120
125 public static java.lang.String getOSGiServiceIdentifier() {
126 return getService().getOSGiServiceIdentifier();
127 }
128
129 public static java.util.List<com.liferay.asset.kernel.model.AssetCategory> getVocabularyCategories(
130 long groupId, java.lang.String name, long vocabularyId, int start,
131 int end,
132 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> obc) {
133 return getService()
134 .getVocabularyCategories(groupId, name, vocabularyId, start,
135 end, obc);
136 }
137
138 public static java.util.List<com.liferay.asset.kernel.model.AssetCategory> getVocabularyCategories(
139 long groupId, long parentCategoryId, long vocabularyId, int start,
140 int end,
141 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> obc) {
142 return getService()
143 .getVocabularyCategories(groupId, parentCategoryId,
144 vocabularyId, start, end, obc);
145 }
146
147 public static java.util.List<com.liferay.asset.kernel.model.AssetCategory> getVocabularyCategories(
148 long parentCategoryId, long vocabularyId, int start, int end,
149 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> obc)
150 throws com.liferay.portal.kernel.exception.PortalException {
151 return getService()
152 .getVocabularyCategories(parentCategoryId, vocabularyId,
153 start, end, obc);
154 }
155
156 public static java.util.List<com.liferay.asset.kernel.model.AssetCategory> getVocabularyCategories(
157 long vocabularyId, int start, int end,
158 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> obc)
159 throws com.liferay.portal.kernel.exception.PortalException {
160 return getService()
161 .getVocabularyCategories(vocabularyId, start, end, obc);
162 }
163
164 public static int getVocabularyCategoriesCount(long groupId,
165 java.lang.String name, long vocabularyId) {
166 return getService()
167 .getVocabularyCategoriesCount(groupId, name, vocabularyId);
168 }
169
170 public static int getVocabularyCategoriesCount(long groupId,
171 long parentCategory, long vocabularyId) {
172 return getService()
173 .getVocabularyCategoriesCount(groupId, parentCategory,
174 vocabularyId);
175 }
176
177 public static int getVocabularyCategoriesCount(long groupId,
178 long vocabularyId) {
179 return getService().getVocabularyCategoriesCount(groupId, vocabularyId);
180 }
181
182 public static com.liferay.asset.kernel.model.AssetCategoryDisplay getVocabularyCategoriesDisplay(
183 long groupId, java.lang.String name, long vocabularyId, int start,
184 int end,
185 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> obc)
186 throws com.liferay.portal.kernel.exception.PortalException {
187 return getService()
188 .getVocabularyCategoriesDisplay(groupId, name, vocabularyId,
189 start, end, obc);
190 }
191
192 public static com.liferay.asset.kernel.model.AssetCategoryDisplay getVocabularyCategoriesDisplay(
193 long vocabularyId, int start, int end,
194 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> obc)
195 throws com.liferay.portal.kernel.exception.PortalException {
196 return getService()
197 .getVocabularyCategoriesDisplay(vocabularyId, start, end, obc);
198 }
199
200 public static java.util.List<com.liferay.asset.kernel.model.AssetCategory> getVocabularyRootCategories(
201 long groupId, long vocabularyId, int start, int end,
202 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> obc) {
203 return getService()
204 .getVocabularyRootCategories(groupId, vocabularyId, start,
205 end, obc);
206 }
207
208 public static int getVocabularyRootCategoriesCount(long groupId,
209 long vocabularyId) {
210 return getService()
211 .getVocabularyRootCategoriesCount(groupId, vocabularyId);
212 }
213
214 public static com.liferay.asset.kernel.model.AssetCategory moveCategory(
215 long categoryId, long parentCategoryId, long vocabularyId,
216 com.liferay.portal.kernel.service.ServiceContext serviceContext)
217 throws com.liferay.portal.kernel.exception.PortalException {
218 return getService()
219 .moveCategory(categoryId, parentCategoryId, vocabularyId,
220 serviceContext);
221 }
222
223 public static java.util.List<com.liferay.asset.kernel.model.AssetCategory> search(
224 long groupId, java.lang.String keywords, long vocabularyId, int start,
225 int end,
226 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.asset.kernel.model.AssetCategory> obc) {
227 return getService()
228 .search(groupId, keywords, vocabularyId, start, end, obc);
229 }
230
231 public static com.liferay.portal.kernel.json.JSONArray search(
232 long groupId, java.lang.String name,
233 java.lang.String[] categoryProperties, int start, int end)
234 throws com.liferay.portal.kernel.exception.PortalException {
235 return getService().search(groupId, name, categoryProperties, start, end);
236 }
237
238 public static com.liferay.portal.kernel.json.JSONArray search(
239 long[] groupIds, java.lang.String name, long[] vocabularyIds,
240 int start, int end)
241 throws com.liferay.portal.kernel.exception.PortalException {
242 return getService().search(groupIds, name, vocabularyIds, start, end);
243 }
244
245 public static com.liferay.asset.kernel.model.AssetCategoryDisplay searchCategoriesDisplay(
246 long groupId, java.lang.String title, long parentCategoryId,
247 long vocabularyId, int start, int end)
248 throws com.liferay.portal.kernel.exception.PortalException {
249 return getService()
250 .searchCategoriesDisplay(groupId, title, parentCategoryId,
251 vocabularyId, start, end);
252 }
253
254 public static com.liferay.asset.kernel.model.AssetCategoryDisplay searchCategoriesDisplay(
255 long groupId, java.lang.String title, long vocabularyId,
256 long parentCategoryId, int start, int end,
257 com.liferay.portal.kernel.search.Sort sort)
258 throws com.liferay.portal.kernel.exception.PortalException {
259 return getService()
260 .searchCategoriesDisplay(groupId, title, vocabularyId,
261 parentCategoryId, start, end, sort);
262 }
263
264 public static com.liferay.asset.kernel.model.AssetCategoryDisplay searchCategoriesDisplay(
265 long groupId, java.lang.String title, long vocabularyId, int start,
266 int end) throws com.liferay.portal.kernel.exception.PortalException {
267 return getService()
268 .searchCategoriesDisplay(groupId, title, vocabularyId,
269 start, end);
270 }
271
272 public static com.liferay.asset.kernel.model.AssetCategoryDisplay searchCategoriesDisplay(
273 long[] groupIds, java.lang.String title, long[] parentCategoryIds,
274 long[] vocabularyIds, int start, int end)
275 throws com.liferay.portal.kernel.exception.PortalException {
276 return getService()
277 .searchCategoriesDisplay(groupIds, title, parentCategoryIds,
278 vocabularyIds, start, end);
279 }
280
281 public static com.liferay.asset.kernel.model.AssetCategoryDisplay searchCategoriesDisplay(
282 long[] groupIds, java.lang.String title, long[] vocabularyIds,
283 long[] parentCategoryIds, int start, int end,
284 com.liferay.portal.kernel.search.Sort sort)
285 throws com.liferay.portal.kernel.exception.PortalException {
286 return getService()
287 .searchCategoriesDisplay(groupIds, title, vocabularyIds,
288 parentCategoryIds, start, end, sort);
289 }
290
291 public static com.liferay.asset.kernel.model.AssetCategoryDisplay searchCategoriesDisplay(
292 long[] groupIds, java.lang.String title, long[] vocabularyIds,
293 int start, int end)
294 throws com.liferay.portal.kernel.exception.PortalException {
295 return getService()
296 .searchCategoriesDisplay(groupIds, title, vocabularyIds,
297 start, end);
298 }
299
300 public static com.liferay.asset.kernel.model.AssetCategory updateCategory(
301 long categoryId, long parentCategoryId,
302 java.util.Map<java.util.Locale, java.lang.String> titleMap,
303 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
304 long vocabularyId, java.lang.String[] categoryProperties,
305 com.liferay.portal.kernel.service.ServiceContext serviceContext)
306 throws com.liferay.portal.kernel.exception.PortalException {
307 return getService()
308 .updateCategory(categoryId, parentCategoryId, titleMap,
309 descriptionMap, vocabularyId, categoryProperties, serviceContext);
310 }
311
312 public static AssetCategoryService getService() {
313 if (_service == null) {
314 _service = (AssetCategoryService)PortalBeanLocatorUtil.locate(AssetCategoryService.class.getName());
315
316 ReferenceRegistry.registerReference(AssetCategoryServiceUtil.class,
317 "_service");
318 }
319
320 return _service;
321 }
322
323 private static AssetCategoryService _service;
324 }