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

Class AbstractChangeHistoryServiceDelegateImpl

  • java.lang.Object
    • com.ibm.commerce.foundation.server.services.changehistory.utility.AbstractChangeHistoryServiceDelegateImpl
  • All Implemented Interfaces:
    com.ibm.commerce.foundation.internal.server.services.changehistory.utility.ChangeHistoryService
    Direct Known Subclasses:
    AbstractChangeHistoryServiceImpl


    public abstract class AbstractChangeHistoryServiceDelegateImpl
    extends java.lang.Object
    implements com.ibm.commerce.foundation.internal.server.services.changehistory.utility.ChangeHistoryService
    This class is the abstract implementation of the ChangeHistoryService interface. The subclasses need overwrite some of the methods to provide the specific implementations.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Object getChangedDataObject()
      To return the changed data object
      java.util.List<com.ibm.commerce.foundation.internal.server.services.changehistory.beans.ChangeHistoryExtendedData> getExtendedDataList()
      This method will retrieve extended data for this change history record.
      com.ibm.commerce.foundation.internal.server.services.changehistory.utility.NounConfiguration getNounConfiguration()
      Return the nounConfiguration
      java.lang.String getResolvedCMCObject()
      This method will return which type this noun will be displayed in the change history UI.
      java.lang.String getStoreEntityId()
      To return the storeent_id which the change happened on, the storeId will be shown in the change history UI
      abstract java.lang.Long getUniqueID()
      Retrieve uniqueID from the noun by using the specified uniqueIDXpath
      java.lang.String getUniqueObjectCode()
      Get the uniqueObjectCode.
      void setChangedDataObject(java.lang.Object dataObject)
      Set the changed data object.
      void setConnection(java.sql.Connection conn)
      Set the connection which component service implementation could use to query database.
      void setNounConfiguration(com.ibm.commerce.foundation.internal.server.services.changehistory.utility.NounConfiguration nounConfiguration)
      Set the noun configuration, the configuration is retrieved from the wc-business-object-mediator.xml which include the nounName and the service implementation, the service implementation will be used to provide the information needed by change history.
      void setStoreEntityId(java.lang.String storeent_id)
      To set the storeent_id which the change happened on
      void setTaskgrp(java.lang.String taskGrp)
      Set the TaskGrp which contains the change.
      void setWorkspace(java.lang.String strWorkspace)
      Set the Workspace which contains the change.
      • Methods inherited from class java.lang.Object

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

      • AbstractChangeHistoryServiceDelegateImpl

        public AbstractChangeHistoryServiceDelegateImpl()
    • Method Detail

      • setNounConfiguration

        public void setNounConfiguration(com.ibm.commerce.foundation.internal.server.services.changehistory.utility.NounConfiguration nounConfiguration)
        Set the noun configuration, the configuration is retrieved from the wc-business-object-mediator.xml which include the nounName and the service implementation, the service implementation will be used to provide the information needed by change history.
        Specified by:
        setNounConfiguration in interface com.ibm.commerce.foundation.internal.server.services.changehistory.utility.ChangeHistoryService
        Parameters:
        nounConfiguration - The changed noun configuration
        See Also:
        com.ibm.commerce.content.changehistory.helper.ChangeHistoryService#getNounConfiguration()
      • getNounConfiguration

        public com.ibm.commerce.foundation.internal.server.services.changehistory.utility.NounConfiguration getNounConfiguration()
        Return the nounConfiguration
        Specified by:
        getNounConfiguration in interface com.ibm.commerce.foundation.internal.server.services.changehistory.utility.ChangeHistoryService
        Returns:
        NounConfiguration
        See Also:
        com.ibm.commerce.content.changehistory.helper.ChangeHistoryService#getNounConfiguration()
      • getUniqueID

        public abstract java.lang.Long getUniqueID()
        Retrieve uniqueID from the noun by using the specified uniqueIDXpath
        Specified by:
        getUniqueID in interface com.ibm.commerce.foundation.internal.server.services.changehistory.utility.ChangeHistoryService
        Returns:
        Long The unique ID of this noun.
      • getUniqueObjectCode

        public java.lang.String getUniqueObjectCode()
                                             throws com.ibm.commerce.foundation.internal.server.services.changehistory.exception.ChangeHistoryApplicationException
        Get the uniqueObjectCode. UniqueObjectCode is required by change history, if it could be retrieved from the changedNoun in the request BOD, just return it. Otherwise, use the get service to refresh the noun, then to retrieve again. If there is problem retrieving the objectCode, unknow object will be returned
        Specified by:
        getUniqueObjectCode in interface com.ibm.commerce.foundation.internal.server.services.changehistory.utility.ChangeHistoryService
        Returns:
        String The uniqueObjectCode for this uniqueID
        Throws:
        com.ibm.commerce.foundation.internal.server.services.changehistory.exception.ChangeHistoryApplicationException - If there is any error when resolve unique object code
      • getResolvedCMCObject

        public java.lang.String getResolvedCMCObject()
                                              throws com.ibm.commerce.foundation.internal.server.services.changehistory.exception.ChangeHistoryApplicationException
        This method will return which type this noun will be displayed in the change history UI. By default it is the noun name. Component subclass could override this method if it want to return different CMC display type for this noun. For example, catalog entry need make difference on ProductSKU, CatalogGroupSKU, ItemSKU etc.
        Specified by:
        getResolvedCMCObject in interface com.ibm.commerce.foundation.internal.server.services.changehistory.utility.ChangeHistoryService
        Returns:
        String which will be displayed in the change history UI
        Throws:
        com.ibm.commerce.foundation.internal.server.services.changehistory.exception.ChangeHistoryApplicationException - A problem when retrieve the CMC object
      • setChangedDataObject

        public void setChangedDataObject(java.lang.Object dataObject)
        Set the changed data object. This is the noun which is being passed in the request BOD.
        Specified by:
        setChangedDataObject in interface com.ibm.commerce.foundation.internal.server.services.changehistory.utility.ChangeHistoryService
        Parameters:
        dataObject - The data object to set
        See Also:
        com.ibm.commerce.content.changehistory.helper.ChangeHistoryService#setChangedDataObject(java.lang.Object)
      • getChangedDataObject

        public java.lang.Object getChangedDataObject()
        To return the changed data object
        Specified by:
        getChangedDataObject in interface com.ibm.commerce.foundation.internal.server.services.changehistory.utility.ChangeHistoryService
        Returns:
        the changedDataObject
      • getStoreEntityId

        public java.lang.String getStoreEntityId()
        To return the storeent_id which the change happened on, the storeId will be shown in the change history UI
        Specified by:
        getStoreEntityId in interface com.ibm.commerce.foundation.internal.server.services.changehistory.utility.ChangeHistoryService
        Returns:
        the storeent_id where change happened
      • setStoreEntityId

        public void setStoreEntityId(java.lang.String storeent_id)
        To set the storeent_id which the change happened on
        Specified by:
        setStoreEntityId in interface com.ibm.commerce.foundation.internal.server.services.changehistory.utility.ChangeHistoryService
        Parameters:
        storeent_id - The storeent_Id for the changed object
      • getExtendedDataList

        public java.util.List<com.ibm.commerce.foundation.internal.server.services.changehistory.beans.ChangeHistoryExtendedData> getExtendedDataList()
        This method will retrieve extended data for this change history record. Some component may need catch some addtional information from service or dataload, those information could be specified in the component's subclass, and will be saved into the extent data table (CMEXTDATA). The sample usage could be catalogId which is needed to open the catalogEntry object. Another sample usage could be xpath in the BOD, then the consumer may know what was changed in this change request. Component subclass could override this method to specify extend information.
        Specified by:
        getExtendedDataList in interface com.ibm.commerce.foundation.internal.server.services.changehistory.utility.ChangeHistoryService
        Returns:
        List
      • setConnection

        public void setConnection(java.sql.Connection conn)
        Set the connection which component service implementation could use to query database.
        Specified by:
        setConnection in interface com.ibm.commerce.foundation.internal.server.services.changehistory.utility.ChangeHistoryService
        Parameters:
        conn - The connection to the database.
      • setWorkspace

        public void setWorkspace(java.lang.String strWorkspace)
        Set the Workspace which contains the change.
        Specified by:
        setWorkspace in interface com.ibm.commerce.foundation.internal.server.services.changehistory.utility.ChangeHistoryService
        Parameters:
        strWorkspace -
      • setTaskgrp

        public void setTaskgrp(java.lang.String taskGrp)
        Set the TaskGrp which contains the change.
        Specified by:
        setTaskgrp in interface com.ibm.commerce.foundation.internal.server.services.changehistory.utility.ChangeHistoryService
        Parameters:
        taskGrp -