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