001 /** 002 * Copyright (c) 2000-present 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 */ 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 */ 102 public static void deleteTagProperty(long tagPropertyId) 103 throws RemoteException { 104 try { 105 AssetTagPropertyServiceUtil.deleteTagProperty(tagPropertyId); 106 } 107 catch (Exception e) { 108 _log.error(e, e); 109 110 throw new RemoteException(e.getMessage()); 111 } 112 } 113 114 /** 115 * Returns all the asset tag property instances with the specified tag ID. 116 * 117 * @param tagId the primary key of the tag 118 * @return the matching asset tag properties 119 */ 120 public static com.liferay.portlet.asset.model.AssetTagPropertySoap[] getTagProperties( 121 long tagId) throws RemoteException { 122 try { 123 java.util.List<com.liferay.portlet.asset.model.AssetTagProperty> returnValue = 124 AssetTagPropertyServiceUtil.getTagProperties(tagId); 125 126 return com.liferay.portlet.asset.model.AssetTagPropertySoap.toSoapModels(returnValue); 127 } 128 catch (Exception e) { 129 _log.error(e, e); 130 131 throw new RemoteException(e.getMessage()); 132 } 133 } 134 135 /** 136 * Returns asset tag properties with the specified group and key. 137 * 138 * @param companyId the primary key of the company 139 * @param key the key that refers to some value 140 * @return the matching asset tag properties 141 */ 142 public static com.liferay.portlet.asset.model.AssetTagPropertySoap[] getTagPropertyValues( 143 long companyId, java.lang.String key) throws RemoteException { 144 try { 145 java.util.List<com.liferay.portlet.asset.model.AssetTagProperty> returnValue = 146 AssetTagPropertyServiceUtil.getTagPropertyValues(companyId, key); 147 148 return com.liferay.portlet.asset.model.AssetTagPropertySoap.toSoapModels(returnValue); 149 } 150 catch (Exception e) { 151 _log.error(e, e); 152 153 throw new RemoteException(e.getMessage()); 154 } 155 } 156 157 /** 158 * Updates the asset tag property. 159 * 160 * @param tagPropertyId the primary key of the asset tag property 161 * @param key the new key to be associated to the value 162 * @param value the new value to which the key will refer 163 * @return the updated asset tag property 164 * @throws PortalException if an asset tag property with the primary key 165 could not be found, if the user did not have permission to update 166 the asset tag, or if the key or value were invalid 167 */ 168 public static com.liferay.portlet.asset.model.AssetTagPropertySoap updateTagProperty( 169 long tagPropertyId, java.lang.String key, java.lang.String value) 170 throws RemoteException { 171 try { 172 com.liferay.portlet.asset.model.AssetTagProperty returnValue = AssetTagPropertyServiceUtil.updateTagProperty(tagPropertyId, 173 key, value); 174 175 return com.liferay.portlet.asset.model.AssetTagPropertySoap.toSoapModel(returnValue); 176 } 177 catch (Exception e) { 178 _log.error(e, e); 179 180 throw new RemoteException(e.getMessage()); 181 } 182 } 183 184 private static Log _log = LogFactoryUtil.getLog(AssetTagPropertyServiceSoap.class); 185 }