com.ibm.commerce.foundation.server.services.changehistory.mediator

Class EchoBusinessObjectChangeHistoryDelegateMediatorImpl

  • All Implemented Interfaces:
    BusinessObjectMediator, com.ibm.commerce.foundation.server.services.dataaccess.bom.mediator.EchoBusinessObjectChangeHistoryMediator


    public class EchoBusinessObjectChangeHistoryDelegateMediatorImpl
    extends AbstractBusinessObjectMediatorImpl
    implements com.ibm.commerce.foundation.server.services.dataaccess.bom.mediator.EchoBusinessObjectChangeHistoryMediator
    This class is the implementation of the echo change history mediator, this mediator will capture the noun change object and to populate such change into CMPRMYOBJ table.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM Copyright notice field.
      • Fields inherited from interface com.ibm.commerce.foundation.server.services.dataaccess.bom.mediator.EchoBusinessObjectChangeHistoryMediator

        ACTION_ADD_STRING, ACTION_CHANGE_STRING, ACTION_CREATE_STRING, ACTION_DELETE, ACTION_DELETE_STRING, ACTION_NEW, ACTION_RESTORE_STRING, ACTION_UPDATE, BASE_TASKGRP, BASE_WORKSPACE
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void createChangeHistory(com.ibm.commerce.foundation.internal.server.services.changehistory.beans.TaskGroupChangeHistoryDataSet changeHistoryData)
      To insert change history data
      void createChangeHistoryExtendedData(com.ibm.commerce.foundation.internal.server.services.changehistory.beans.ChangeHistoryExtendedData extendedData)
      To insert change history extended data
      void deleteChangeHistory(com.ibm.commerce.foundation.internal.server.services.changehistory.beans.TaskGroupChangeHistoryDataSet changeHistoryDataToRemove)
      If the action in the existing data is "N" which is the data is new to the workspace, , and new action is to update then just to keep the N action.
      void echoChangeHistory(java.lang.String actionString)
      This method will populate change history into CMPRMYOBJ table, for the component specific information, will be saved into CMEXTDATA.
      void echoChangeHistory(com.ibm.commerce.foundation.internal.server.services.changehistory.beans.TaskGroupChangeHistoryDataSet changeHistoryData)
      This method will populate change history into CMPRMYOBJ table, for the component specific information, will be saved into CMEXTDATA.
      com.ibm.commerce.foundation.internal.server.services.changehistory.beans.TaskGroupChangeHistoryDataSet getChangeHistoryData()
      This method return the change history data to be caught by this mediator
      static com.ibm.commerce.foundation.internal.server.services.changehistory.utility.ChangeHistoryService getClassForAddtionalService(java.lang.String className)
      Gets the defined service implementation class for the noun, this class is specified in the history configuration file
      void initialize(commonj.sdo.DataObject noun, short source)
      Initialize the change mediator with the nouns submitted for the change request
      void initializeConfig(BusinessObjectMediatorConfig aConfig, java.util.Map properties)
      This method initializes the change history mediator by extract the configuration properties that controls how the noun's change will be saved.
      void populateContextData(com.ibm.commerce.foundation.internal.server.services.changehistory.beans.TaskGroupChangeHistoryDataSet changeHistoryData)
      This method set the workspace data to ChangeHistory
      void updateChangeHistory(com.ibm.commerce.foundation.internal.server.services.changehistory.beans.TaskGroupChangeHistoryDataSet newChangeHistoryData, com.ibm.commerce.foundation.internal.server.services.changehistory.beans.TaskGroupChangeHistoryDataSet oldChangeHistoryData)
      For the unique index(workspace+taskgrp+objectId+objectType+storeent_id), if there was any change history, then need to update the record to record the last change on the last track by the last conductor, with last action
      void updateChangeHistoryExtendedData(com.ibm.commerce.foundation.internal.server.services.changehistory.beans.ChangeHistoryExtendedData extendedData)
      To update change history extended data
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • EchoBusinessObjectChangeHistoryDelegateMediatorImpl

        public EchoBusinessObjectChangeHistoryDelegateMediatorImpl()
        Creates an instance of a change history mediator that uses CMPRMYOBJ to store the change history information.
    • Method Detail

      • populateContextData

        public void populateContextData(com.ibm.commerce.foundation.internal.server.services.changehistory.beans.TaskGroupChangeHistoryDataSet changeHistoryData)
                                 throws com.ibm.commerce.foundation.internal.server.services.changehistory.exception.ChangeHistoryApplicationException
        This method set the workspace data to ChangeHistory
        Specified by:
        populateContextData in interface com.ibm.commerce.foundation.server.services.dataaccess.bom.mediator.EchoBusinessObjectChangeHistoryMediator
        Parameters:
        changeHistoryData - The activity token of the request.
        Throws:
        com.ibm.commerce.foundation.internal.server.services.changehistory.exception.ChangeHistoryApplicationException - When there is any error during set context information
      • getClassForAddtionalService

        public static com.ibm.commerce.foundation.internal.server.services.changehistory.utility.ChangeHistoryService getClassForAddtionalService(java.lang.String className)
                                                                                                                                           throws com.ibm.commerce.foundation.internal.server.services.changehistory.exception.ChangeHistoryApplicationException
        Gets the defined service implementation class for the noun, this class is specified in the history configuration file
        Parameters:
        className - The name for the noun
        Returns:
        The service implementation class which could be used to get some additional data
        Throws:
        com.ibm.commerce.foundation.internal.server.services.changehistory.exception.ChangeHistoryApplicationException - This exception is thrown if the change history service implementation class cannot be found or initiated.
      • echoChangeHistory

        public void echoChangeHistory(com.ibm.commerce.foundation.internal.server.services.changehistory.beans.TaskGroupChangeHistoryDataSet changeHistoryData)

        This method will populate change history into CMPRMYOBJ table, for the component specific information, will be saved into CMEXTDATA.

        Specified by:
        echoChangeHistory in interface com.ibm.commerce.foundation.server.services.dataaccess.bom.mediator.EchoBusinessObjectChangeHistoryMediator
        Parameters:
        changeHistoryData - the change history data
      • getChangeHistoryData

        public com.ibm.commerce.foundation.internal.server.services.changehistory.beans.TaskGroupChangeHistoryDataSet getChangeHistoryData()
        This method return the change history data to be caught by this mediator
        Specified by:
        getChangeHistoryData in interface com.ibm.commerce.foundation.server.services.dataaccess.bom.mediator.EchoBusinessObjectChangeHistoryMediator
        Returns:
        TaskGroupChangeHistoryDataSet
      • echoChangeHistory

        public void echoChangeHistory(java.lang.String actionString)

        This method will populate change history into CMPRMYOBJ table, for the component specific information, will be saved into CMEXTDATA.

        Specified by:
        echoChangeHistory in interface com.ibm.commerce.foundation.server.services.dataaccess.bom.mediator.EchoBusinessObjectChangeHistoryMediator
        Parameters:
        actionString - the action which has been done on the noun
      • initialize

        public void initialize(commonj.sdo.DataObject noun,
                               short source)
        Initialize the change mediator with the nouns submitted for the change request
        Specified by:
        initialize in interface com.ibm.commerce.foundation.server.services.dataaccess.bom.mediator.EchoBusinessObjectChangeHistoryMediator
        Parameters:
        noun - Containing the noun parts that have changes.
        source - Contain where the change history came from
      • updateChangeHistory

        public void updateChangeHistory(com.ibm.commerce.foundation.internal.server.services.changehistory.beans.TaskGroupChangeHistoryDataSet newChangeHistoryData,
                                        com.ibm.commerce.foundation.internal.server.services.changehistory.beans.TaskGroupChangeHistoryDataSet oldChangeHistoryData)
                                 throws com.ibm.commerce.foundation.internal.server.services.changehistory.exception.ChangeHistoryApplicationException
        For the unique index(workspace+taskgrp+objectId+objectType+storeent_id), if there was any change history, then need to update the record to record the last change on the last track by the last conductor, with last action
        Parameters:
        newChangeHistoryData - Contain the history data to be updated
        oldChangeHistoryData - Contains the old change hisotry data
        Throws:
        com.ibm.commerce.foundation.internal.server.services.changehistory.exception.ChangeHistoryApplicationException - When there is error when update the existing record
      • deleteChangeHistory

        public void deleteChangeHistory(com.ibm.commerce.foundation.internal.server.services.changehistory.beans.TaskGroupChangeHistoryDataSet changeHistoryDataToRemove)
                                 throws com.ibm.commerce.foundation.internal.server.services.changehistory.exception.ChangeHistoryApplicationException
        If the action in the existing data is "N" which is the data is new to the workspace, , and new action is to update then just to keep the N action. and if the old action is N, the new action is to delete, then to remove the change history and need not keep it.
        Parameters:
        changeHistoryDataToRemove - Contains the old change history data
        Throws:
        com.ibm.commerce.foundation.internal.server.services.changehistory.exception.ChangeHistoryApplicationException - When there is error when delete the existing record
      • createChangeHistory

        public void createChangeHistory(com.ibm.commerce.foundation.internal.server.services.changehistory.beans.TaskGroupChangeHistoryDataSet changeHistoryData)
                                 throws com.ibm.commerce.foundation.internal.server.services.changehistory.exception.ChangeHistoryApplicationException
        To insert change history data
        Parameters:
        changeHistoryData - Contain the history data to be updated
        Throws:
        com.ibm.commerce.foundation.internal.server.services.changehistory.exception.ChangeHistoryApplicationException - When there is error to create the history data
      • createChangeHistoryExtendedData

        public void createChangeHistoryExtendedData(com.ibm.commerce.foundation.internal.server.services.changehistory.beans.ChangeHistoryExtendedData extendedData)
                                             throws com.ibm.commerce.foundation.internal.server.services.changehistory.exception.ChangeHistoryApplicationException
        To insert change history extended data
        Parameters:
        extendedData - Contain the history data to be updated
        Throws:
        com.ibm.commerce.foundation.internal.server.services.changehistory.exception.ChangeHistoryApplicationException - When there is error to create the history data
      • updateChangeHistoryExtendedData

        public void updateChangeHistoryExtendedData(com.ibm.commerce.foundation.internal.server.services.changehistory.beans.ChangeHistoryExtendedData extendedData)
                                             throws com.ibm.commerce.foundation.internal.server.services.changehistory.exception.ChangeHistoryApplicationException
        To update change history extended data
        Parameters:
        extendedData - Contain the history data to be updated
        Throws:
        com.ibm.commerce.foundation.internal.server.services.changehistory.exception.ChangeHistoryApplicationException - When there is error to create the history data