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.JSONArray getJSONSearch(
095 long groupId, java.lang.String keywords, 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 .getJSONSearch(groupId, keywords, vocabularyId, start, end,
101 obc);
102 }
103
104 public static com.liferay.portal.kernel.json.JSONObject getJSONVocabularyCategories(
105 long groupId, java.lang.String name, long vocabularyId, int start,
106 int end, 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 .getJSONVocabularyCategories(groupId, name, vocabularyId,
111 start, end, obc);
112 }
113
114 public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
115 long vocabularyId, int start, int end,
116 com.liferay.portal.kernel.util.OrderByComparator obc)
117 throws com.liferay.portal.kernel.exception.PortalException,
118 com.liferay.portal.kernel.exception.SystemException {
119 return getService()
120 .getVocabularyCategories(vocabularyId, start, end, obc);
121 }
122
123 public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
124 long parentCategoryId, long vocabularyId, int start, int end,
125 com.liferay.portal.kernel.util.OrderByComparator obc)
126 throws com.liferay.portal.kernel.exception.PortalException,
127 com.liferay.portal.kernel.exception.SystemException {
128 return getService()
129 .getVocabularyCategories(parentCategoryId, vocabularyId,
130 start, end, obc);
131 }
132
133 public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyCategories(
134 long groupId, java.lang.String name, long vocabularyId, int start,
135 int end, com.liferay.portal.kernel.util.OrderByComparator obc)
136 throws com.liferay.portal.kernel.exception.SystemException {
137 return getService()
138 .getVocabularyCategories(groupId, name, vocabularyId, start,
139 end, obc);
140 }
141
142 public static int getVocabularyCategoriesCount(long groupId,
143 long vocabularyId)
144 throws com.liferay.portal.kernel.exception.SystemException {
145 return getService().getVocabularyCategoriesCount(groupId, vocabularyId);
146 }
147
148 public static int getVocabularyCategoriesCount(long groupId,
149 java.lang.String name, long vocabularyId)
150 throws com.liferay.portal.kernel.exception.SystemException {
151 return getService()
152 .getVocabularyCategoriesCount(groupId, name, vocabularyId);
153 }
154
155 public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> getVocabularyRootCategories(
156 long vocabularyId, int start, int end,
157 com.liferay.portal.kernel.util.OrderByComparator obc)
158 throws com.liferay.portal.kernel.exception.PortalException,
159 com.liferay.portal.kernel.exception.SystemException {
160 return getService()
161 .getVocabularyRootCategories(vocabularyId, start, end, obc);
162 }
163
164 public static com.liferay.portlet.asset.model.AssetCategory moveCategory(
165 long categoryId, long parentCategoryId, long vocabularyId,
166 com.liferay.portal.service.ServiceContext serviceContext)
167 throws com.liferay.portal.kernel.exception.PortalException,
168 com.liferay.portal.kernel.exception.SystemException {
169 return getService()
170 .moveCategory(categoryId, parentCategoryId, vocabularyId,
171 serviceContext);
172 }
173
174 public static java.util.List<com.liferay.portlet.asset.model.AssetCategory> search(
175 long groupId, java.lang.String keywords, long vocabularyId, int start,
176 int end, com.liferay.portal.kernel.util.OrderByComparator obc)
177 throws com.liferay.portal.kernel.exception.PortalException,
178 com.liferay.portal.kernel.exception.SystemException {
179 return getService()
180 .search(groupId, keywords, vocabularyId, start, end, obc);
181 }
182
183 public static com.liferay.portal.kernel.json.JSONArray search(
184 long groupId, java.lang.String name,
185 java.lang.String[] categoryProperties, int start, int end)
186 throws com.liferay.portal.kernel.exception.PortalException,
187 com.liferay.portal.kernel.exception.SystemException {
188 return getService().search(groupId, name, categoryProperties, start, end);
189 }
190
191 public static com.liferay.portlet.asset.model.AssetCategory updateCategory(
192 long categoryId, long parentCategoryId,
193 java.util.Map<java.util.Locale, java.lang.String> titleMap,
194 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
195 long vocabularyId, java.lang.String[] categoryProperties,
196 com.liferay.portal.service.ServiceContext serviceContext)
197 throws com.liferay.portal.kernel.exception.PortalException,
198 com.liferay.portal.kernel.exception.SystemException {
199 return getService()
200 .updateCategory(categoryId, parentCategoryId, titleMap,
201 descriptionMap, vocabularyId, categoryProperties, serviceContext);
202 }
203
204 public static AssetCategoryService getService() {
205 if (_service == null) {
206 _service = (AssetCategoryService)PortalBeanLocatorUtil.locate(AssetCategoryService.class.getName());
207
208 ReferenceRegistry.registerReference(AssetCategoryServiceUtil.class,
209 "_service");
210 MethodCache.remove(AssetCategoryService.class);
211 }
212
213 return _service;
214 }
215
216 public void setService(AssetCategoryService service) {
217 MethodCache.remove(AssetCategoryService.class);
218
219 _service = service;
220
221 ReferenceRegistry.registerReference(AssetCategoryServiceUtil.class,
222 "_service");
223 MethodCache.remove(AssetCategoryService.class);
224 }
225
226 private static AssetCategoryService _service;
227 }