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.http;
016    
017    import com.liferay.portal.kernel.log.Log;
018    import com.liferay.portal.kernel.log.LogFactoryUtil;
019    
020    import com.liferay.portlet.asset.service.AssetTagPropertyServiceUtil;
021    
022    import java.rmi.RemoteException;
023    
024    /**
025     * <p>
026     * This class provides a SOAP utility for the
027     * {@link com.liferay.portlet.asset.service.AssetTagPropertyServiceUtil} service utility. The
028     * static methods of this class calls the same methods of the service utility.
029     * However, the signatures are different because it is difficult for SOAP to
030     * support certain types.
031     * </p>
032     *
033     * <p>
034     * ServiceBuilder follows certain rules in translating the methods. For example,
035     * if the method in the service utility returns a {@link java.util.List}, that
036     * is translated to an array of {@link com.liferay.portlet.asset.model.AssetTagPropertySoap}.
037     * If the method in the service utility returns a
038     * {@link com.liferay.portlet.asset.model.AssetTagProperty}, that is translated to a
039     * {@link com.liferay.portlet.asset.model.AssetTagPropertySoap}. Methods that SOAP cannot
040     * safely wire are skipped.
041     * </p>
042     *
043     * <p>
044     * The benefits of using the SOAP utility is that it is cross platform
045     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
046     * even Perl, to call the generated services. One drawback of SOAP is that it is
047     * slow because it needs to serialize all calls into a text format (XML).
048     * </p>
049     *
050     * <p>
051     * You can see a list of services at http://localhost:8080/api/axis. Set the
052     * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
053     * security.
054     * </p>
055     *
056     * <p>
057     * The SOAP utility is only generated for remote services.
058     * </p>
059     *
060     * @author    Brian Wing Shun Chan
061     * @see       AssetTagPropertyServiceHttp
062     * @see       com.liferay.portlet.asset.model.AssetTagPropertySoap
063     * @see       com.liferay.portlet.asset.service.AssetTagPropertyServiceUtil
064     * @generated
065     */
066    public class AssetTagPropertyServiceSoap {
067            /**
068            * Adds an asset tag property.
069            *
070            * @param tagId the primary key of the tag
071            * @param key the key to be associated to the value
072            * @param value the value to which the key will refer
073            * @return the created asset tag property
074            * @throws PortalException if the user did not have permission to update the
075            asset tag, or if the key or value were invalid
076            * @throws SystemException if a system exception occurred
077            */
078            public static com.liferay.portlet.asset.model.AssetTagPropertySoap addTagProperty(
079                    long tagId, java.lang.String key, java.lang.String value)
080                    throws RemoteException {
081                    try {
082                            com.liferay.portlet.asset.model.AssetTagProperty returnValue = AssetTagPropertyServiceUtil.addTagProperty(tagId,
083                                            key, value);
084    
085                            return com.liferay.portlet.asset.model.AssetTagPropertySoap.toSoapModel(returnValue);
086                    }
087                    catch (Exception e) {
088                            _log.error(e, e);
089    
090                            throw new RemoteException(e.getMessage());
091                    }
092            }
093    
094            /**
095            * Deletes the asset tag property with the specified ID.
096            *
097            * @param tagPropertyId the primary key of the asset tag property instance
098            * @throws PortalException if an asset tag property with the primary key
099            could not be found or if the user did not have permission to
100            update the asset tag property
101            * @throws SystemException if a system exception occurred
102            */
103            public static void deleteTagProperty(long tagPropertyId)
104                    throws RemoteException {
105                    try {
106                            AssetTagPropertyServiceUtil.deleteTagProperty(tagPropertyId);
107                    }
108                    catch (Exception e) {
109                            _log.error(e, e);
110    
111                            throw new RemoteException(e.getMessage());
112                    }
113            }
114    
115            /**
116            * Returns all the asset tag property instances with the specified tag ID.
117            *
118            * @param tagId the primary key of the tag
119            * @return the matching asset tag properties
120            * @throws SystemException if a system exception occurred
121            */
122            public static com.liferay.portlet.asset.model.AssetTagPropertySoap[] getTagProperties(
123                    long tagId) throws RemoteException {
124                    try {
125                            java.util.List<com.liferay.portlet.asset.model.AssetTagProperty> returnValue =
126                                    AssetTagPropertyServiceUtil.getTagProperties(tagId);
127    
128                            return com.liferay.portlet.asset.model.AssetTagPropertySoap.toSoapModels(returnValue);
129                    }
130                    catch (Exception e) {
131                            _log.error(e, e);
132    
133                            throw new RemoteException(e.getMessage());
134                    }
135            }
136    
137            /**
138            * Returns asset tag properties with the specified group and key.
139            *
140            * @param companyId the primary key of the company
141            * @param key the key that refers to some value
142            * @return the matching asset tag properties
143            * @throws SystemException if a system exception occurred
144            */
145            public static com.liferay.portlet.asset.model.AssetTagPropertySoap[] getTagPropertyValues(
146                    long companyId, java.lang.String key) throws RemoteException {
147                    try {
148                            java.util.List<com.liferay.portlet.asset.model.AssetTagProperty> returnValue =
149                                    AssetTagPropertyServiceUtil.getTagPropertyValues(companyId, key);
150    
151                            return com.liferay.portlet.asset.model.AssetTagPropertySoap.toSoapModels(returnValue);
152                    }
153                    catch (Exception e) {
154                            _log.error(e, e);
155    
156                            throw new RemoteException(e.getMessage());
157                    }
158            }
159    
160            /**
161            * Updates the asset tag property.
162            *
163            * @param tagPropertyId the primary key of the asset tag property
164            * @param key the new key to be associated to the value
165            * @param value the new value to which the key will refer
166            * @return the updated asset tag property
167            * @throws PortalException if an asset tag property with the primary key
168            could not be found, if the user did not have permission to update
169            the asset tag, or if the key or value were invalid
170            * @throws SystemException if a system exception occurred
171            */
172            public static com.liferay.portlet.asset.model.AssetTagPropertySoap updateTagProperty(
173                    long tagPropertyId, java.lang.String key, java.lang.String value)
174                    throws RemoteException {
175                    try {
176                            com.liferay.portlet.asset.model.AssetTagProperty returnValue = AssetTagPropertyServiceUtil.updateTagProperty(tagPropertyId,
177                                            key, value);
178    
179                            return com.liferay.portlet.asset.model.AssetTagPropertySoap.toSoapModel(returnValue);
180                    }
181                    catch (Exception e) {
182                            _log.error(e, e);
183    
184                            throw new RemoteException(e.getMessage());
185                    }
186            }
187    
188            private static Log _log = LogFactoryUtil.getLog(AssetTagPropertyServiceSoap.class);
189    }