001    /**
002     * Copyright (c) 2000-2013 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.log.Log;
020    import com.liferay.portal.kernel.log.LogFactoryUtil;
021    
022    import com.liferay.portlet.asset.service.AssetTagPropertyServiceUtil;
023    
024    import java.rmi.RemoteException;
025    
026    /**
027     * Provides the SOAP utility for the
028     * {@link com.liferay.portlet.asset.service.AssetTagPropertyServiceUtil} service utility. The
029     * static methods of this class calls the same methods of the service utility.
030     * However, the signatures are different because it is difficult for SOAP to
031     * support certain types.
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    @ProviderType
067    public class AssetTagPropertyServiceSoap {
068            /**
069            * Adds an asset tag property.
070            *
071            * @param tagId the primary key of the tag
072            * @param key the key to be associated to the value
073            * @param value the value to which the key will refer
074            * @return the created asset tag property
075            * @throws PortalException if the user did not have permission to update the
076            asset tag, or if the key or value were invalid
077            * @throws SystemException if a system exception occurred
078            */
079            public static com.liferay.portlet.asset.model.AssetTagPropertySoap addTagProperty(
080                    long tagId, java.lang.String key, java.lang.String value)
081                    throws RemoteException {
082                    try {
083                            com.liferay.portlet.asset.model.AssetTagProperty returnValue = AssetTagPropertyServiceUtil.addTagProperty(tagId,
084                                            key, value);
085    
086                            return com.liferay.portlet.asset.model.AssetTagPropertySoap.toSoapModel(returnValue);
087                    }
088                    catch (Exception e) {
089                            _log.error(e, e);
090    
091                            throw new RemoteException(e.getMessage());
092                    }
093            }
094    
095            /**
096            * Deletes the asset tag property with the specified ID.
097            *
098            * @param tagPropertyId the primary key of the asset tag property instance
099            * @throws PortalException if an asset tag property with the primary key
100            could not be found or if the user did not have permission to
101            update the asset tag property
102            * @throws SystemException if a system exception occurred
103            */
104            public static void deleteTagProperty(long tagPropertyId)
105                    throws RemoteException {
106                    try {
107                            AssetTagPropertyServiceUtil.deleteTagProperty(tagPropertyId);
108                    }
109                    catch (Exception e) {
110                            _log.error(e, e);
111    
112                            throw new RemoteException(e.getMessage());
113                    }
114            }
115    
116            /**
117            * Returns all the asset tag property instances with the specified tag ID.
118            *
119            * @param tagId the primary key of the tag
120            * @return the matching asset tag properties
121            * @throws SystemException if a system exception occurred
122            */
123            public static com.liferay.portlet.asset.model.AssetTagPropertySoap[] getTagProperties(
124                    long tagId) throws RemoteException {
125                    try {
126                            java.util.List<com.liferay.portlet.asset.model.AssetTagProperty> returnValue =
127                                    AssetTagPropertyServiceUtil.getTagProperties(tagId);
128    
129                            return com.liferay.portlet.asset.model.AssetTagPropertySoap.toSoapModels(returnValue);
130                    }
131                    catch (Exception e) {
132                            _log.error(e, e);
133    
134                            throw new RemoteException(e.getMessage());
135                    }
136            }
137    
138            /**
139            * Returns asset tag properties with the specified group and key.
140            *
141            * @param companyId the primary key of the company
142            * @param key the key that refers to some value
143            * @return the matching asset tag properties
144            * @throws SystemException if a system exception occurred
145            */
146            public static com.liferay.portlet.asset.model.AssetTagPropertySoap[] getTagPropertyValues(
147                    long companyId, java.lang.String key) throws RemoteException {
148                    try {
149                            java.util.List<com.liferay.portlet.asset.model.AssetTagProperty> returnValue =
150                                    AssetTagPropertyServiceUtil.getTagPropertyValues(companyId, key);
151    
152                            return com.liferay.portlet.asset.model.AssetTagPropertySoap.toSoapModels(returnValue);
153                    }
154                    catch (Exception e) {
155                            _log.error(e, e);
156    
157                            throw new RemoteException(e.getMessage());
158                    }
159            }
160    
161            /**
162            * Updates the asset tag property.
163            *
164            * @param tagPropertyId the primary key of the asset tag property
165            * @param key the new key to be associated to the value
166            * @param value the new value to which the key will refer
167            * @return the updated asset tag property
168            * @throws PortalException if an asset tag property with the primary key
169            could not be found, if the user did not have permission to update
170            the asset tag, or if the key or value were invalid
171            * @throws SystemException if a system exception occurred
172            */
173            public static com.liferay.portlet.asset.model.AssetTagPropertySoap updateTagProperty(
174                    long tagPropertyId, java.lang.String key, java.lang.String value)
175                    throws RemoteException {
176                    try {
177                            com.liferay.portlet.asset.model.AssetTagProperty returnValue = AssetTagPropertyServiceUtil.updateTagProperty(tagPropertyId,
178                                            key, value);
179    
180                            return com.liferay.portlet.asset.model.AssetTagPropertySoap.toSoapModel(returnValue);
181                    }
182                    catch (Exception e) {
183                            _log.error(e, e);
184    
185                            throw new RemoteException(e.getMessage());
186                    }
187            }
188    
189            private static Log _log = LogFactoryUtil.getLog(AssetTagPropertyServiceSoap.class);
190    }