001
014
015 package com.liferay.portlet.asset.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018
019
032 public class AssetCategoryServiceUtil {
033 public static com.liferay.portlet.asset.model.AssetCategory addCategory(
034 long parentCategoryId,
035 java.util.Map<java.util.Locale, java.lang.String> titleMap,
036 long vocabularyId, java.lang.String[] categoryProperties,
037 com.liferay.portal.service.ServiceContext serviceContext)
038 throws com.liferay.portal.kernel.exception.PortalException,
039 com.liferay.portal.kernel.exception.SystemException {
040 return getService()
041 .addCategory(parentCategoryId, titleMap, vocabularyId,
042 categoryProperties, serviceContext);
043 }
044
045 public static void deleteCategory(long categoryId)
046 throws com.liferay.portal.kernel.exception.PortalException,
047 com.liferay.portal.kernel.exception.SystemException {
048 getService().deleteCategory(categoryId);
049 }
050
051 public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getCategories(
052 java.lang.String className, long classPK)
053 throws com.liferay.portal.kernel.exception.PortalException,
054 com.liferay.portal.kernel.exception.SystemException {
055 return getService().getCategories(className, classPK);
056 }
057
058 public static com.liferay.portlet.asset.model.AssetCategory getCategory(
059 long categoryId)
060 throws com.liferay.portal.kernel.exception.PortalException,
061 com.liferay.portal.kernel.exception.SystemException {
062 return getService().getCategory(categoryId);
063 }
064
065 public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getChildCategories(
066 long parentCategoryId, int start, int end,
067 com.liferay.portal.kernel.util.OrderByComparator obc)
068 throws com.liferay.portal.kernel.exception.PortalException,
069 com.liferay.portal.kernel.exception.SystemException {
070 return getService().getChildCategories(parentCategoryId, start, end, obc);
071 }
072
073 public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
074 long vocabularyId, int start, int end,
075 com.liferay.portal.kernel.util.OrderByComparator obc)
076 throws com.liferay.portal.kernel.exception.PortalException,
077 com.liferay.portal.kernel.exception.SystemException {
078 return getService()
079 .getVocabularyCategories(vocabularyId, start, end, obc);
080 }
081
082 public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyRootCategories(
083 long vocabularyId, int start, int end,
084 com.liferay.portal.kernel.util.OrderByComparator obc)
085 throws com.liferay.portal.kernel.exception.PortalException,
086 com.liferay.portal.kernel.exception.SystemException {
087 return getService()
088 .getVocabularyRootCategories(vocabularyId, start, end, obc);
089 }
090
091 public static com.liferay.portal.kernel.json.JSONArray search(
092 long groupId, java.lang.String name,
093 java.lang.String[] categoryProperties, int start, int end)
094 throws com.liferay.portal.kernel.exception.SystemException {
095 return getService().search(groupId, name, categoryProperties, start, end);
096 }
097
098 public static com.liferay.portlet.asset.model.AssetCategory updateCategory(
099 long categoryId, long parentCategoryId,
100 java.util.Map<java.util.Locale, java.lang.String> titleMap,
101 long vocabularyId, java.lang.String[] categoryProperties,
102 com.liferay.portal.service.ServiceContext serviceContext)
103 throws com.liferay.portal.kernel.exception.PortalException,
104 com.liferay.portal.kernel.exception.SystemException {
105 return getService()
106 .updateCategory(categoryId, parentCategoryId, titleMap,
107 vocabularyId, categoryProperties, serviceContext);
108 }
109
110 public static AssetCategoryService getService() {
111 if (_service == null) {
112 _service = (AssetCategoryService)PortalBeanLocatorUtil.locate(AssetCategoryService.class.getName());
113 }
114
115 return _service;
116 }
117
118 public void setService(AssetCategoryService service) {
119 _service = service;
120 }
121
122 private static AssetCategoryService _service;
123 }