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