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 that match the dynamic query.
230            *
231            * @param dynamicQuery the dynamic query
232            * @return the number of rows that match 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 that match 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 that match 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            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getAssetVocabulariesByUuidAndCompanyId(
290                    java.lang.String uuid, long companyId) {
291                    return getService()
292                                       .getAssetVocabulariesByUuidAndCompanyId(uuid, companyId);
293            }
294    
295            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getAssetVocabulariesByUuidAndCompanyId(
296                    java.lang.String uuid, long companyId, int start, int end,
297                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> orderByComparator) {
298                    return getService()
299                                       .getAssetVocabulariesByUuidAndCompanyId(uuid, companyId,
300                            start, end, orderByComparator);
301            }
302    
303            /**
304            * Returns the number of asset vocabularies.
305            *
306            * @return the number of asset vocabularies
307            */
308            public static int getAssetVocabulariesCount() {
309                    return getService().getAssetVocabulariesCount();
310            }
311    
312            /**
313            * Returns the asset vocabulary with the primary key.
314            *
315            * @param vocabularyId the primary key of the asset vocabulary
316            * @return the asset vocabulary
317            * @throws PortalException if a asset vocabulary with the primary key could not be found
318            */
319            public static com.liferay.portlet.asset.model.AssetVocabulary getAssetVocabulary(
320                    long vocabularyId)
321                    throws com.liferay.portal.kernel.exception.PortalException {
322                    return getService().getAssetVocabulary(vocabularyId);
323            }
324    
325            /**
326            * Returns the asset vocabulary matching the UUID and group.
327            *
328            * @param uuid the asset vocabulary's UUID
329            * @param groupId the primary key of the group
330            * @return the matching asset vocabulary
331            * @throws PortalException if a matching asset vocabulary could not be found
332            */
333            public static com.liferay.portlet.asset.model.AssetVocabulary getAssetVocabularyByUuidAndGroupId(
334                    java.lang.String uuid, long groupId)
335                    throws com.liferay.portal.kernel.exception.PortalException {
336                    return getService().getAssetVocabularyByUuidAndGroupId(uuid, groupId);
337            }
338    
339            /**
340            * Returns the Spring bean ID for this bean.
341            *
342            * @return the Spring bean ID for this bean
343            */
344            public static java.lang.String getBeanIdentifier() {
345                    return getService().getBeanIdentifier();
346            }
347    
348            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getCompanyVocabularies(
349                    long companyId) {
350                    return getService().getCompanyVocabularies(companyId);
351            }
352    
353            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
354                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext) {
355                    return getService().getExportActionableDynamicQuery(portletDataContext);
356            }
357    
358            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
359                    long groupId)
360                    throws com.liferay.portal.kernel.exception.PortalException {
361                    return getService().getGroupVocabularies(groupId);
362            }
363    
364            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
365                    long groupId, boolean addDefaultVocabulary)
366                    throws com.liferay.portal.kernel.exception.PortalException {
367                    return getService().getGroupVocabularies(groupId, addDefaultVocabulary);
368            }
369    
370            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
371                    long groupId, java.lang.String name, int start, int end,
372                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.asset.model.AssetVocabulary> obc) {
373                    return getService().getGroupVocabularies(groupId, name, start, end, obc);
374            }
375    
376            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
377                    long[] groupIds) {
378                    return getService().getGroupVocabularies(groupIds);
379            }
380    
381            public static int getGroupVocabulariesCount(long[] groupIds) {
382                    return getService().getGroupVocabulariesCount(groupIds);
383            }
384    
385            public static com.liferay.portlet.asset.model.AssetVocabulary getGroupVocabulary(
386                    long groupId, java.lang.String name)
387                    throws com.liferay.portal.kernel.exception.PortalException {
388                    return getService().getGroupVocabulary(groupId, name);
389            }
390    
391            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupsVocabularies(
392                    long[] groupIds) {
393                    return getService().getGroupsVocabularies(groupIds);
394            }
395    
396            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupsVocabularies(
397                    long[] groupIds, java.lang.String className) {
398                    return getService().getGroupsVocabularies(groupIds, className);
399            }
400    
401            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupsVocabularies(
402                    long[] groupIds, java.lang.String className, long classTypePK) {
403                    return getService()
404                                       .getGroupsVocabularies(groupIds, className, classTypePK);
405            }
406    
407            public static com.liferay.portal.model.PersistedModel getPersistedModel(
408                    java.io.Serializable primaryKeyObj)
409                    throws com.liferay.portal.kernel.exception.PortalException {
410                    return getService().getPersistedModel(primaryKeyObj);
411            }
412    
413            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getVocabularies(
414                    long[] vocabularyIds)
415                    throws com.liferay.portal.kernel.exception.PortalException {
416                    return getService().getVocabularies(vocabularyIds);
417            }
418    
419            public static com.liferay.portlet.asset.model.AssetVocabulary getVocabulary(
420                    long vocabularyId)
421                    throws com.liferay.portal.kernel.exception.PortalException {
422                    return getService().getVocabulary(vocabularyId);
423            }
424    
425            public static com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portlet.asset.model.AssetVocabulary> searchVocabularies(
426                    long companyId, long groupId, java.lang.String title, int start, int end)
427                    throws com.liferay.portal.kernel.exception.PortalException {
428                    return getService()
429                                       .searchVocabularies(companyId, groupId, title, start, end);
430            }
431    
432            /**
433            * Sets the Spring bean ID for this bean.
434            *
435            * @param beanIdentifier the Spring bean ID for this bean
436            */
437            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
438                    getService().setBeanIdentifier(beanIdentifier);
439            }
440    
441            /**
442            * Updates the asset vocabulary in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
443            *
444            * @param assetVocabulary the asset vocabulary
445            * @return the asset vocabulary that was updated
446            */
447            public static com.liferay.portlet.asset.model.AssetVocabulary updateAssetVocabulary(
448                    com.liferay.portlet.asset.model.AssetVocabulary assetVocabulary) {
449                    return getService().updateAssetVocabulary(assetVocabulary);
450            }
451    
452            public static com.liferay.portlet.asset.model.AssetVocabulary updateVocabulary(
453                    long vocabularyId, java.lang.String title,
454                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
455                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
456                    java.lang.String settings,
457                    com.liferay.portal.service.ServiceContext serviceContext)
458                    throws com.liferay.portal.kernel.exception.PortalException {
459                    return getService()
460                                       .updateVocabulary(vocabularyId, title, titleMap,
461                            descriptionMap, settings, serviceContext);
462            }
463    
464            /**
465            * @deprecated As of 6.1.0
466            */
467            @Deprecated
468            public static com.liferay.portlet.asset.model.AssetVocabulary updateVocabulary(
469                    long vocabularyId,
470                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
471                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
472                    java.lang.String settings,
473                    com.liferay.portal.service.ServiceContext serviceContext)
474                    throws com.liferay.portal.kernel.exception.PortalException {
475                    return getService()
476                                       .updateVocabulary(vocabularyId, titleMap, descriptionMap,
477                            settings, serviceContext);
478            }
479    
480            public static AssetVocabularyLocalService getService() {
481                    if (_service == null) {
482                            _service = (AssetVocabularyLocalService)PortalBeanLocatorUtil.locate(AssetVocabularyLocalService.class.getName());
483    
484                            ReferenceRegistry.registerReference(AssetVocabularyLocalServiceUtil.class,
485                                    "_service");
486                    }
487    
488                    return _service;
489            }
490    
491            /**
492             * @deprecated As of 6.2.0
493             */
494            @Deprecated
495            public void setService(AssetVocabularyLocalService service) {
496            }
497    
498            private static AssetVocabularyLocalService _service;
499    }