
jadex.extension.rs.invoke.mapper.ConstantStringMapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jadex-platform-extension-webservice Show documentation
Show all versions of jadex-platform-extension-webservice Show documentation
The Jadex webservice platform extension package contains
basic functionality for WSDL web services and REST web services.
The newest version!
package jadex.extension.rs.invoke.mapper;
import jadex.extension.rs.publish.mapper.IValueMapper;
/**
* Mapper that returns a constant value not
* depending on the input value.
*/
public class ConstantStringMapper implements IValueMapper
{
//-------- attributes --------
/** The value that is returned. */
protected Object val;
//-------- constructors --------
/**
* Create a new mapper.
* @param val The constant value.
*/
public ConstantStringMapper(Object val)
{
this.val = val;
}
//-------- methods --------
/**
* Convert the given value.
* @param value The value to convert.
* @return The converted value.
*/
public Object convertValue(Object value) throws Exception
{
return ""+val;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy