com.ibm.commerce.foundation.dataload.config

Class ConfigProperties

  • java.lang.Object
    • com.ibm.commerce.foundation.dataload.config.ConfigProperties


  • public class ConfigProperties
    extends java.lang.Object

    This class models the configuration of a dataload component in the dataload configuration and business object configurations files.

    You can traverse from the current dataload component to its parents component and up to the root configuration.

    Each node contains a property map and a map of its children node config properties and a pointer to its parent.

    • Constructor Summary

      Constructors 
      Constructor and Description
      ConfigProperties(ConfigProperties aParentConfigProperties)
      This constructor will initializes instance variables and save the parent nodes configuration properties.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.util.Map getAttributeMap()
      The method returns the set of properties read in from the configuration files.
      java.lang.String getBusinessContextProperty(java.lang.String propertyName)
      It returns a business context value for a given property name.
      java.util.Map getChildConfigPropertiesMap()
      The method returns the set of properties read in from the configuration files.
      java.util.Map getDataExtensionPropertyMap()
      This method will return the extension loader properties read in from the data load configuration stored in a Map.
      java.lang.String getDataLoadComponentType()
      The method returns the data load component type this configuration is associated with.
      java.util.Map getDataSourcePropertyMap()
      This method will return the datasource properties read in from the data load configuration stored in a Map.
      java.util.Map getDataWriterPropertyMap()
      This method will return the data writer properties read in from the data load configuration stored in a Map.
      java.util.Map getIDResolverPropertyMap()
      This method will return the id resolver properties read in from the data load configuration stored in a Map.
      java.lang.String getLocalProperty(java.lang.String propertyName)
      This method returns the value of a property read in from the data load configuration files.
      java.util.Map getMergedPropertiesMap()
      Gets the merged properties Map.
      ConfigProperties getParentConfigProperties()
      The method returns the configuration properties of the parent XML node.
      java.lang.String getParentDataLoaderUniqueName()
      This method returns the unique name of the parent data loader of the data load component this configuration is association with.
      java.util.Map getPropertiesMap()
      The method returns the set of properties read in from the configuration files.
      java.lang.String getProperty(java.lang.String propertyName)
      This method returns the value of a property read in from the data load configuration files.
      java.util.Map getPropertyMapByGroupName(java.lang.String name)
      This method returns a group of properties stored in a map.
      ConfigProperties getRootConfigProperties()
      This method returns a the root configuration properties of the data load configuration.
      java.util.Map getTargetDatabasePropertyMap()
      This method will return the target database properties read in from the data load configuration stored in a Map.
      void setDataLoadComponentType(java.lang.String aDataLoadComponentType)
      The method sets the data load component type this configuration is associated with.
      java.lang.String toString()
      This method returns a String representation of the dataload configuration.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ConfigProperties

        public ConfigProperties(ConfigProperties aParentConfigProperties)

        This constructor will initializes instance variables and save the parent nodes configuration properties.

        If null is passed in as the parent configuration, this configuration will be treated as the root configuration.

        Parameters:
        aParentConfigProperties - The configuration properties of the parent XML node.
    • Method Detail

      • getParentDataLoaderUniqueName

        public java.lang.String getParentDataLoaderUniqueName()

        This method returns the unique name of the parent data loader of the data load component this configuration is association with.

        Returns:
        parentDataLoaderName The unique name of the parent data loader of the data load component this configuration is association with.
      • getPropertiesMap

        public java.util.Map getPropertiesMap()

        The method returns the set of properties read in from the configuration files.

        These properties include:
        • Properties which are name-value pairs.
        • Groups of name-value pairs, i.e. The key is a group name and the value is a Map that contains name-value pairs.
        Returns:
        Map The set of properties read in from the configuration files, stored in a Map.
      • getAttributeMap

        public java.util.Map getAttributeMap()

        The method returns the set of properties read in from the configuration files.

        These properties include:
        • Attributes which are name-value pairs.
        Returns:
        Map The set of attributes read in from the configuration files, stored in a Map.
      • getChildConfigPropertiesMap

        public java.util.Map getChildConfigPropertiesMap()

        The method returns the set of properties read in from the configuration files.

        These properties include:
        • Properties which are name-value pairs.
        • Groups of name-value pairs, i.e. The key is a group name and the value is a Map that contains name-value pairs.
        Returns:
        Map The set of properties read in from the configuration files, stored in a Map.
      • getParentConfigProperties

        public ConfigProperties getParentConfigProperties()

        The method returns the configuration properties of the parent XML node.

        Returns:
        ConfigProperties The configuration properties of the parent XML node.
      • getDataLoadComponentType

        public java.lang.String getDataLoadComponentType()

        The method returns the data load component type this configuration is associated with.

        It can be either:

        • DataLoadConstants.DL_DATA_LOADER
        • DataLoadConstants.DL_DATA_READER
        • DataLoadConstants.DL_BUSINESS_OBJECT_BUILDER
        • DataLoadConstants.DL_BUSINESS_OBJECT_MEDIATOR
        • DataLoadConstants.DL_DATA_WRITER

        Returns:
        String The data load component type this configuration is associated with.
      • setDataLoadComponentType

        public void setDataLoadComponentType(java.lang.String aDataLoadComponentType)

        The method sets the data load component type this configuration is associated with.

        It can be either:

        • DataLoadConstants.DL_DATA_LOADER
        • DataLoadConstants.DL_DATA_READER
        • DataLoadConstants.DL_BUSINESS_OBJECT_BUILDER
        • DataLoadConstants.DL_BUSINESS_OBJECT_MEDIATOR
        • DataLoadConstants.DL_DATA_WRITER

        Parameters:
        aDataLoadComponentType - The data load component type this configuration is associated with.
      • getLocalProperty

        public java.lang.String getLocalProperty(java.lang.String propertyName)

        This method returns the value of a property read in from the data load configuration files.

        This method does not traverse up the parent configuration properties to look for the property.

        Parameters:
        propertyName - The property name of the property you would like to retrieve the value for.
        Returns:
        The property value of the specified property.
      • getProperty

        public java.lang.String getProperty(java.lang.String propertyName)

        This method returns the value of a property read in from the data load configuration files.

        This method will traverse up the parent configuration properties up to the root to look for the property and will stop traversal if it finds the value in one of the parent configurations.

        Parameters:
        propertyName - The property name of the property you would like to retrieve the value for.
        Returns:
        The property value of the specified property.
      • getPropertyMapByGroupName

        public java.util.Map getPropertyMapByGroupName(java.lang.String name)

        This method returns a group of properties stored in a map.

        Parameters:
        name - The group name of the group of properties.
        Returns:
        A Map containing name-value pairs.
      • getRootConfigProperties

        public ConfigProperties getRootConfigProperties()

        This method returns a the root configuration properties of the data load configuration.

        Returns:
        ConfigProperties The root configuration properties of the data load configuration.
      • getTargetDatabasePropertyMap

        public java.util.Map getTargetDatabasePropertyMap()

        This method will return the target database properties read in from the data load configuration stored in a Map.

        Returns:
        Map The target database properties read in from the data load configuration stored in a Map.
      • getDataSourcePropertyMap

        public java.util.Map getDataSourcePropertyMap()

        This method will return the datasource properties read in from the data load configuration stored in a Map.

        Returns:
        Map The datasource properties read in from the data load configuration stored in a Map.
      • getDataExtensionPropertyMap

        public java.util.Map getDataExtensionPropertyMap()

        This method will return the extension loader properties read in from the data load configuration stored in a Map.

        Returns:
        Map The extension loader properties read in from the data load configuration stored in a Map.
      • getIDResolverPropertyMap

        public java.util.Map getIDResolverPropertyMap()

        This method will return the id resolver properties read in from the data load configuration stored in a Map.

        Returns:
        Map The id resolver properties read in from the data load configuration stored in a Map.
      • getDataWriterPropertyMap

        public java.util.Map getDataWriterPropertyMap()

        This method will return the data writer properties read in from the data load configuration stored in a Map.

        Returns:
        Map The data writer properties read in from the data load configuration stored in a Map.
      • getBusinessContextProperty

        public java.lang.String getBusinessContextProperty(java.lang.String propertyName)

        It returns a business context value for a given property name.

        If it cannot find the business context in the current node, it will traverse to its parents up to the root.

        Parameters:
        propertyName - The name of the property for which the value is to be retrieved from the business context.
        Returns:
        The value of the business context property.
      • toString

        public java.lang.String toString()

        This method returns a String representation of the dataload configuration.

        Overrides:
        toString in class java.lang.Object
        Returns:
        String A String representation of the dataload configuration.
      • getMergedPropertiesMap

        public java.util.Map getMergedPropertiesMap()
        Gets the merged properties Map.
        Returns:
        the merged properties Map.