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 AssetTagService} 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       AssetTagService
030     * @generated
031     */
032    public class AssetTagServiceUtil {
033            public static com.liferay.portlet.asset.model.AssetTag addTag(
034                    java.lang.String name, java.lang.String[] tagProperties,
035                    com.liferay.portal.service.ServiceContext serviceContext)
036                    throws com.liferay.portal.kernel.exception.PortalException,
037                            com.liferay.portal.kernel.exception.SystemException {
038                    return getService().addTag(name, tagProperties, serviceContext);
039            }
040    
041            public static void deleteTag(long tagId)
042                    throws com.liferay.portal.kernel.exception.PortalException,
043                            com.liferay.portal.kernel.exception.SystemException {
044                    getService().deleteTag(tagId);
045            }
046    
047            public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getGroupTags(
048                    long groupId)
049                    throws com.liferay.portal.kernel.exception.PortalException,
050                            com.liferay.portal.kernel.exception.SystemException {
051                    return getService().getGroupTags(groupId);
052            }
053    
054            public static com.liferay.portlet.asset.model.AssetTag getTag(long tagId)
055                    throws com.liferay.portal.kernel.exception.PortalException,
056                            com.liferay.portal.kernel.exception.SystemException {
057                    return getService().getTag(tagId);
058            }
059    
060            public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
061                    long groupId, long classNameId, java.lang.String name)
062                    throws com.liferay.portal.kernel.exception.PortalException,
063                            com.liferay.portal.kernel.exception.SystemException {
064                    return getService().getTags(groupId, classNameId, name);
065            }
066    
067            public static java.util.List<com.liferay.portlet.asset.model.AssetTag> getTags(
068                    java.lang.String className, long classPK)
069                    throws com.liferay.portal.kernel.exception.PortalException,
070                            com.liferay.portal.kernel.exception.SystemException {
071                    return getService().getTags(className, classPK);
072            }
073    
074            public static void mergeTags(long fromTagId, long toTagId)
075                    throws com.liferay.portal.kernel.exception.PortalException,
076                            com.liferay.portal.kernel.exception.SystemException {
077                    getService().mergeTags(fromTagId, toTagId);
078            }
079    
080            public static com.liferay.portal.kernel.json.JSONArray search(
081                    long groupId, java.lang.String name, java.lang.String[] tagProperties,
082                    int start, int end)
083                    throws com.liferay.portal.kernel.exception.SystemException {
084                    return getService().search(groupId, name, tagProperties, start, end);
085            }
086    
087            public static com.liferay.portlet.asset.model.AssetTag updateTag(
088                    long tagId, java.lang.String name, java.lang.String[] tagProperties,
089                    com.liferay.portal.service.ServiceContext serviceContext)
090                    throws com.liferay.portal.kernel.exception.PortalException,
091                            com.liferay.portal.kernel.exception.SystemException {
092                    return getService().updateTag(tagId, name, tagProperties, serviceContext);
093            }
094    
095            public static AssetTagService getService() {
096                    if (_service == null) {
097                            _service = (AssetTagService)PortalBeanLocatorUtil.locate(AssetTagService.class.getName());
098                    }
099    
100                    return _service;
101            }
102    
103            public void setService(AssetTagService service) {
104                    _service = service;
105            }
106    
107            private static AssetTagService _service;
108    }