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 deleteVocabulary(long vocabularyId)
070 throws com.liferay.portal.kernel.exception.PortalException,
071 com.liferay.portal.kernel.exception.SystemException {
072 getService().deleteVocabulary(vocabularyId);
073 }
074
075 public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getCompanyVocabularies(
076 long companyId)
077 throws com.liferay.portal.kernel.exception.PortalException,
078 com.liferay.portal.kernel.exception.SystemException {
079 return getService().getCompanyVocabularies(companyId);
080 }
081
082 public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupsVocabularies(
083 long[] groupIds)
084 throws com.liferay.portal.kernel.exception.PortalException,
085 com.liferay.portal.kernel.exception.SystemException {
086 return getService().getGroupsVocabularies(groupIds);
087 }
088
089 public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
090 long groupId)
091 throws com.liferay.portal.kernel.exception.PortalException,
092 com.liferay.portal.kernel.exception.SystemException {
093 return getService().getGroupVocabularies(groupId);
094 }
095
096 public static com.liferay.portlet.asset.model.AssetVocabulary getVocabulary(
097 long vocabularyId)
098 throws com.liferay.portal.kernel.exception.PortalException,
099 com.liferay.portal.kernel.exception.SystemException {
100 return getService().getVocabulary(vocabularyId);
101 }
102
103
106 public static com.liferay.portlet.asset.model.AssetVocabulary updateVocabulary(
107 long vocabularyId,
108 java.util.Map<java.util.Locale, java.lang.String> titleMap,
109 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
110 java.lang.String settings,
111 com.liferay.portal.service.ServiceContext serviceContext)
112 throws com.liferay.portal.kernel.exception.PortalException,
113 com.liferay.portal.kernel.exception.SystemException {
114 return getService()
115 .updateVocabulary(vocabularyId, titleMap, descriptionMap,
116 settings, serviceContext);
117 }
118
119 public static com.liferay.portlet.asset.model.AssetVocabulary updateVocabulary(
120 long vocabularyId, java.lang.String title,
121 java.util.Map<java.util.Locale, java.lang.String> titleMap,
122 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
123 java.lang.String settings,
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 .updateVocabulary(vocabularyId, title, titleMap,
129 descriptionMap, settings, serviceContext);
130 }
131
132 public static AssetVocabularyService getService() {
133 if (_service == null) {
134 _service = (AssetVocabularyService)PortalBeanLocatorUtil.locate(AssetVocabularyService.class.getName());
135
136 ReferenceRegistry.registerReference(AssetVocabularyServiceUtil.class,
137 "_service");
138 MethodCache.remove(AssetVocabularyService.class);
139 }
140
141 return _service;
142 }
143
144 public void setService(AssetVocabularyService service) {
145 MethodCache.remove(AssetVocabularyService.class);
146
147 _service = service;
148
149 ReferenceRegistry.registerReference(AssetVocabularyServiceUtil.class,
150 "_service");
151 MethodCache.remove(AssetVocabularyService.class);
152 }
153
154 private static AssetVocabularyService _service;
155 }