001    /**
002     * Copyright (c) 2000-2010 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 com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link AssetVocabularyService} bean. The static methods of
023     * this class calls the same methods of the bean instance. It's convenient to be
024     * able to just write one line to call a method on a bean instead of writing a
025     * lookup call and a method call.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       AssetVocabularyService
030     * @generated
031     */
032    public class AssetVocabularyServiceUtil {
033            public static com.liferay.portlet.asset.model.AssetVocabulary addVocabulary(
034                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
035                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
036                    java.lang.String settings,
037                    com.liferay.portal.service.ServiceContext serviceContext)
038                    throws com.liferay.portal.kernel.exception.PortalException,
039                            com.liferay.portal.kernel.exception.SystemException {
040                    return getService()
041                                       .addVocabulary(titleMap, descriptionMap, settings,
042                            serviceContext);
043            }
044    
045            public static void deleteVocabulary(long vocabularyId)
046                    throws com.liferay.portal.kernel.exception.PortalException,
047                            com.liferay.portal.kernel.exception.SystemException {
048                    getService().deleteVocabulary(vocabularyId);
049            }
050    
051            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getCompanyVocabularies(
052                    long companyId)
053                    throws com.liferay.portal.kernel.exception.PortalException,
054                            com.liferay.portal.kernel.exception.SystemException {
055                    return getService().getCompanyVocabularies(companyId);
056            }
057    
058            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupsVocabularies(
059                    long[] groupIds)
060                    throws com.liferay.portal.kernel.exception.PortalException,
061                            com.liferay.portal.kernel.exception.SystemException {
062                    return getService().getGroupsVocabularies(groupIds);
063            }
064    
065            public static java.util.List<com.liferay.portlet.asset.model.AssetVocabulary> getGroupVocabularies(
066                    long groupId)
067                    throws com.liferay.portal.kernel.exception.PortalException,
068                            com.liferay.portal.kernel.exception.SystemException {
069                    return getService().getGroupVocabularies(groupId);
070            }
071    
072            public static com.liferay.portlet.asset.model.AssetVocabulary getVocabulary(
073                    long vocabularyId)
074                    throws com.liferay.portal.kernel.exception.PortalException,
075                            com.liferay.portal.kernel.exception.SystemException {
076                    return getService().getVocabulary(vocabularyId);
077            }
078    
079            public static com.liferay.portlet.asset.model.AssetVocabulary updateVocabulary(
080                    long vocabularyId,
081                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
082                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
083                    java.lang.String settings,
084                    com.liferay.portal.service.ServiceContext serviceContext)
085                    throws com.liferay.portal.kernel.exception.PortalException,
086                            com.liferay.portal.kernel.exception.SystemException {
087                    return getService()
088                                       .updateVocabulary(vocabularyId, titleMap, descriptionMap,
089                            settings, serviceContext);
090            }
091    
092            public static AssetVocabularyService getService() {
093                    if (_service == null) {
094                            _service = (AssetVocabularyService)PortalBeanLocatorUtil.locate(AssetVocabularyService.class.getName());
095                    }
096    
097                    return _service;
098            }
099    
100            public void setService(AssetVocabularyService service) {
101                    _service = service;
102            }
103    
104            private static AssetVocabularyService _service;
105    }