com.ibm.commerce.context.base

Interface ContextSPI

    • Field Summary

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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      void clear()
      This method resets this context's instance variables to their uninitialized values.
      java.lang.String getContextSerializedString()
      This method returns the string representation of this context.
      void initialize(ActivityToken token, com.ibm.commerce.component.contextservice.ActivityData initData)
      This method initializes this context with the given initialization data.
      void initialize(ActivityToken oldToken, ActivityToken token, com.ibm.commerce.component.contextservice.ActivityData initData)
      This method initializes this context based on a given existing activity's context and updates it based on given initialization data.
      boolean isDirty()
      This method checks whether this context is dirty.
      void postInvoke()
      This method is called by the endRequest() method of the business context service after request execution for any necessary cleanup.
      void preInvoke(com.ibm.commerce.component.contextservice.ActivityData sessionData)
      This method updates this context based on the given session data.
      void recalibrate()
      Reserved for IBM internal use.
      void reset()
      This method is called by the rollbackRequest() method of the business context service when a request is rolled back.
      void setContextSerializedString(ActivityToken token, java.lang.String serValue)
      This method populates this context from a given string representation.
    • Field Detail

      • COPYRIGHT

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

      • initialize

        void initialize(ActivityToken token,
                        com.ibm.commerce.component.contextservice.ActivityData initData)
                 throws BusinessContextException
        This method initializes this context with the given initialization data. This method is called by the begin() method of the business context service when an activity is created. It should begin by setting this context's activity token instance variable to token.
        Parameters:
        token - the activity token that this context is to be associated with
        initData - the initialization data
        Throws:
        BusinessContextException - on any error encountered
      • preInvoke

        void preInvoke(com.ibm.commerce.component.contextservice.ActivityData sessionData)
                throws BusinessContextException
        This method updates this context based on the given session data. This method is called by the startRequest() method of the business context service before request execution.
        Parameters:
        sessionData - the map of name-value pairs for the parameters that are passed in the request
        Throws:
        BusinessContextException - on any error encountered
      • postInvoke

        void postInvoke()
                 throws BusinessContextException
        This method is called by the endRequest() method of the business context service after request execution for any necessary cleanup.
        Throws:
        BusinessContextException - on any error encountered
      • initialize

        void initialize(ActivityToken oldToken,
                        ActivityToken token,
                        com.ibm.commerce.component.contextservice.ActivityData initData)
                 throws BusinessContextException
        This method initializes this context based on a given existing activity's context and updates it based on given initialization data. This method is called by the copyActivity() method of the business context service when a user switches from one store to another. The method should begin by setting this context's activity token instance variable to token.
        Parameters:
        oldToken - the activity token for the given existing activity that this context is to be based upon
        token - the activity token that this context is to be associated with
        initData - the initialization data
        Throws:
        BusinessContextException - on any error encountered
      • getContextSerializedString

        java.lang.String getContextSerializedString()
                                             throws BusinessContextException
        This method returns the string representation of this context.
        Returns:
        the string representation of this context
        Throws:
        BusinessContextException - on any error encountered
      • setContextSerializedString

        void setContextSerializedString(ActivityToken token,
                                        java.lang.String serValue)
                                 throws BusinessContextException
        This method populates this context from a given string representation.
        Parameters:
        token - the token that identifies this context's activity
        serValue - the string representation of a context
        Throws:
        BusinessContextException - on any error encountered
      • isDirty

        boolean isDirty()
        This method checks whether this context is dirty.
        Returns:
        true if the context is dirty; false otherwise
      • recalibrate

        void recalibrate()
                  throws BusinessContextException
        Reserved for IBM internal use. This method recalibrates this context. This method is called by the synchronizeContexts() method of the business context service in response to changes to the base context.
        Throws:
        BusinessContextException - on any error encountered
      • clear

        void clear()
        This method resets this context's instance variables to their uninitialized values. This method is called when this ContextSPI object is returned to its object pool.