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