001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the remote service utility for AssetVocabulary. This utility wraps
024     * {@link com.liferay.portlet.asset.service.impl.AssetVocabularyServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on a remote server. Methods of this service are expected to have security
027     * checks based on the propagated JAAS credentials because this service can be
028     * accessed remotely.
029     *
030     * @author Brian Wing Shun Chan
031     * @see AssetVocabularyService
032     * @see com.liferay.portlet.asset.service.base.AssetVocabularyServiceBaseImpl
033     * @see com.liferay.portlet.asset.service.impl.AssetVocabularyServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class AssetVocabularyServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * 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.
042             */
043            public static com.liferay.portlet.asset.model.AssetVocabulary addVocabulary(
044                    long groupId, java.lang.String title,
045                    com.liferay.portal.service.ServiceContext serviceContext)
046                    throws com.liferay.portal.kernel.exception.PortalException {
047                    return getService().addVocabulary(groupId, title, serviceContext);
048            }
049    
050            public static com.liferay.portlet.asset.model.AssetVocabulary addVocabulary(
051                    long groupId, java.lang.String title,
052                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
053                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
054                    java.lang.String settings,
055                    com.liferay.portal.service.ServiceContext serviceContext)
056                    throws com.liferay.portal.kernel.exception.PortalException {
057                    return getService()
058                                       .addVocabulary(groupId, title, titleMap, descriptionMap,
059                            settings, serviceContext);
060            }
061    
062            /**
063            * @deprecated As of 6.2.0, Replaced by {@link #deleteVocabularies(long[],
064            ServiceContext)}
065            */
066            @Deprecated
067            public static void deleteVocabularies(long[] vocabularyIds)
068                    throws com.liferay.portal.kernel.exception.PortalException {
069                    getService().deleteVocabularies(vocabularyIds);
070            }
071    
072            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> deleteVocabularies(
073                    long[] vocabularyIds,
074                    com.liferay.portal.service.ServiceContext serviceContext)
075                    throws com.liferay.portal.kernel.exception.PortalException {
076                    return getService().deleteVocabularies(vocabularyIds, serviceContext);
077            }
078    
079            public static void deleteVocabulary(long vocabularyId)
080                    throws com.liferay.portal.kernel.exception.PortalException {
081                    getService().deleteVocabulary(vocabularyId);
082            }
083    
084            public static com.liferay.portlet.asset.model.AssetVocabulary fetchVocabulary(
085                    long vocabularyId)
086                    throws com.liferay.portal.kernel.exception.PortalException {
087                    return getService().fetchVocabulary(vocabularyId);
088            }
089    
090            /**
091            * @deprecated As of 7.0.0, with no direct replacement
092            */
093            @Deprecated
094            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getCompanyVocabularies(
095                    long companyId)
096                    throws com.liferay.portal.kernel.exception.PortalException {
097                    return getService().getCompanyVocabularies(companyId);
098            }
099    
100            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
101                    long groupId)
102                    throws com.liferay.portal.kernel.exception.PortalException {
103                    return getService().getGroupVocabularies(groupId);
104            }
105    
106            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
107                    long groupId, boolean createDefaultVocabulary)
108                    throws com.liferay.portal.kernel.exception.PortalException {
109                    return getService()
110                                       .getGroupVocabularies(groupId, createDefaultVocabulary);
111            }
112    
113            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
114                    long groupId, boolean createDefaultVocabulary, int start, int end,
115                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc)
116                    throws com.liferay.portal.kernel.exception.PortalException {
117                    return getService()
118                                       .getGroupVocabularies(groupId, createDefaultVocabulary,
119                            start, end, obc);
120            }
121    
122            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
123                    long groupId, java.lang.String name, int start, int end,
124                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc) {
125                    return getService().getGroupVocabularies(groupId, name, start, end, obc);
126            }
127    
128            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
129                    long groupId, int start, int end,
130                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc) {
131                    return getService().getGroupVocabularies(groupId, start, end, obc);
132            }
133    
134            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
135                    long[] groupIds) {
136                    return getService().getGroupVocabularies(groupIds);
137            }
138    
139            public static int getGroupVocabulariesCount(long groupId) {
140                    return getService().getGroupVocabulariesCount(groupId);
141            }
142    
143            public static int getGroupVocabulariesCount(long groupId,
144                    java.lang.String name) {
145                    return getService().getGroupVocabulariesCount(groupId, name);
146            }
147    
148            public static int getGroupVocabulariesCount(long[] groupIds) {
149                    return getService().getGroupVocabulariesCount(groupIds);
150            }
151    
152            public static com.liferay.portlet.asset.model.AssetVocabularyDisplay getGroupVocabulariesDisplay(
153                    long groupId, java.lang.String name, int start, int end,
154                    boolean addDefaultVocabulary,
155                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc)
156                    throws com.liferay.portal.kernel.exception.PortalException {
157                    return getService()
158                                       .getGroupVocabulariesDisplay(groupId, name, start, end,
159                            addDefaultVocabulary, obc);
160            }
161    
162            public static com.liferay.portlet.asset.model.AssetVocabularyDisplay getGroupVocabulariesDisplay(
163                    long groupId, java.lang.String name, int start, int end,
164                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc)
165                    throws com.liferay.portal.kernel.exception.PortalException {
166                    return getService()
167                                       .getGroupVocabulariesDisplay(groupId, name, start, end, obc);
168            }
169    
170            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupsVocabularies(
171                    long[] groupIds) {
172                    return getService().getGroupsVocabularies(groupIds);
173            }
174    
175            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupsVocabularies(
176                    long[] groupIds, java.lang.String className) {
177                    return getService().getGroupsVocabularies(groupIds, className);
178            }
179    
180            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupsVocabularies(
181                    long[] groupIds, java.lang.String className, long classTypePK) {
182                    return getService()
183                                       .getGroupsVocabularies(groupIds, className, classTypePK);
184            }
185    
186            /**
187            * @deprecated As of 6.2.0, with no direct replacement
188            */
189            @Deprecated
190            public static com.liferay.portal.kernel.json.JSONObject getJSONGroupVocabularies(
191                    long groupId, java.lang.String name, int start, int end,
192                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc)
193                    throws com.liferay.portal.kernel.exception.PortalException {
194                    return getService()
195                                       .getJSONGroupVocabularies(groupId, name, start, end, obc);
196            }
197    
198            /**
199            * Returns the OSGi service identifier.
200            *
201            * @return the OSGi service identifier
202            */
203            public static java.lang.String getOSGiServiceIdentifier() {
204                    return getService().getOSGiServiceIdentifier();
205            }
206    
207            /**
208            * @deprecated As of 7.0.0, replaced by {@link
209            AssetUtil#filterVocabularyIds(PermissionChecker, long[])}
210            */
211            @Deprecated
212            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getVocabularies(
213                    long[] vocabularyIds)
214                    throws com.liferay.portal.kernel.exception.PortalException {
215                    return getService().getVocabularies(vocabularyIds);
216            }
217    
218            public static com.liferay.portlet.asset.model.AssetVocabulary getVocabulary(
219                    long vocabularyId)
220                    throws com.liferay.portal.kernel.exception.PortalException {
221                    return getService().getVocabulary(vocabularyId);
222            }
223    
224            public static com.liferay.portlet.asset.model.AssetVocabularyDisplay searchVocabulariesDisplay(
225                    long groupId, java.lang.String title, boolean addDefaultVocabulary,
226                    int start, int end)
227                    throws com.liferay.portal.kernel.exception.PortalException {
228                    return getService()
229                                       .searchVocabulariesDisplay(groupId, title,
230                            addDefaultVocabulary, start, end);
231            }
232    
233            public static com.liferay.portlet.asset.model.AssetVocabularyDisplay searchVocabulariesDisplay(
234                    long groupId, java.lang.String title, boolean addDefaultVocabulary,
235                    int start, int end, com.liferay.portal.kernel.search.Sort sort)
236                    throws com.liferay.portal.kernel.exception.PortalException {
237                    return getService()
238                                       .searchVocabulariesDisplay(groupId, title,
239                            addDefaultVocabulary, start, end, sort);
240            }
241    
242            public static com.liferay.portlet.asset.model.AssetVocabulary updateVocabulary(
243                    long vocabularyId, java.lang.String title,
244                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
245                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
246                    java.lang.String settings,
247                    com.liferay.portal.service.ServiceContext serviceContext)
248                    throws com.liferay.portal.kernel.exception.PortalException {
249                    return getService()
250                                       .updateVocabulary(vocabularyId, title, titleMap,
251                            descriptionMap, settings, serviceContext);
252            }
253    
254            public static AssetVocabularyService getService() {
255                    if (_service == null) {
256                            _service = (AssetVocabularyService)PortalBeanLocatorUtil.locate(AssetVocabularyService.class.getName());
257    
258                            ReferenceRegistry.registerReference(AssetVocabularyServiceUtil.class,
259                                    "_service");
260                    }
261    
262                    return _service;
263            }
264    
265            private static AssetVocabularyService _service;
266    }