com.ibm.commerce.context.giftregistry

Interface GiftRegistryContext

  • All Superinterfaces:
    Context, java.io.Serializable
    All Known Implementing Classes:
    GiftRegistryContextImpl


    public interface GiftRegistryContext
    extends Context
    The context contains the following gift registry information:
    • 1. list of Gift Registry external Ids that this user has accessed
    • 2. relationship that this user has for each of the gift registry (gift giver, registrant or co-registrant)
    • 3. gift registry external id currently being managed
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String CONTEXT_NAME
      This is the name of the context that will identify it in the CTXDATA table.
      static java.lang.String COPYRIGHT
      IBM Copyright notice field.
    • Field Detail

      • COPYRIGHT

        static final java.lang.String COPYRIGHT
        IBM Copyright notice field.
        See Also:
        Constant Field Values
      • CONTEXT_NAME

        static final java.lang.String CONTEXT_NAME
        This is the name of the context that will identify it in the CTXDATA table.
        See Also:
        Constant Field Values
    • Method Detail

      • getExternalIdsAccessed

        java.util.Vector getExternalIdsAccessed()
        Returns a vector of all the gift registry externalId's this user accessed this session
        Returns:
        Vector of gift registry externalId's
      • getLastExternalIdAccessed

        java.lang.String getLastExternalIdAccessed()
        Returns the last gift registry externalId that this shopper has accessed or managed
        Returns:
        the external ID of last accessed gift registry
      • getCurrentExternalId

        java.lang.String getCurrentExternalId()
        Returns the current gift registry externalId that this shopper has accessed or managed
        Returns:
        the externalId of the registry that is currently being visited
      • setExternalIdAccessed

        void setExternalIdAccessed(java.lang.String externalId,
                                   java.lang.Integer relationship)
        Adds to a list of gift registry externalId's this user has accessed. If a new registry is accessed, this method is called to store this information. The relationship parameter is the user authentication relationship they play on the registry. A null relationship means they only have guest access.
        Parameters:
        the - external ID of the registry that is to be set
        relationship - the relation of the user to the registry
      • setExternalIdAccessed

        void setExternalIdAccessed(java.lang.String externalId)
        Adds to a list of gift registry externalId's this user has accessed. If a new registry is accessed, this method is called to store this information.
        Parameters:
        ExternalId - the external ID that is to be added
      • getExternalIdsByRegistrantRelationship

        java.util.Vector getExternalIdsByRegistrantRelationship()
        Returns a list of gift registry externalId's that this user has the Registrant or Co-Registrant relationship with.
        Returns:
        all the externalIds of the registries that have been accessed by the user as a registrant
      • getExternalIdsAccessedByRelationship

        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.
        Parameters:
        relationship -
        Returns:
        Vector of externalId's
      • isUserManagingARegistry

        boolean isUserManagingARegistry()
        Returns:
        true if the user is currently managing a registry. The registry the user is managing can be found by calling: getGiftRegistryBeingManaged().
      • setUserManagingARegistry

        void setUserManagingARegistry(boolean managing,
                                      java.lang.String externalId)
        Sets if the user is currently managing a particular registry. If this is set to true, it means that the user is in the process of managing their registry. If this is false, it means the user is not managing a registry; ExternalId should be null if managing is false.
        Parameters:
        managing - true if the user is managing the registry. False otherwise.
        ExternalId - the externalId of the registry
      • getGiftRegistryBeingManaged

        java.lang.String getGiftRegistryBeingManaged()
        If isUserManagingARegistry() is true, it means that a gift registry is being managed by a shopper. This method can then be called to retrieve the gift registry ExternalId that the user is managing.
        Returns:
        the externalId of the registry that is being managed.
      • getRegistryRelationship

        java.lang.Integer getRegistryRelationship(java.lang.String externalId)
        Returns the relationship of a registrant with regards to a known registry they accessed. The registry must be in the getExternalIdsAccessed() Vector.
        Parameters:
        the - externalId of the registry
        Returns:
        the relationship of the user to the registry with the given extternalId
      • removeExternalIdAccessed

        java.lang.String removeExternalIdAccessed(java.lang.String externalId)
        Removes an externalId from the list of accessed registries for this user
        Parameters:
        the - externalId that is to be removed
        Returns:
        the removed externalId
      • removeAllAccessedExternalIds

        void removeAllAccessedExternalIds()
        Removes all externalId's from the list of accessed registries for this user