com.ibm.commerce.component.servicemapper

Class ServiceMapperImpl

  • java.lang.Object
    • com.ibm.commerce.component.servicemapper.ServiceMapperImpl
  • All Implemented Interfaces:
    ServiceMapper


    public class ServiceMapperImpl
    extends java.lang.Object
    implements ServiceMapper
    This class is an implementation of the interface 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.
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
      • CLASS_NAME

        public static final java.lang.String CLASS_NAME
        The name of this class
    • Constructor Detail

      • ServiceMapperImpl

        public ServiceMapperImpl(ServiceMappingConfiguration config,
                                 BODFactory factory)
        Constructs a ServiceMapperImpl with the given service mapping configuration
        Parameters:
        config - an instance of ServiceMappingConfiguration that will be used by the constructed service mapper.
        factory - the BODFactory used to create object in a bod
    • Method Detail

      • convert

        public MappingResult convert(java.lang.String name,
                                     java.util.Map properties)
                              throws ServiceMappingException
        Maps a HTTP query into its corresponding service request. This implements the method in the interface ServiceMapper.
        Specified by:
        convert in interface ServiceMapper
        Parameters:
        name - the name of the mapping group defined in the service mapping configuration.
        properties - name-value pairs of HTTP queries.
        Returns:
        a MappingResult that contains the converted BusinessObjectDocument and the service name
        Throws:
        ServiceMappingException - thrown if a BOD can not be constructed properly
      • getBODFactory

        public BODFactory getBODFactory()
        Returns:
        The instance of AbstractFactory that is used to create objects during conversion.
      • setBODFactory

        public void setBODFactory(BODFactory factory)
        Sets the factory used to create objects in a BOD
        Parameters:
        factory -