001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
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    /**
022     * The utility for the asset vocabulary remote service. This utility wraps {@link com.liferay.portlet.asset.service.impl.AssetVocabularyServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
023     *
024     * <p>
025     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see AssetVocabularyService
030     * @see com.liferay.portlet.asset.service.base.AssetVocabularyServiceBaseImpl
031     * @see com.liferay.portlet.asset.service.impl.AssetVocabularyServiceImpl
032     * @generated
033     */
034    public class AssetVocabularyServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.asset.service.impl.AssetVocabularyServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040    
041            /**
042            * @deprecated
043            */
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            /**
104            * @deprecated
105            */
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    }