public interface ContextSPI
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
| 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.
|
static final java.lang.String COPYRIGHT
void initialize(ActivityToken token, com.ibm.commerce.component.contextservice.ActivityData initData) throws BusinessContextException
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.token - the activity token that this context is to be associated withinitData - the initialization dataBusinessContextException - on any error encounteredvoid preInvoke(com.ibm.commerce.component.contextservice.ActivityData sessionData)
throws BusinessContextException
startRequest() method of the business context service before request execution.sessionData - the map of name-value pairs for the parameters that are passed in the requestBusinessContextException - on any error encounteredvoid postInvoke()
throws BusinessContextException
endRequest() method of the business context service
after request execution for any necessary cleanup.BusinessContextException - on any error encounteredvoid reset()
throws BusinessContextException
rollbackRequest() method of the business context service
when a request is rolled back.BusinessContextException - on any error encounteredvoid initialize(ActivityToken oldToken, ActivityToken token, com.ibm.commerce.component.contextservice.ActivityData initData) throws BusinessContextException
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.oldToken - the activity token for the given existing activity that this context is to be based upontoken - the activity token that this context is to be associated withinitData - the initialization dataBusinessContextException - on any error encounteredjava.lang.String getContextSerializedString()
throws BusinessContextException
BusinessContextException - on any error encounteredvoid setContextSerializedString(ActivityToken token, java.lang.String serValue) throws BusinessContextException
token - the token that identifies this context's activityserValue - the string representation of a contextBusinessContextException - on any error encounteredboolean isDirty()
true if the context is dirty; false otherwisevoid recalibrate()
throws BusinessContextException
synchronizeContexts() method of the business context service
in response to changes to the base context.BusinessContextException - on any error encounteredvoid clear()
ContextSPI object is returned to its object pool.