public class ServiceMapperImpl extends java.lang.Object implements ServiceMapper
ServiceMapper
. This implementation
maps incoming requests into a BusinessObjectDocument
. Each converted service request
contains two parts, service name, and service input document. This class makes the following assumption:
-- A service input document has a public default constructor.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_NAME
The name of this class
|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
ServiceMapperImpl(ServiceMappingConfiguration config,
BODFactory factory)
Constructs a
ServiceMapperImpl with the given service mapping configuration |
Modifier and Type | Method and Description |
---|---|
MappingResult |
convert(java.lang.String name,
java.util.Map properties)
Maps a HTTP query into its corresponding service request.
|
BODFactory |
getBODFactory() |
ServiceMappingConfiguration |
getMappingConfiguration() |
void |
setBODFactory(BODFactory factory)
Sets the factory used to create objects in a BOD
|
void |
setServiceMappingConfiguration(ServiceMappingConfiguration config)
Sets the configuration used by this mapper
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASS_NAME
public ServiceMapperImpl(ServiceMappingConfiguration config, BODFactory factory)
ServiceMapperImpl
with the given service mapping configurationconfig
- an instance of ServiceMappingConfiguration that will be used by
the constructed service mapper.
factory
- the BODFactory
used to create object in a bodpublic ServiceMappingConfiguration getMappingConfiguration()
getMappingConfiguration
in interface ServiceMapper
public void setServiceMappingConfiguration(ServiceMappingConfiguration config)
setServiceMappingConfiguration
in interface ServiceMapper
config
- the configuration to be used by the mapperpublic MappingResult convert(java.lang.String name, java.util.Map properties) throws ServiceMappingException
ServiceMapper
.convert
in interface ServiceMapper
name
- the name of the mapping group defined in the service mapping configuration.properties
- name-value pairs of HTTP queries.MappingResult
that contains the converted BusinessObjectDocument
and the service nameServiceMappingException
- thrown if a BOD can not be constructed properlypublic BODFactory getBODFactory()
AbstractFactory
that is used to create objects during conversion.public void setBODFactory(BODFactory factory)
factory
-