001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
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 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            /**
158            * @deprecated
159            */
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    }