com.ibm.commerce.foundation.server.services.dataaccess.bom.config

Class BusinessObjectMediatorConfig

  • java.lang.Object
    • com.ibm.commerce.foundation.server.services.dataaccess.bom.config.BusinessObjectMediatorConfig


  • public class BusinessObjectMediatorConfig
    extends java.lang.Object
    The business object mediator configuration object representing the configuration defined in the xml. The configuration object is available to the mediators
    • Field Detail

      • XPATH_NOUN_BASE_PART

        public static final java.lang.String XPATH_NOUN_BASE_PART
        XPath expression should be used to register a part mediator for the base part of a noun. E.g. to support updates to the root of a business object.
        See Also:
        Constant Field Values
    • Constructor Detail

      • BusinessObjectMediatorConfig

        public BusinessObjectMediatorConfig(java.lang.String astrComponentId)
        Constructor for the mediator configuration
        Parameters:
        astrComponentId - The component id from configuration file
    • Method Detail

      • addMediator

        public void addMediator(java.lang.Class interfaceName,
                                java.lang.Class implementationName,
                                java.util.Map properties)
        This method adds the register mediator class for the given mediator interface. This method is used to associate a mediator implementation for a specific mediator type.
        Parameters:
        interfaceName - The interface name of the mediator to add.
        implementationName - The implementation of the mediator to add.
        properties - The properties of the mediator.
      • addPartMediator

        public void addPartMediator(java.lang.Class parentMediator,
                                    java.lang.Class interfaceName,
                                    java.lang.Class implementationName,
                                    java.util.Map properties)
        This method adds the register mediator class for the given mediator interface. This method is used to associate a mediator implementation for a specific mediator type.
        Parameters:
        parentMediator - The parent business object mediator that owns the part mediator implementation.
        interfaceName - The interface name of the mediator to add.
        implementationName - The implementation of the mediator to add.
        properties - The properties of the mediator.
      • getMediators

        public java.util.Collection getMediators()
        This method returns a collection of mediator interfaces that have been configured for this business object.
        Returns:
        A collection of supported mediators.
      • getMediatorClass

        public java.lang.Class getMediatorClass(java.lang.Class interfaceName)
        This method returns the mediator implementation for the specified interface.
        Parameters:
        interfaceName - The interface name of the mediator to return.
        Returns:
        The mediator implementation class for the specified interface.
      • getMediatorProperties

        public java.util.Map getMediatorProperties(java.lang.Class interfaceName)
        This method returns the mediator properties for the specified interface. The purpose of this method is so the part mediator can get a handle of the configuration properties of the parent business object mediator.
        Parameters:
        interfaceName - The interface name of the mediator to return.
        Returns:
        The mediator properties for the specified interface.
      • getMediatorInstance

        public BusinessObjectMediator getMediatorInstance(java.lang.Class interfaceName)
                                                   throws java.lang.Exception
        This method return an instance of the specified mediator. If no mediator is defined null is returned.
        Parameters:
        interfaceName - The interface name of the mediator to return.
        Returns:
        An implementation of the specified mediator.
        Throws:
        java.lang.Exception - A problem instantiating the mediator implementation.
      • getPartMediators

        public java.util.Collection getPartMediators(java.lang.Class parentInterfaceName)
        This method returns the list of part mediator interfaces for a given mediator.
        Parameters:
        parentInterfaceName - The interface name of the business object mediator.
        Returns:
        A collection of part mediator interfaces defined for a given business object mediator.
      • getPartMediatorClassAndProperties

        public java.util.Collection getPartMediatorClassAndProperties(java.lang.Class parentInterfaceName,
                                                                      java.lang.Class interfaceName)
        This method returns the list of part mediator class and properties for a given mediator.
        Parameters:
        parentInterfaceName - The interface name of the business object mediator.
        interfaceName - The interface name of the business object part mediator.
        Returns:
        A collection of an object array where the first element is the implementation class of the part mediator and the second element is the properties.
      • getPartMediatorInstances

        public java.util.Collection getPartMediatorInstances(java.lang.Class parentInterfaceName,
                                                             java.lang.Class interfaceName)
                                                      throws java.lang.Exception
        This method will return a list of part mediator implementations that is associated with the given parent mediator and part mediator interface. If no implementations are found, then a null list is returned.
        Parameters:
        parentInterfaceName - The parent mediator interface that owns the part mediator.
        interfaceName - The part mediator of the implementation to return.
        Returns:
        A list of part mediator implementations for the specified parent mediator and part mediator interface.
        Throws:
        java.lang.Exception - A problem instantiating the mediator implementation.
      • getReadBusinessObjectPartMediators

        public java.util.List getReadBusinessObjectPartMediators()
        Get the mediators configured for the noun part List>
        Returns:
        The read part mediator classes for this noun
      • getChangeBusinessObjectPartMediators

        public java.util.Collection getChangeBusinessObjectPartMediators()
        Get the mediators configured for the noun part List>
        Returns:
        The read part mediator classes for this noun
      • getChangeBusinessObjectPartMediatorsMap

        public java.util.Map getChangeBusinessObjectPartMediatorsMap()
        Get the mediators configured for the noun part Map<,List>>
        Returns:
        The read part mediator classes for this noun
      • getChangeBusinessObjectNounPartMediatorAccessProfiles

        public java.util.Map getChangeBusinessObjectNounPartMediatorAccessProfiles()
        The method returns the access profile configured for the noun part. Map<>,Sring>
        Returns:
        The access profiles for this change noun part mediators.
      • getChangeBusinessObjectNounMediatorAccessProfiles

        public java.util.Map getChangeBusinessObjectNounMediatorAccessProfiles()
        The method returns the access profile configured for the noun. Map<>,Sring>
        Returns:
        The access profiles for this change noun mediators.
      • getChangeBusinessObjectPartMediator

        public ChangeBusinessObjectPartMediator getChangeBusinessObjectPartMediator(java.lang.Object aNoun,
                                                                                    java.lang.Object aNounPart)
                                                                             throws java.lang.Exception
        Get change business object part mediator
        Parameters:
        aNoun - The noun
        aNounPart - The part within the noun
        Returns:
        ChangeBusinessObjectPartMediator
        Throws:
        java.lang.Exception
      • getReadBusinessObjectMediator

        public ReadBusinessObjectMediator getReadBusinessObjectMediator()
                                                                 throws java.lang.Exception
        Get read mediator for physical to logical transformation
        Returns:
        value The read mediator instance
        Throws:
        java.lang.Exception
      • getUpdateBusinessObjectMediator

        public ChangeBusinessObjectMediator getUpdateBusinessObjectMediator()
                                                                     throws java.lang.Exception
        Get update mediator for logical to physical transformation
        Returns:
        value The change mediator instance
        Throws:
        java.lang.Exception
      • getReadBusinessObjectMediatorClass

        public java.lang.Class getReadBusinessObjectMediatorClass()
                                                           throws java.lang.Exception
        Get read mediator class
        Returns:
        value
        Throws:
        java.lang.Exception
      • getUpdateBusinessObjectMediatorClass

        public java.lang.Class getUpdateBusinessObjectMediatorClass()
                                                             throws java.lang.Exception
        Get update mediator class
        Returns:
        value
        Throws:
        java.lang.Exception
      • setReadNounPartMediators

        public void setReadNounPartMediators(java.util.List listReadNounPartTask)
        Set read part mediators
        Parameters:
        listReadNounPartTask -
      • setUpdateNounPartMediators

        public void setUpdateNounPartMediators(java.util.Map mapUpdateNounPartTask)
        Set the update noun part mediators
        Parameters:
        mapUpdateNounPartTask -
      • setChangeBusinessObjectNounMediatorAccessProfiles

        public void setChangeBusinessObjectNounMediatorAccessProfiles(java.util.Map mapUpdateNounAccessProfile)
        The method set the access profile configured for the noun. Map<>,Sring>
        Parameters:
        mapUpdateNounAccessProfile - The change noun mediator access profiles for this noun
      • setChangeBusinessObjectNounPartMediatorAccessProfiles

        public void setChangeBusinessObjectNounPartMediatorAccessProfiles(java.util.Map mapUpdateNounPartAccessProfile)
        The method set the access profile configured for the noun part. Map<>,Sring>
        Parameters:
        mapUpdateNounPartAccessProfile - The change noun part mediator access profiles for this noun
      • getNounInterfaceClass

        public java.lang.Class getNounInterfaceClass()
        Get the noun interface class
        Returns:
        value
      • setNounInterfaceClass

        public void setNounInterfaceClass(java.lang.Class nounInterfaceClass)
        Set the noun interface class
        Parameters:
        nounInterfaceClass -
      • getPhysicalEntityInterfaceClass

        public java.lang.Class getPhysicalEntityInterfaceClass()
        Get the physical entity interface class
        Returns:
        value
      • setPhysicalEntityInterfaceClass

        public void setPhysicalEntityInterfaceClass(java.lang.Class physicalEntityInterfaceClass)
        Set the physical entity interface class
        Parameters:
        physicalEntityInterfaceClass -
      • setReadBusinessObjectMediatorClass

        public void setReadBusinessObjectMediatorClass(java.lang.Class readBusinessObjectMediator)
        Set the read business object mediator
        Parameters:
        readBusinessObjectMediator -
      • setReadBusinessObjectMediatorClass

        public void setReadBusinessObjectMediatorClass(java.lang.Class readBusinessObjectMediator,
                                                       java.util.Map properties)
        Set the read business object mediator
        Parameters:
        readBusinessObjectMediator -
        properties - The properties of the mediator.
      • setUpdateBusinessObjectMediatorClass

        public void setUpdateBusinessObjectMediatorClass(java.lang.Class updateBusinessObjectMediator)
        Set the change business object mediator
        Parameters:
        updateBusinessObjectMediator -
      • setUpdateBusinessObjectMediatorClass

        public void setUpdateBusinessObjectMediatorClass(java.lang.Class updateBusinessObjectMediator,
                                                         java.util.Map properties)
        Set the change business object mediator
        Parameters:
        updateBusinessObjectMediator -
        properties - The properties of the mediator.
      • getNounPartAttributeMapping

        public java.util.List getNounPartAttributeMapping()
        Return the noun part attribute mappings
        Returns:
        noun part attribute list
      • setNounAttributeMappingConfig

        public void setNounAttributeMappingConfig(BusinessObjectAttributeMappingConfig nounAttributeMapping)
        Set the noun attribute mapping
        Parameters:
        nounAttributeMapping -
      • getNounPartAttributeMapping

        public BusinessObjectAttributeMappingConfig getNounPartAttributeMapping(java.lang.Object aLogicalObject,
                                                                                java.lang.Object aPhysicalObject)
        Get the attributes for the given logical object and physical object
        Parameters:
        aLogicalObject -
        aPhysicalObject -
        Returns:
        BusinessObjectAttributeMappingConfig
      • getComponentId

        public java.lang.String getComponentId()
        Get the component id
        Returns:
        Component Id
      • trimToSize

        public void trimToSize()
        Sets the capacity of the ArrayList objects used by this object to their sizes. Call this during initialization, to minimize the long term persistent footprint.