001    /**
002     * Copyright (c) 2000-2012 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    import com.liferay.portal.kernel.util.MethodCache;
019    import com.liferay.portal.kernel.util.ReferenceRegistry;
020    
021    /**
022     * The utility for the asset tag property remote service. This utility wraps {@link com.liferay.portlet.asset.service.impl.AssetTagPropertyServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
023     *
024     * <p>
025     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see AssetTagPropertyService
030     * @see com.liferay.portlet.asset.service.base.AssetTagPropertyServiceBaseImpl
031     * @see com.liferay.portlet.asset.service.impl.AssetTagPropertyServiceImpl
032     * @generated
033     */
034    public class AssetTagPropertyServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.asset.service.impl.AssetTagPropertyServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040    
041            /**
042            * Adds an asset tag property.
043            *
044            * @param tagId the primary key of the tag
045            * @param key the key to be associated to the value
046            * @param value the value to which the key will refer
047            * @return the created asset tag property
048            * @throws PortalException if the user did not have permission to update the
049            asset tag, or if the key or value were invalid
050            * @throws SystemException if a system exception occurred
051            */
052            public static com.liferay.portlet.asset.model.AssetTagProperty addTagProperty(
053                    long tagId, java.lang.String key, java.lang.String value)
054                    throws com.liferay.portal.kernel.exception.PortalException,
055                            com.liferay.portal.kernel.exception.SystemException {
056                    return getService().addTagProperty(tagId, key, value);
057            }
058    
059            /**
060            * Deletes the asset tag property with the specified ID.
061            *
062            * @param tagPropertyId the primary key of the asset tag property instance
063            * @throws PortalException if an asset tag property with the primary key
064            could not be found or if the user did not have permission to
065            update the asset tag property
066            * @throws SystemException if a system exception occurred
067            */
068            public static void deleteTagProperty(long tagPropertyId)
069                    throws com.liferay.portal.kernel.exception.PortalException,
070                            com.liferay.portal.kernel.exception.SystemException {
071                    getService().deleteTagProperty(tagPropertyId);
072            }
073    
074            /**
075            * Returns all the asset tag property instances with the specified tag ID.
076            *
077            * @param tagId the primary key of the tag
078            * @return the matching asset tag properties
079            * @throws SystemException if a system exception occurred
080            */
081            public static java.util.List<com.liferay.portlet.asset.model.AssetTagProperty> getTagProperties(
082                    long tagId) throws com.liferay.portal.kernel.exception.SystemException {
083                    return getService().getTagProperties(tagId);
084            }
085    
086            /**
087            * Returns asset tag properties with the specified group and key.
088            *
089            * @param companyId the primary key of the company
090            * @param key the key that refers to some value
091            * @return the matching asset tag properties
092            * @throws SystemException if a system exception occurred
093            */
094            public static java.util.List<com.liferay.portlet.asset.model.AssetTagProperty> getTagPropertyValues(
095                    long companyId, java.lang.String key)
096                    throws com.liferay.portal.kernel.exception.SystemException {
097                    return getService().getTagPropertyValues(companyId, key);
098            }
099    
100            /**
101            * Updates the asset tag property.
102            *
103            * @param tagPropertyId the primary key of the asset tag property
104            * @param key the new key to be associated to the value
105            * @param value the new value to which the key will refer
106            * @return the updated asset tag property
107            * @throws PortalException if an asset tag property with the primary key
108            could not be found, if the user did not have permission to update
109            the asset tag, or if the key or value were invalid
110            * @throws SystemException if a system exception occurred
111            */
112            public static com.liferay.portlet.asset.model.AssetTagProperty updateTagProperty(
113                    long tagPropertyId, java.lang.String key, java.lang.String value)
114                    throws com.liferay.portal.kernel.exception.PortalException,
115                            com.liferay.portal.kernel.exception.SystemException {
116                    return getService().updateTagProperty(tagPropertyId, key, value);
117            }
118    
119            public static AssetTagPropertyService getService() {
120                    if (_service == null) {
121                            _service = (AssetTagPropertyService)PortalBeanLocatorUtil.locate(AssetTagPropertyService.class.getName());
122    
123                            ReferenceRegistry.registerReference(AssetTagPropertyServiceUtil.class,
124                                    "_service");
125                            MethodCache.remove(AssetTagPropertyService.class);
126                    }
127    
128                    return _service;
129            }
130    
131            public void setService(AssetTagPropertyService service) {
132                    MethodCache.remove(AssetTagPropertyService.class);
133    
134                    _service = service;
135    
136                    ReferenceRegistry.registerReference(AssetTagPropertyServiceUtil.class,
137                            "_service");
138                    MethodCache.remove(AssetTagPropertyService.class);
139            }
140    
141            private static AssetTagPropertyService _service;
142    }