public class GiftRegistryContextImpl extends AbstractContextImpl implements GiftRegistryContext, ContextSPI
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
static java.lang.String | SER_ELEMENT_SEP
The delimiter used in Vector and HashMap string representation
|
static java.lang.String | SER_KEY_SEP
The delimiter used in the key-value of the HashMap string representation
|
Constructor and Description |
---|
GiftRegistryContextImpl()
Creates the preview context.
|
Modifier and Type | Method and Description |
---|---|
void | clearContext()
Resets the attributes specific to this context.
|
void | copyContext(Context ctx)
Copy the content of the specified context to this context.
|
java.lang.Object[] | getContextAttributes()
This method returns an array of context attributes to be persisted.
|
java.lang.String | getContextName()
Returns the name of this context
|
java.lang.String | getCurrentExternalId()
Returns the current gift registry externalId that this shopper has accessed or managed
|
java.util.Vector | getExternalIdsAccessed()
Returns a vector of all the gift registry externalId's this user accessed this session
|
java.util.Vector | getExternalIdsAccessedByRelationship(java.lang.Integer relationship)
Returns a list of gift registry externalId's that this user has accessed or managed recently for which they have a particular relationship with.
|
java.util.Vector | getExternalIdsByRegistrantRelationship()
Returns a list of gift registry externalId's that this user has the Registrant or Co-Registrant relationship with.
|
java.lang.String | getGiftRegistryBeingManaged()
If isUserManagingARegistry() is true, it means that a gift registry is being managed by a shopper.
|
java.lang.String | getLastExternalIdAccessed()
Returns the last gift registry externalId that this shopper has accessed or managed
|
java.lang.Integer | getRegistryRelationship(java.lang.String externalId)
Returns the relationship of a registrant with regards to a known registry they accessed.
|
void | initializeContext(ActivityData initData)
Initializes the context with the initialization data.
|
void | initializeContext(ActivityData initData, Context ctx)
Initializes the context based on the context passed in as the argument and updates it using the initData.
|
boolean | isUserManagingARegistry()
Returns true if the user is currently managing a registry.
|
void | preInvokeContext(ActivityData sessionData)
Operation to perform at the beginning of each request.
|
void | removeAllAccessedExternalIds()
Removes all externalId's from the list of accessed registries for this user
|
java.lang.String | removeExternalIdAccessed(java.lang.String externalId)
Removes an externalId from the list of accessed registries for this user
|
void | setContextAttributes(java.lang.String[] ctxAttrs)
This method initializes the context from the specified list of attributes.
|
void | setExternalIdAccessed(java.lang.String externalId)
Adds to a list of gift registry externalId's this user has accessed.
|
void | setExternalIdAccessed(java.lang.String externalId, java.lang.Integer relationship)
Adds to a list of gift registry externalId's this user has accessed.
|
void | setUserManagingARegistry(boolean managing, java.lang.String externalId)
Sets if the user is currently managing a particular registry.
|
boolean | validate()
Validates whether the attributes of this context are valid.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String SER_ELEMENT_SEP
public static final java.lang.String SER_KEY_SEP
public GiftRegistryContextImpl()
public void clearContext()
public void copyContext(Context ctx)
public java.lang.Object[] getContextAttributes() throws BusinessContextException
public void setContextAttributes(java.lang.String[] ctxAttrs)
public void initializeContext(ActivityData initData) throws BusinessContextException
public void initializeContext(ActivityData initData, Context ctx) throws BusinessContextException
public java.lang.String getContextName()
public boolean validate() throws BusinessContextException
public void preInvokeContext(ActivityData sessionData) throws BusinessContextException
public java.lang.Integer getRegistryRelationship(java.lang.String externalId)
public java.lang.String getLastExternalIdAccessed()
public java.lang.String getCurrentExternalId()
public java.util.Vector getExternalIdsAccessed()
public void setExternalIdAccessed(java.lang.String externalId, java.lang.Integer relationship)
public void setExternalIdAccessed(java.lang.String externalId)
public java.util.Vector getExternalIdsByRegistrantRelationship()
public java.util.Vector getExternalIdsAccessedByRelationship(java.lang.Integer relationship)
public boolean isUserManagingARegistry()
public void setUserManagingARegistry(boolean managing, java.lang.String externalId)
public java.lang.String getGiftRegistryBeingManaged()
public java.lang.String removeExternalIdAccessed(java.lang.String externalId)
public void removeAllAccessedExternalIds()