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 AssetVocabularyServiceUtil {
035
040
041
044 public static com.liferay.portlet.asset.model.AssetVocabulary addVocabulary(
045 java.util.Map<java.util.Locale, java.lang.String> titleMap,
046 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
047 java.lang.String settings,
048 com.liferay.portal.service.ServiceContext serviceContext)
049 throws com.liferay.portal.kernel.exception.PortalException,
050 com.liferay.portal.kernel.exception.SystemException {
051 return getService()
052 .addVocabulary(titleMap, descriptionMap, settings,
053 serviceContext);
054 }
055
056 public static com.liferay.portlet.asset.model.AssetVocabulary addVocabulary(
057 java.lang.String title,
058 java.util.Map<java.util.Locale, java.lang.String> titleMap,
059 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
060 java.lang.String settings,
061 com.liferay.portal.service.ServiceContext serviceContext)
062 throws com.liferay.portal.kernel.exception.PortalException,
063 com.liferay.portal.kernel.exception.SystemException {
064 return getService()
065 .addVocabulary(title, titleMap, descriptionMap, settings,
066 serviceContext);
067 }
068
069 public static void deleteVocabularies(long[] vocabularyIds)
070 throws com.liferay.portal.kernel.exception.PortalException,
071 com.liferay.portal.kernel.exception.SystemException {
072 getService().deleteVocabularies(vocabularyIds);
073 }
074
075 public static void deleteVocabulary(long vocabularyId)
076 throws com.liferay.portal.kernel.exception.PortalException,
077 com.liferay.portal.kernel.exception.SystemException {
078 getService().deleteVocabulary(vocabularyId);
079 }
080
081 public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getCompanyVocabularies(
082 long companyId)
083 throws com.liferay.portal.kernel.exception.PortalException,
084 com.liferay.portal.kernel.exception.SystemException {
085 return getService().getCompanyVocabularies(companyId);
086 }
087
088 public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupsVocabularies(
089 long[] groupIds)
090 throws com.liferay.portal.kernel.exception.PortalException,
091 com.liferay.portal.kernel.exception.SystemException {
092 return getService().getGroupsVocabularies(groupIds);
093 }
094
095 public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupsVocabularies(
096 long[] groupIds, java.lang.String className)
097 throws com.liferay.portal.kernel.exception.PortalException,
098 com.liferay.portal.kernel.exception.SystemException {
099 return getService().getGroupsVocabularies(groupIds, className);
100 }
101
102 public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
103 long groupId)
104 throws com.liferay.portal.kernel.exception.PortalException,
105 com.liferay.portal.kernel.exception.SystemException {
106 return getService().getGroupVocabularies(groupId);
107 }
108
109 public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
110 long groupId, int start, int end,
111 com.liferay.portal.kernel.util.OrderByComparator obc)
112 throws com.liferay.portal.kernel.exception.SystemException {
113 return getService().getGroupVocabularies(groupId, start, end, obc);
114 }
115
116 public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
117 long groupId, java.lang.String name, int start, int end,
118 com.liferay.portal.kernel.util.OrderByComparator obc)
119 throws com.liferay.portal.kernel.exception.SystemException {
120 return getService().getGroupVocabularies(groupId, name, start, end, obc);
121 }
122
123 public static int getGroupVocabulariesCount(long groupId)
124 throws com.liferay.portal.kernel.exception.SystemException {
125 return getService().getGroupVocabulariesCount(groupId);
126 }
127
128 public static int getGroupVocabulariesCount(long groupId,
129 java.lang.String name)
130 throws com.liferay.portal.kernel.exception.SystemException {
131 return getService().getGroupVocabulariesCount(groupId, name);
132 }
133
134 public static com.liferay.portal.kernel.json.JSONObject getJSONGroupVocabularies(
135 long groupId, java.lang.String name, int start, int end,
136 com.liferay.portal.kernel.util.OrderByComparator obc)
137 throws com.liferay.portal.kernel.exception.PortalException,
138 com.liferay.portal.kernel.exception.SystemException {
139 return getService()
140 .getJSONGroupVocabularies(groupId, name, start, end, obc);
141 }
142
143 public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getVocabularies(
144 long[] vocabularyIds)
145 throws com.liferay.portal.kernel.exception.PortalException,
146 com.liferay.portal.kernel.exception.SystemException {
147 return getService().getVocabularies(vocabularyIds);
148 }
149
150 public static com.liferay.portlet.asset.model.AssetVocabulary getVocabulary(
151 long vocabularyId)
152 throws com.liferay.portal.kernel.exception.PortalException,
153 com.liferay.portal.kernel.exception.SystemException {
154 return getService().getVocabulary(vocabularyId);
155 }
156
157
160 public static com.liferay.portlet.asset.model.AssetVocabulary updateVocabulary(
161 long vocabularyId,
162 java.util.Map<java.util.Locale, java.lang.String> titleMap,
163 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
164 java.lang.String settings,
165 com.liferay.portal.service.ServiceContext serviceContext)
166 throws com.liferay.portal.kernel.exception.PortalException,
167 com.liferay.portal.kernel.exception.SystemException {
168 return getService()
169 .updateVocabulary(vocabularyId, titleMap, descriptionMap,
170 settings, serviceContext);
171 }
172
173 public static com.liferay.portlet.asset.model.AssetVocabulary updateVocabulary(
174 long vocabularyId, java.lang.String title,
175 java.util.Map<java.util.Locale, java.lang.String> titleMap,
176 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
177 java.lang.String settings,
178 com.liferay.portal.service.ServiceContext serviceContext)
179 throws com.liferay.portal.kernel.exception.PortalException,
180 com.liferay.portal.kernel.exception.SystemException {
181 return getService()
182 .updateVocabulary(vocabularyId, title, titleMap,
183 descriptionMap, settings, serviceContext);
184 }
185
186 public static AssetVocabularyService getService() {
187 if (_service == null) {
188 _service = (AssetVocabularyService)PortalBeanLocatorUtil.locate(AssetVocabularyService.class.getName());
189
190 ReferenceRegistry.registerReference(AssetVocabularyServiceUtil.class,
191 "_service");
192 MethodCache.remove(AssetVocabularyService.class);
193 }
194
195 return _service;
196 }
197
198 public void setService(AssetVocabularyService service) {
199 MethodCache.remove(AssetVocabularyService.class);
200
201 _service = service;
202
203 ReferenceRegistry.registerReference(AssetVocabularyServiceUtil.class,
204 "_service");
205 MethodCache.remove(AssetVocabularyService.class);
206 }
207
208 private static AssetVocabularyService _service;
209 }