com.ibm.commerce.component.servicemapper

Class ServiceMappingConfiguration

  • java.lang.Object
    • com.ibm.commerce.component.servicemapper.ServiceMappingConfiguration


  • public class ServiceMappingConfiguration
    extends java.lang.Object
    This class contains all the mapping configurations that describes how incoming requests are mapped to service requests. Each mapping in the collection satisfies the following requirements: -- Each mapping group has a unique name
    • 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
    • Method Detail

      • getNewEmptyInstance

        public static ServiceMappingConfiguration getNewEmptyInstance()
        Returns:
        a newly created instance of this mapping configuration
      • clear

        public void clear()
        Removes all the configuration information, if any.
      • getMappingConfigurationFileName

        public static java.lang.String getMappingConfigurationFileName()
        Returns:
        the configuration file of all the mappings
      • getAllMappingGroups

        public java.util.Collection getAllMappingGroups()
        Retrieves all the mapping configurations
        Returns:
        A Collection that contains ServiceMappingGroup instances. List is empty if there no mapping configurations
      • getMappingGroup

        public ServiceMappingGroup getMappingGroup(java.lang.String groupName)
        Retrieves mapping configuration based on the mapping name
        Parameters:
        groupName - the name of the mapping group
        Returns:
        The ServiceMappingGroup identifies by the given name. If no mapping is found, this method returns Null.
      • addMapping

        public void addMapping(ServiceMappingGroup group)
        Adds a new ServiceMappingGroup into the service mapping configurations. If the mapping is null, or the mapping does not have a name, a message will be logged, and nothing will be added. If a service mapping with the same service name is already in this collection, the existing mapping will be overwritten by the newly given mapping. A message will be logged.
        Parameters:
        mapping - the service mapping to be added
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representation of this mapping configuration