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