com.ibm.commerce.foundation.dataload.businessobjectmediator

Interface BusinessObjectMediator

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      The internal copyright field.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      void close()
      This method will perform cleanup on the business object mediator.
      void execute(java.lang.Object obj)
      This method will resolve identifiers for the populated data object and call the configured data writer to write the data out to the data store.
      ConfigProperties getConfigProperties()
      Returns the instance of the ConfigProperties of the BusinessObjectWriter.
      void init()
      This method performs some initialization for the business object mediator.
      ConfigProperties initConfig(org.w3c.dom.Node businessObjectMediatorNode, ConfigProperties parentConfigProperties)
      This method parses the BusinessObjectMediator xml node read in from the business object configuration file and stores the configuration in memory.
      void postProcess()
      This method performs any post processing of the data after the data has been written to the data store.
      void preProcess(java.lang.Object obj)
      This method performs any pre-processing of the data if needed.
      void setConfigProperties(ConfigProperties aConfigProperties)
      Sets the configuration properties for this business object mediator.
    • Field Detail

      • COPYRIGHT

        static final java.lang.String COPYRIGHT
        The internal copyright field.
        See Also:
        Constant Field Values
    • Method Detail

      • getConfigProperties

        ConfigProperties getConfigProperties()

        Returns the instance of the ConfigProperties of the BusinessObjectWriter.

        Call this method when you need to get specific properties from the configuration properties.

        Returns:
        The configuration properties for this business object mediator.
      • setConfigProperties

        void setConfigProperties(ConfigProperties aConfigProperties)

        Sets the configuration properties for this business object mediator.

        This method is not normally called unless overriding the configuration properties for this business object mediator is required.

        Parameters:
        aConfigProperties - The configuration properties for this business object mediator.
      • init

        void init()
           throws DataLoadException

        This method performs some initialization for the business object mediator.

        Throws:
        DataLoadException - An application exception will be thrown if there was a problem initializing the business object mediator.
      • initConfig

        ConfigProperties initConfig(org.w3c.dom.Node businessObjectMediatorNode,
                                    ConfigProperties parentConfigProperties)
                             throws DataLoadException

        This method parses the BusinessObjectMediator xml node read in from the business object configuration file and stores the configuration in memory.

        Parameters:
        businessObjectMediatorNode - The BusinessObjectMediator xml node read in from the business object configuration file.
        parentConfigProperties - The configuration properties for the parent business object builder of this data reader.
        Returns:
        ConfigProperties The initialized configuration for this business object mediator.
        Throws:
        DataLoadException - An application exception will be thrown if there was a problem initializing the configuration for the business object mediator.
      • preProcess

        void preProcess(java.lang.Object obj)
                 throws DataLoadException

        This method performs any pre-processing of the data if needed.

        This method normally does not have any function. Implement this method only if any pre-processing of the populated data object is needed.

        Parameters:
        obj - The data object data load with input data read in from the data reader.
        Throws:
        DataLoadException - An application exception will be thrown is there was a problem preproccessing the data from the data object.
      • execute

        void execute(java.lang.Object obj)
              throws DataLoadException

        This method will resolve identifiers for the populated data object and call the configured data writer to write the data out to the data store.

        Parameters:
        obj - The populated and pre-processed data object.
        Throws:
        DataLoadException - An application exception will be thrown is there was a problem resolving the IDs or writing the data.
      • postProcess

        void postProcess()
                  throws DataLoadException

        This method performs any post processing of the data after the data has been written to the data store.

        This method normally does not have any function. Implement this method only if any post processing of the data loaded is needed.

        Throws:
        DataLoadException - An application exception will be thrown is there was a problem post processing the loaded data.
      • close

        void close()
            throws DataLoadException

        This method will perform cleanup on the business object mediator. It will attempt to close all of the data writers configured for this business object mediator.

        Throws:
        DataLoadException - An application exception will be thrown if there was a problem closing the business object mediator or its data writers.