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, java.lang.String title,
063                    com.liferay.portal.service.ServiceContext serviceContext)
064                    throws com.liferay.portal.kernel.exception.PortalException {
065                    return getService().addVocabulary(userId, title, serviceContext);
066            }
067    
068            public static com.liferay.portlet.asset.model.AssetVocabulary addVocabulary(
069                    long userId, 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, title, titleMap, descriptionMap,
077                            settings, serviceContext);
078            }
079    
080            /**
081            * @deprecated As of 6.1.0
082            */
083            @Deprecated
084            public static com.liferay.portlet.asset.model.AssetVocabulary addVocabulary(
085                    long userId,
086                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
087                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
088                    java.lang.String settings,
089                    com.liferay.portal.service.ServiceContext serviceContext)
090                    throws com.liferay.portal.kernel.exception.PortalException {
091                    return getService()
092                                       .addVocabulary(userId, titleMap, descriptionMap, settings,
093                            serviceContext);
094            }
095    
096            public static void addVocabularyResources(
097                    com.liferay.portlet.asset.model.AssetVocabulary vocabulary,
098                    boolean addGroupPermissions, boolean addGuestPermissions)
099                    throws com.liferay.portal.kernel.exception.PortalException {
100                    getService()
101                            .addVocabularyResources(vocabulary, addGroupPermissions,
102                            addGuestPermissions);
103            }
104    
105            public static void addVocabularyResources(
106                    com.liferay.portlet.asset.model.AssetVocabulary vocabulary,
107                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
108                    throws com.liferay.portal.kernel.exception.PortalException {
109                    getService()
110                            .addVocabularyResources(vocabulary, groupPermissions,
111                            guestPermissions);
112            }
113    
114            /**
115            * Creates a new asset vocabulary with the primary key. Does not add the asset vocabulary to the database.
116            *
117            * @param vocabularyId the primary key for the new asset vocabulary
118            * @return the new asset vocabulary
119            */
120            public static com.liferay.portlet.asset.model.AssetVocabulary createAssetVocabulary(
121                    long vocabularyId) {
122                    return getService().createAssetVocabulary(vocabularyId);
123            }
124    
125            /**
126            * Deletes the asset vocabulary from the database. Also notifies the appropriate model listeners.
127            *
128            * @param assetVocabulary the asset vocabulary
129            * @return the asset vocabulary that was removed
130            */
131            public static com.liferay.portlet.asset.model.AssetVocabulary deleteAssetVocabulary(
132                    com.liferay.portlet.asset.model.AssetVocabulary assetVocabulary) {
133                    return getService().deleteAssetVocabulary(assetVocabulary);
134            }
135    
136            /**
137            * Deletes the asset vocabulary with the primary key from the database. Also notifies the appropriate model listeners.
138            *
139            * @param vocabularyId the primary key of the asset vocabulary
140            * @return the asset vocabulary that was removed
141            * @throws PortalException if a asset vocabulary with the primary key could not be found
142            */
143            public static com.liferay.portlet.asset.model.AssetVocabulary deleteAssetVocabulary(
144                    long vocabularyId)
145                    throws com.liferay.portal.kernel.exception.PortalException {
146                    return getService().deleteAssetVocabulary(vocabularyId);
147            }
148    
149            /**
150            * @throws PortalException
151            */
152            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
153                    com.liferay.portal.model.PersistedModel persistedModel)
154                    throws com.liferay.portal.kernel.exception.PortalException {
155                    return getService().deletePersistedModel(persistedModel);
156            }
157    
158            public static void deleteVocabularies(long groupId)
159                    throws com.liferay.portal.kernel.exception.PortalException {
160                    getService().deleteVocabularies(groupId);
161            }
162    
163            public static void deleteVocabulary(
164                    com.liferay.portlet.asset.model.AssetVocabulary vocabulary)
165                    throws com.liferay.portal.kernel.exception.PortalException {
166                    getService().deleteVocabulary(vocabulary);
167            }
168    
169            public static void deleteVocabulary(long vocabularyId)
170                    throws com.liferay.portal.kernel.exception.PortalException {
171                    getService().deleteVocabulary(vocabularyId);
172            }
173    
174            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
175                    return getService().dynamicQuery();
176            }
177    
178            /**
179            * Performs a dynamic query on the database and returns the matching rows.
180            *
181            * @param dynamicQuery the dynamic query
182            * @return the matching rows
183            */
184            public static <T> java.util.List<T> dynamicQuery(
185                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
186                    return getService().dynamicQuery(dynamicQuery);
187            }
188    
189            /**
190            * Performs a dynamic query on the database and returns a range of the matching rows.
191            *
192            * <p>
193            * 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.
194            * </p>
195            *
196            * @param dynamicQuery the dynamic query
197            * @param start the lower bound of the range of model instances
198            * @param end the upper bound of the range of model instances (not inclusive)
199            * @return the range of matching rows
200            */
201            public static <T> java.util.List<T> dynamicQuery(
202                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
203                    int end) {
204                    return getService().dynamicQuery(dynamicQuery, start, end);
205            }
206    
207            /**
208            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
209            *
210            * <p>
211            * 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.
212            * </p>
213            *
214            * @param dynamicQuery the dynamic query
215            * @param start the lower bound of the range of model instances
216            * @param end the upper bound of the range of model instances (not inclusive)
217            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
218            * @return the ordered range of matching rows
219            */
220            public static <T> java.util.List<T> dynamicQuery(
221                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
222                    int end,
223                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
224                    return getService()
225                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
226            }
227    
228            /**
229            * Returns the number of rows matching the dynamic query.
230            *
231            * @param dynamicQuery the dynamic query
232            * @return the number of rows matching the dynamic query
233            */
234            public static long dynamicQueryCount(
235                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
236                    return getService().dynamicQueryCount(dynamicQuery);
237            }
238    
239            /**
240            * Returns the number of rows matching the dynamic query.
241            *
242            * @param dynamicQuery the dynamic query
243            * @param projection the projection to apply to the query
244            * @return the number of rows matching the dynamic query
245            */
246            public static long dynamicQueryCount(
247                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
248                    com.liferay.portal.kernel.dao.orm.Projection projection) {
249                    return getService().dynamicQueryCount(dynamicQuery, projection);
250            }
251    
252            public static com.liferay.portlet.asset.model.AssetVocabulary fetchAssetVocabulary(
253                    long vocabularyId) {
254                    return getService().fetchAssetVocabulary(vocabularyId);
255            }
256    
257            /**
258            * Returns the asset vocabulary matching the UUID and group.
259            *
260            * @param uuid the asset vocabulary's UUID
261            * @param groupId the primary key of the group
262            * @return the matching asset vocabulary, or <code>null</code> if a matching asset vocabulary could not be found
263            */
264            public static com.liferay.portlet.asset.model.AssetVocabulary fetchAssetVocabularyByUuidAndGroupId(
265                    java.lang.String uuid, long groupId) {
266                    return getService().fetchAssetVocabularyByUuidAndGroupId(uuid, groupId);
267            }
268    
269            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
270                    return getService().getActionableDynamicQuery();
271            }
272    
273            /**
274            * Returns a range of all the asset vocabularies.
275            *
276            * <p>
277            * 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.
278            * </p>
279            *
280            * @param start the lower bound of the range of asset vocabularies
281            * @param end the upper bound of the range of asset vocabularies (not inclusive)
282            * @return the range of asset vocabularies
283            */
284            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getAssetVocabularies(
285                    int start, int end) {
286                    return getService().getAssetVocabularies(start, end);
287            }
288    
289            /**
290            * Returns all the asset vocabularies matching the UUID and company.
291            *
292            * @param uuid the UUID of the asset vocabularies
293            * @param companyId the primary key of the company
294            * @return the 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) {
298                    return getService()
299                                       .getAssetVocabulariesByUuidAndCompanyId(uuid, companyId);
300            }
301    
302            /**
303            * Returns a range of asset vocabularies matching the UUID and company.
304            *
305            * @param uuid the UUID of the asset vocabularies
306            * @param companyId the primary key of the company
307            * @param start the lower bound of the range of asset vocabularies
308            * @param end the upper bound of the range of asset vocabularies (not inclusive)
309            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
310            * @return the range of matching asset vocabularies, or an empty list if no matches were found
311            */
312            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getAssetVocabulariesByUuidAndCompanyId(
313                    java.lang.String uuid, long companyId, int start, int end,
314                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> orderByComparator) {
315                    return getService()
316                                       .getAssetVocabulariesByUuidAndCompanyId(uuid, companyId,
317                            start, end, orderByComparator);
318            }
319    
320            /**
321            * Returns the number of asset vocabularies.
322            *
323            * @return the number of asset vocabularies
324            */
325            public static int getAssetVocabulariesCount() {
326                    return getService().getAssetVocabulariesCount();
327            }
328    
329            /**
330            * Returns the asset vocabulary with the primary key.
331            *
332            * @param vocabularyId the primary key of the asset vocabulary
333            * @return the asset vocabulary
334            * @throws PortalException if a asset vocabulary with the primary key could not be found
335            */
336            public static com.liferay.portlet.asset.model.AssetVocabulary getAssetVocabulary(
337                    long vocabularyId)
338                    throws com.liferay.portal.kernel.exception.PortalException {
339                    return getService().getAssetVocabulary(vocabularyId);
340            }
341    
342            /**
343            * Returns the asset vocabulary matching the UUID and group.
344            *
345            * @param uuid the asset vocabulary's UUID
346            * @param groupId the primary key of the group
347            * @return the matching asset vocabulary
348            * @throws PortalException if a matching asset vocabulary could not be found
349            */
350            public static com.liferay.portlet.asset.model.AssetVocabulary getAssetVocabularyByUuidAndGroupId(
351                    java.lang.String uuid, long groupId)
352                    throws com.liferay.portal.kernel.exception.PortalException {
353                    return getService().getAssetVocabularyByUuidAndGroupId(uuid, groupId);
354            }
355    
356            /**
357            * Returns the Spring bean ID for this bean.
358            *
359            * @return the Spring bean ID for this bean
360            */
361            public static java.lang.String getBeanIdentifier() {
362                    return getService().getBeanIdentifier();
363            }
364    
365            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getCompanyVocabularies(
366                    long companyId) {
367                    return getService().getCompanyVocabularies(companyId);
368            }
369    
370            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
371                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext) {
372                    return getService().getExportActionableDynamicQuery(portletDataContext);
373            }
374    
375            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
376                    long groupId)
377                    throws com.liferay.portal.kernel.exception.PortalException {
378                    return getService().getGroupVocabularies(groupId);
379            }
380    
381            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
382                    long groupId, boolean addDefaultVocabulary)
383                    throws com.liferay.portal.kernel.exception.PortalException {
384                    return getService().getGroupVocabularies(groupId, addDefaultVocabulary);
385            }
386    
387            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
388                    long groupId, java.lang.String name, int start, int end,
389                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc) {
390                    return getService().getGroupVocabularies(groupId, name, start, end, obc);
391            }
392    
393            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
394                    long[] groupIds) {
395                    return getService().getGroupVocabularies(groupIds);
396            }
397    
398            public static int getGroupVocabulariesCount(long[] groupIds) {
399                    return getService().getGroupVocabulariesCount(groupIds);
400            }
401    
402            public static com.liferay.portlet.asset.model.AssetVocabulary getGroupVocabulary(
403                    long groupId, java.lang.String name)
404                    throws com.liferay.portal.kernel.exception.PortalException {
405                    return getService().getGroupVocabulary(groupId, name);
406            }
407    
408            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupsVocabularies(
409                    long[] groupIds) {
410                    return getService().getGroupsVocabularies(groupIds);
411            }
412    
413            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupsVocabularies(
414                    long[] groupIds, java.lang.String className) {
415                    return getService().getGroupsVocabularies(groupIds, className);
416            }
417    
418            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupsVocabularies(
419                    long[] groupIds, java.lang.String className, long classTypePK) {
420                    return getService()
421                                       .getGroupsVocabularies(groupIds, className, classTypePK);
422            }
423    
424            public static com.liferay.portal.model.PersistedModel getPersistedModel(
425                    java.io.Serializable primaryKeyObj)
426                    throws com.liferay.portal.kernel.exception.PortalException {
427                    return getService().getPersistedModel(primaryKeyObj);
428            }
429    
430            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getVocabularies(
431                    long[] vocabularyIds)
432                    throws com.liferay.portal.kernel.exception.PortalException {
433                    return getService().getVocabularies(vocabularyIds);
434            }
435    
436            public static com.liferay.portlet.asset.model.AssetVocabulary getVocabulary(
437                    long vocabularyId)
438                    throws com.liferay.portal.kernel.exception.PortalException {
439                    return getService().getVocabulary(vocabularyId);
440            }
441    
442            public static com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portlet.asset.model.AssetVocabulary> searchVocabularies(
443                    long companyId, long groupId, java.lang.String title, int start, int end)
444                    throws com.liferay.portal.kernel.exception.PortalException {
445                    return getService()
446                                       .searchVocabularies(companyId, groupId, title, start, end);
447            }
448    
449            /**
450            * Sets the Spring bean ID for this bean.
451            *
452            * @param beanIdentifier the Spring bean ID for this bean
453            */
454            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
455                    getService().setBeanIdentifier(beanIdentifier);
456            }
457    
458            /**
459            * Updates the asset vocabulary in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
460            *
461            * @param assetVocabulary the asset vocabulary
462            * @return the asset vocabulary that was updated
463            */
464            public static com.liferay.portlet.asset.model.AssetVocabulary updateAssetVocabulary(
465                    com.liferay.portlet.asset.model.AssetVocabulary assetVocabulary) {
466                    return getService().updateAssetVocabulary(assetVocabulary);
467            }
468    
469            public static com.liferay.portlet.asset.model.AssetVocabulary updateVocabulary(
470                    long vocabularyId, java.lang.String title,
471                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
472                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
473                    java.lang.String settings,
474                    com.liferay.portal.service.ServiceContext serviceContext)
475                    throws com.liferay.portal.kernel.exception.PortalException {
476                    return getService()
477                                       .updateVocabulary(vocabularyId, title, titleMap,
478                            descriptionMap, settings, serviceContext);
479            }
480    
481            /**
482            * @deprecated As of 6.1.0
483            */
484            @Deprecated
485            public static com.liferay.portlet.asset.model.AssetVocabulary updateVocabulary(
486                    long vocabularyId,
487                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
488                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
489                    java.lang.String settings,
490                    com.liferay.portal.service.ServiceContext serviceContext)
491                    throws com.liferay.portal.kernel.exception.PortalException {
492                    return getService()
493                                       .updateVocabulary(vocabularyId, titleMap, descriptionMap,
494                            settings, serviceContext);
495            }
496    
497            public static AssetVocabularyLocalService getService() {
498                    if (_service == null) {
499                            _service = (AssetVocabularyLocalService)PortalBeanLocatorUtil.locate(AssetVocabularyLocalService.class.getName());
500    
501                            ReferenceRegistry.registerReference(AssetVocabularyLocalServiceUtil.class,
502                                    "_service");
503                    }
504    
505                    return _service;
506            }
507    
508            /**
509             * @deprecated As of 6.2.0
510             */
511            @Deprecated
512            public void setService(AssetVocabularyLocalService service) {
513            }
514    
515            private static AssetVocabularyLocalService _service;
516    }