public class GiftCenterContextImpl extends AbstractContextImpl implements GiftCenterContext
getGiftRegistiesOwnedByUser method (for gift registries)
and the getWishListsOwnedByUser method (for wish lists).| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
SER_VALUE_SEPCONTEXT_NAME, COREGISTRANT_TYPE, GIFT_GIVER, REGISTRANT_TYPE, SER_ELEMENT_SEP, SER_KEY_SEP| Constructor and Description |
|---|
GiftCenterContextImpl()
Default constructor to create a gift center context.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addToGiftListExtIdAccessed(java.lang.String externalId,
java.lang.Integer relationship)
Adds a gift list external identifier value to the list of identifiers
for gift lists the user has accessed.
|
void |
addToGiftListExtIdAccessedWithCoRegistrantRelationship(java.lang.String externalId)
Adds a gift list external identifier value to the list of
identifiers for gift lists the user has accessed with a co-registrant relationship.
|
void |
addToGiftListExtIdAccessedWithGiftGiverRelationship(java.lang.String externalId)
Adds a gift list external identifier value to the list of identifiers for
gift lists the user has accessed with a gift giver relationship.
|
void |
clearContext()
Resets the attributes specific to this context.
|
void |
copyContext(Context ctx)
Copies the content of the specified context to this context.
|
java.lang.Object[] |
getContextAttributes()
Returns an array of context attributes to be serialized and persisted.
|
java.lang.String |
getContextName()
Returns the name of the context that is stored in the CTXDATA table.
|
java.lang.String |
getGiftListBeingCompleted()
Returns the unique identifier for the gift list that the user is currently
completing.
|
java.util.Vector |
getGiftListExtIdsAccessed()
Returns a list of external identifiers for gift lists that the user has
accessed with either the gift giver relationship or the co-registrant
relationship.
|
java.util.Vector |
getGiftListExtIdsByCoRegistrantRelationship()
Returns a list of external identifiers for gift lists that the user has a
co-registrant relationship with.
|
java.util.Vector |
getGiftListExtIdsByGiftGiverRelationship()
Returns a list of external identifiers for gift lists that the user has a gift
giver relationship with.
|
java.lang.Integer |
getGiftListRelationship(java.lang.String externalId)
Returns the relationship a user has to a gift list that was
accessed.
|
java.util.Vector |
getGiftRegistiesOwnedByUser()
Returns a vector of external identifiers for gift registries the user owns,
if the user is not a guest or generic user.
|
java.util.Vector |
getWishListsOwnedByUser()
Returns a vector of external identifiers for wish lists the user owns,
if the user is not a guest or generic user.
|
void |
initializeContext(com.ibm.commerce.component.contextservice.ActivityData initData,
Context ctx)
Initializes the context based on the context passed in as the argument by
invoking the
copyContext method. |
void |
preInvokeContext(com.ibm.commerce.component.contextservice.ActivityData sessionData)
Performs context-specific tasks before request execution.
|
void |
removeAllAccessedGiftListExtIds()
Removes all gift list external identifiers from the list of accessed gift
lists for this user.
|
void |
removeGiftListExtIdAccessed(java.lang.String externalId)
Removes a gift list external identifier from the list of accessed gift
lists for this user.
|
void |
setContextAttributes(java.lang.String[] ctxAttrs)
Initializes the context from the specified list of attributes.
|
void |
setGiftListBeingCompleted(java.lang.String aGiftListBeingCompleted)
Sets the unique identifier for the gift list that the user is currently completing.
|
java.lang.String |
toString()
Returns the string representation of the object.
|
boolean |
validate()
Validates the context object.
|
clear, getActivityToken, getContextSerializedString, initialize, initialize, initializeContext, isDirty, postInvoke, postInvokeContext, preInvoke, recalibrate, recalibrateContext, reset, resetContext, setContextSerializedString, setDirtyequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetActivityTokenpublic static final java.lang.String COPYRIGHT
public GiftCenterContextImpl()
public void clearContext()
clearContext in class AbstractContextImplAbstractContextImpl.clear()public void initializeContext(com.ibm.commerce.component.contextservice.ActivityData initData,
Context ctx)
throws BusinessContextException
copyContext method.initializeContext in class AbstractContextImplinitData - The sets of attributes that are passed by the request.ctx - The particular context of the token being copied from.BusinessContextException - When the copy context fails.public void copyContext(Context ctx)
copyContext in interface Contextctx - The context to be copied from.public java.lang.Object[] getContextAttributes()
throws BusinessContextException
getContextAttributes in class AbstractContextImplBusinessContextExceptionAbstractContextImpl.getContextSerializedString()public void preInvokeContext(com.ibm.commerce.component.contextservice.ActivityData sessionData)
throws BusinessContextException
preInvokeContext in class AbstractContextImplsessionData - The map of name-value pairs for the parameters that are passed
in the request.BusinessContextException - on any errorAbstractContextImpl.preInvoke(ActivityData)public void setContextAttributes(java.lang.String[] ctxAttrs)
throws BusinessContextException
setContextAttributes in class AbstractContextImplctxAttrs - An array of attributes of the contextBusinessContextExceptionpublic java.lang.String getContextName()
getContextName in interface Contextpublic boolean validate()
throws BusinessContextException
validate in interface ContextBusinessContextExceptionpublic java.lang.String toString()
toString in class AbstractContextImplpublic java.util.Vector getGiftListExtIdsAccessed()
getGiftRegistriesOwnedByUser
and getWishListsOwnedByUser methods.getGiftListExtIdsAccessed in interface GiftCenterContextpublic java.util.Vector getGiftListExtIdsByCoRegistrantRelationship()
getGiftListExtIdsByCoRegistrantRelationship in interface GiftCenterContextpublic java.util.Vector getGiftListExtIdsByGiftGiverRelationship()
getGiftListExtIdsByGiftGiverRelationship in interface GiftCenterContextpublic java.lang.Integer getGiftListRelationship(java.lang.String externalId)
getGiftListRelationship in interface GiftCenterContextexternalId - The gift list identifier for which the relationship value must be
returned.public java.lang.String getGiftListBeingCompleted()
getGiftListBeingCompleted in interface GiftCenterContextpublic java.util.Vector getGiftRegistiesOwnedByUser()
getGiftRegistiesOwnedByUser in interface GiftCenterContextpublic java.util.Vector getWishListsOwnedByUser()
getWishListsOwnedByUser in interface GiftCenterContextpublic void setGiftListBeingCompleted(java.lang.String aGiftListBeingCompleted)
setGiftListBeingCompleted in interface GiftCenterContextaGiftListBeingCompleted - The unique identifier for the gift list that the user is currently
completing.public void addToGiftListExtIdAccessedWithCoRegistrantRelationship(java.lang.String externalId)
addToGiftListExtIdAccessedWithCoRegistrantRelationship in interface GiftCenterContextexternalId - The gift list external identifier that will be added to the
list.public void addToGiftListExtIdAccessedWithGiftGiverRelationship(java.lang.String externalId)
addToGiftListExtIdAccessedWithGiftGiverRelationship in interface GiftCenterContextexternalId - The gift list external identifier that will be added to the
list.public void addToGiftListExtIdAccessed(java.lang.String externalId,
java.lang.Integer relationship)
addToGiftListExtIdAccessed in interface GiftCenterContextexternalId - The gift list external identifier that will be added to the
list.relationship - The relationship the user has with the gift list.public void removeAllAccessedGiftListExtIds()
removeAllAccessedGiftListExtIds in interface GiftCenterContextpublic void removeGiftListExtIdAccessed(java.lang.String externalId)
removeGiftListExtIdAccessed in interface GiftCenterContextexternalId - The gift list external identifier that must be removed.