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, int start, int end,
071 com.liferay.portal.kernel.util.OrderByComparator obc)
072 throws com.liferay.portal.kernel.exception.PortalException,
073 com.liferay.portal.kernel.exception.SystemException {
074 return getService().getChildCategories(parentCategoryId, start, end, obc);
075 }
076
077 public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
078 long vocabularyId, int start, int end,
079 com.liferay.portal.kernel.util.OrderByComparator obc)
080 throws com.liferay.portal.kernel.exception.PortalException,
081 com.liferay.portal.kernel.exception.SystemException {
082 return getService()
083 .getVocabularyCategories(vocabularyId, start, end, obc);
084 }
085
086 public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyRootCategories(
087 long vocabularyId, 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()
092 .getVocabularyRootCategories(vocabularyId, start, end, obc);
093 }
094
095 public static com.liferay.portal.kernel.json.JSONArray search(
096 long groupId, java.lang.String name,
097 java.lang.String[] categoryProperties, int start, int end)
098 throws com.liferay.portal.kernel.exception.SystemException {
099 return getService().search(groupId, name, categoryProperties, start, end);
100 }
101
102 public static com.liferay.portlet.asset.model.AssetCategory updateCategory(
103 long categoryId, long parentCategoryId,
104 java.util.Map<java.util.Locale, java.lang.String> titleMap,
105 long vocabularyId, java.lang.String[] categoryProperties,
106 com.liferay.portal.service.ServiceContext serviceContext)
107 throws com.liferay.portal.kernel.exception.PortalException,
108 com.liferay.portal.kernel.exception.SystemException {
109 return getService()
110 .updateCategory(categoryId, parentCategoryId, titleMap,
111 vocabularyId, categoryProperties, serviceContext);
112 }
113
114 public static AssetCategoryService getService() {
115 if (_service == null) {
116 _service = (AssetCategoryService)PortalBeanLocatorUtil.locate(AssetCategoryService.class.getName());
117 }
118
119 return _service;
120 }
121
122 public void setService(AssetCategoryService service) {
123 _service = service;
124 }
125
126 private static AssetCategoryService _service;
127 }