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 local service utility for AssetVocabulary. This utility wraps
024     * {@link com.liferay.portlet.asset.service.impl.AssetVocabularyLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see AssetVocabularyLocalService
032     * @see com.liferay.portlet.asset.service.base.AssetVocabularyLocalServiceBaseImpl
033     * @see com.liferay.portlet.asset.service.impl.AssetVocabularyLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class AssetVocabularyLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.asset.service.impl.AssetVocabularyLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the asset vocabulary to the database. Also notifies the appropriate model listeners.
046            *
047            * @param assetVocabulary the asset vocabulary
048            * @return the asset vocabulary that was added
049            */
050            public static com.liferay.portlet.asset.model.AssetVocabulary addAssetVocabulary(
051                    com.liferay.portlet.asset.model.AssetVocabulary assetVocabulary) {
052                    return getService().addAssetVocabulary(assetVocabulary);
053            }
054    
055            public static com.liferay.portlet.asset.model.AssetVocabulary addDefaultVocabulary(
056                    long groupId)
057                    throws com.liferay.portal.kernel.exception.PortalException {
058                    return getService().addDefaultVocabulary(groupId);
059            }
060    
061            public static com.liferay.portlet.asset.model.AssetVocabulary addVocabulary(
062                    long userId, long groupId, java.lang.String title,
063                    com.liferay.portal.service.ServiceContext serviceContext)
064                    throws com.liferay.portal.kernel.exception.PortalException {
065                    return getService().addVocabulary(userId, groupId, title, serviceContext);
066            }
067    
068            public static com.liferay.portlet.asset.model.AssetVocabulary addVocabulary(
069                    long userId, long groupId, java.lang.String title,
070                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
071                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
072                    java.lang.String settings,
073                    com.liferay.portal.service.ServiceContext serviceContext)
074                    throws com.liferay.portal.kernel.exception.PortalException {
075                    return getService()
076                                       .addVocabulary(userId, groupId, title, titleMap,
077                            descriptionMap, settings, serviceContext);
078            }
079    
080            public static void addVocabularyResources(
081                    com.liferay.portlet.asset.model.AssetVocabulary vocabulary,
082                    boolean addGroupPermissions, boolean addGuestPermissions)
083                    throws com.liferay.portal.kernel.exception.PortalException {
084                    getService()
085                            .addVocabularyResources(vocabulary, addGroupPermissions,
086                            addGuestPermissions);
087            }
088    
089            public static void addVocabularyResources(
090                    com.liferay.portlet.asset.model.AssetVocabulary vocabulary,
091                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
092                    throws com.liferay.portal.kernel.exception.PortalException {
093                    getService()
094                            .addVocabularyResources(vocabulary, groupPermissions,
095                            guestPermissions);
096            }
097    
098            /**
099            * Creates a new asset vocabulary with the primary key. Does not add the asset vocabulary to the database.
100            *
101            * @param vocabularyId the primary key for the new asset vocabulary
102            * @return the new asset vocabulary
103            */
104            public static com.liferay.portlet.asset.model.AssetVocabulary createAssetVocabulary(
105                    long vocabularyId) {
106                    return getService().createAssetVocabulary(vocabularyId);
107            }
108    
109            /**
110            * Deletes the asset vocabulary from the database. Also notifies the appropriate model listeners.
111            *
112            * @param assetVocabulary the asset vocabulary
113            * @return the asset vocabulary that was removed
114            */
115            public static com.liferay.portlet.asset.model.AssetVocabulary deleteAssetVocabulary(
116                    com.liferay.portlet.asset.model.AssetVocabulary assetVocabulary) {
117                    return getService().deleteAssetVocabulary(assetVocabulary);
118            }
119    
120            /**
121            * Deletes the asset vocabulary with the primary key from the database. Also notifies the appropriate model listeners.
122            *
123            * @param vocabularyId the primary key of the asset vocabulary
124            * @return the asset vocabulary that was removed
125            * @throws PortalException if a asset vocabulary with the primary key could not be found
126            */
127            public static com.liferay.portlet.asset.model.AssetVocabulary deleteAssetVocabulary(
128                    long vocabularyId)
129                    throws com.liferay.portal.kernel.exception.PortalException {
130                    return getService().deleteAssetVocabulary(vocabularyId);
131            }
132    
133            /**
134            * @throws PortalException
135            */
136            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
137                    com.liferay.portal.model.PersistedModel persistedModel)
138                    throws com.liferay.portal.kernel.exception.PortalException {
139                    return getService().deletePersistedModel(persistedModel);
140            }
141    
142            public static void deleteVocabularies(long groupId)
143                    throws com.liferay.portal.kernel.exception.PortalException {
144                    getService().deleteVocabularies(groupId);
145            }
146    
147            public static void deleteVocabulary(
148                    com.liferay.portlet.asset.model.AssetVocabulary vocabulary)
149                    throws com.liferay.portal.kernel.exception.PortalException {
150                    getService().deleteVocabulary(vocabulary);
151            }
152    
153            public static void deleteVocabulary(long vocabularyId)
154                    throws com.liferay.portal.kernel.exception.PortalException {
155                    getService().deleteVocabulary(vocabularyId);
156            }
157    
158            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
159                    return getService().dynamicQuery();
160            }
161    
162            /**
163            * Performs a dynamic query on the database and returns the matching rows.
164            *
165            * @param dynamicQuery the dynamic query
166            * @return the matching rows
167            */
168            public static <T> java.util.List<T> dynamicQuery(
169                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
170                    return getService().dynamicQuery(dynamicQuery);
171            }
172    
173            /**
174            * Performs a dynamic query on the database and returns a range of the matching rows.
175            *
176            * <p>
177            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.asset.model.impl.AssetVocabularyModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
178            * </p>
179            *
180            * @param dynamicQuery the dynamic query
181            * @param start the lower bound of the range of model instances
182            * @param end the upper bound of the range of model instances (not inclusive)
183            * @return the range of matching rows
184            */
185            public static <T> java.util.List<T> dynamicQuery(
186                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
187                    int end) {
188                    return getService().dynamicQuery(dynamicQuery, start, end);
189            }
190    
191            /**
192            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
193            *
194            * <p>
195            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.asset.model.impl.AssetVocabularyModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
196            * </p>
197            *
198            * @param dynamicQuery the dynamic query
199            * @param start the lower bound of the range of model instances
200            * @param end the upper bound of the range of model instances (not inclusive)
201            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
202            * @return the ordered range of matching rows
203            */
204            public static <T> java.util.List<T> dynamicQuery(
205                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
206                    int end,
207                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
208                    return getService()
209                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
210            }
211    
212            /**
213            * Returns the number of rows matching the dynamic query.
214            *
215            * @param dynamicQuery the dynamic query
216            * @return the number of rows matching the dynamic query
217            */
218            public static long dynamicQueryCount(
219                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
220                    return getService().dynamicQueryCount(dynamicQuery);
221            }
222    
223            /**
224            * Returns the number of rows matching the dynamic query.
225            *
226            * @param dynamicQuery the dynamic query
227            * @param projection the projection to apply to the query
228            * @return the number of rows matching the dynamic query
229            */
230            public static long dynamicQueryCount(
231                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
232                    com.liferay.portal.kernel.dao.orm.Projection projection) {
233                    return getService().dynamicQueryCount(dynamicQuery, projection);
234            }
235    
236            public static com.liferay.portlet.asset.model.AssetVocabulary fetchAssetVocabulary(
237                    long vocabularyId) {
238                    return getService().fetchAssetVocabulary(vocabularyId);
239            }
240    
241            /**
242            * Returns the asset vocabulary matching the UUID and group.
243            *
244            * @param uuid the asset vocabulary's UUID
245            * @param groupId the primary key of the group
246            * @return the matching asset vocabulary, or <code>null</code> if a matching asset vocabulary could not be found
247            */
248            public static com.liferay.portlet.asset.model.AssetVocabulary fetchAssetVocabularyByUuidAndGroupId(
249                    java.lang.String uuid, long groupId) {
250                    return getService().fetchAssetVocabularyByUuidAndGroupId(uuid, groupId);
251            }
252    
253            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
254                    return getService().getActionableDynamicQuery();
255            }
256    
257            /**
258            * Returns a range of all the asset vocabularies.
259            *
260            * <p>
261            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.asset.model.impl.AssetVocabularyModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
262            * </p>
263            *
264            * @param start the lower bound of the range of asset vocabularies
265            * @param end the upper bound of the range of asset vocabularies (not inclusive)
266            * @return the range of asset vocabularies
267            */
268            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getAssetVocabularies(
269                    int start, int end) {
270                    return getService().getAssetVocabularies(start, end);
271            }
272    
273            /**
274            * Returns all the asset vocabularies matching the UUID and company.
275            *
276            * @param uuid the UUID of the asset vocabularies
277            * @param companyId the primary key of the company
278            * @return the matching asset vocabularies, or an empty list if no matches were found
279            */
280            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getAssetVocabulariesByUuidAndCompanyId(
281                    java.lang.String uuid, long companyId) {
282                    return getService()
283                                       .getAssetVocabulariesByUuidAndCompanyId(uuid, companyId);
284            }
285    
286            /**
287            * Returns a range of asset vocabularies matching the UUID and company.
288            *
289            * @param uuid the UUID of the asset vocabularies
290            * @param companyId the primary key of the company
291            * @param start the lower bound of the range of asset vocabularies
292            * @param end the upper bound of the range of asset vocabularies (not inclusive)
293            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
294            * @return the range of matching asset vocabularies, or an empty list if no matches were found
295            */
296            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getAssetVocabulariesByUuidAndCompanyId(
297                    java.lang.String uuid, long companyId, int start, int end,
298                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> orderByComparator) {
299                    return getService()
300                                       .getAssetVocabulariesByUuidAndCompanyId(uuid, companyId,
301                            start, end, orderByComparator);
302            }
303    
304            /**
305            * Returns the number of asset vocabularies.
306            *
307            * @return the number of asset vocabularies
308            */
309            public static int getAssetVocabulariesCount() {
310                    return getService().getAssetVocabulariesCount();
311            }
312    
313            /**
314            * Returns the asset vocabulary with the primary key.
315            *
316            * @param vocabularyId the primary key of the asset vocabulary
317            * @return the asset vocabulary
318            * @throws PortalException if a asset vocabulary with the primary key could not be found
319            */
320            public static com.liferay.portlet.asset.model.AssetVocabulary getAssetVocabulary(
321                    long vocabularyId)
322                    throws com.liferay.portal.kernel.exception.PortalException {
323                    return getService().getAssetVocabulary(vocabularyId);
324            }
325    
326            /**
327            * Returns the asset vocabulary matching the UUID and group.
328            *
329            * @param uuid the asset vocabulary's UUID
330            * @param groupId the primary key of the group
331            * @return the matching asset vocabulary
332            * @throws PortalException if a matching asset vocabulary could not be found
333            */
334            public static com.liferay.portlet.asset.model.AssetVocabulary getAssetVocabularyByUuidAndGroupId(
335                    java.lang.String uuid, long groupId)
336                    throws com.liferay.portal.kernel.exception.PortalException {
337                    return getService().getAssetVocabularyByUuidAndGroupId(uuid, groupId);
338            }
339    
340            /**
341            * Returns the Spring bean ID for this bean.
342            *
343            * @return the Spring bean ID for this bean
344            */
345            public static java.lang.String getBeanIdentifier() {
346                    return getService().getBeanIdentifier();
347            }
348    
349            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getCompanyVocabularies(
350                    long companyId) {
351                    return getService().getCompanyVocabularies(companyId);
352            }
353    
354            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
355                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext) {
356                    return getService().getExportActionableDynamicQuery(portletDataContext);
357            }
358    
359            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
360                    long groupId)
361                    throws com.liferay.portal.kernel.exception.PortalException {
362                    return getService().getGroupVocabularies(groupId);
363            }
364    
365            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
366                    long groupId, boolean addDefaultVocabulary)
367                    throws com.liferay.portal.kernel.exception.PortalException {
368                    return getService().getGroupVocabularies(groupId, addDefaultVocabulary);
369            }
370    
371            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
372                    long groupId, java.lang.String name, int start, int end,
373                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc) {
374                    return getService().getGroupVocabularies(groupId, name, start, end, obc);
375            }
376    
377            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
378                    long[] groupIds) {
379                    return getService().getGroupVocabularies(groupIds);
380            }
381    
382            public static int getGroupVocabulariesCount(long[] groupIds) {
383                    return getService().getGroupVocabulariesCount(groupIds);
384            }
385    
386            public static com.liferay.portlet.asset.model.AssetVocabulary getGroupVocabulary(
387                    long groupId, java.lang.String name)
388                    throws com.liferay.portal.kernel.exception.PortalException {
389                    return getService().getGroupVocabulary(groupId, name);
390            }
391    
392            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupsVocabularies(
393                    long[] groupIds) {
394                    return getService().getGroupsVocabularies(groupIds);
395            }
396    
397            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupsVocabularies(
398                    long[] groupIds, java.lang.String className) {
399                    return getService().getGroupsVocabularies(groupIds, className);
400            }
401    
402            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupsVocabularies(
403                    long[] groupIds, java.lang.String className, long classTypePK) {
404                    return getService()
405                                       .getGroupsVocabularies(groupIds, className, classTypePK);
406            }
407    
408            public static com.liferay.portal.model.PersistedModel getPersistedModel(
409                    java.io.Serializable primaryKeyObj)
410                    throws com.liferay.portal.kernel.exception.PortalException {
411                    return getService().getPersistedModel(primaryKeyObj);
412            }
413    
414            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getVocabularies(
415                    com.liferay.portal.kernel.search.Hits hits)
416                    throws com.liferay.portal.kernel.exception.PortalException {
417                    return getService().getVocabularies(hits);
418            }
419    
420            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getVocabularies(
421                    long[] vocabularyIds)
422                    throws com.liferay.portal.kernel.exception.PortalException {
423                    return getService().getVocabularies(vocabularyIds);
424            }
425    
426            public static com.liferay.portlet.asset.model.AssetVocabulary getVocabulary(
427                    long vocabularyId)
428                    throws com.liferay.portal.kernel.exception.PortalException {
429                    return getService().getVocabulary(vocabularyId);
430            }
431    
432            public static com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portlet.asset.model.AssetVocabulary> searchVocabularies(
433                    long companyId, long groupId, java.lang.String title, int start, int end)
434                    throws com.liferay.portal.kernel.exception.PortalException {
435                    return getService()
436                                       .searchVocabularies(companyId, groupId, title, start, end);
437            }
438    
439            /**
440            * Sets the Spring bean ID for this bean.
441            *
442            * @param beanIdentifier the Spring bean ID for this bean
443            */
444            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
445                    getService().setBeanIdentifier(beanIdentifier);
446            }
447    
448            /**
449            * Updates the asset vocabulary in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
450            *
451            * @param assetVocabulary the asset vocabulary
452            * @return the asset vocabulary that was updated
453            */
454            public static com.liferay.portlet.asset.model.AssetVocabulary updateAssetVocabulary(
455                    com.liferay.portlet.asset.model.AssetVocabulary assetVocabulary) {
456                    return getService().updateAssetVocabulary(assetVocabulary);
457            }
458    
459            public static com.liferay.portlet.asset.model.AssetVocabulary updateVocabulary(
460                    long vocabularyId, java.lang.String title,
461                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
462                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
463                    java.lang.String settings,
464                    com.liferay.portal.service.ServiceContext serviceContext)
465                    throws com.liferay.portal.kernel.exception.PortalException {
466                    return getService()
467                                       .updateVocabulary(vocabularyId, title, titleMap,
468                            descriptionMap, settings, serviceContext);
469            }
470    
471            public static AssetVocabularyLocalService getService() {
472                    if (_service == null) {
473                            _service = (AssetVocabularyLocalService)PortalBeanLocatorUtil.locate(AssetVocabularyLocalService.class.getName());
474    
475                            ReferenceRegistry.registerReference(AssetVocabularyLocalServiceUtil.class,
476                                    "_service");
477                    }
478    
479                    return _service;
480            }
481    
482            /**
483             * @deprecated As of 6.2.0
484             */
485            @Deprecated
486            public void setService(AssetVocabularyLocalService service) {
487            }
488    
489            private static AssetVocabularyLocalService _service;
490    }