com.ibm.commerce.component.giftregistry.commands

Class CheckGiftRegistryCredentialsCmdImpl

  • All Implemented Interfaces:
    BusinessObjectDocumentCmd, com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, CheckGiftRegistryCredentialsCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable


    public class CheckGiftRegistryCredentialsCmdImpl
    extends BusinessObjectDocumentCmdImpl
    implements CheckGiftRegistryCredentialsCmd
    This class takes an AuthenticationGiftRegistryBOD as an input parameter. The AuthenticationGiftRegistryBOD must contain a gift registry ExternalId. A password is optional. If no password is supplied, the user is validated on the basis that:
    • They have already been authenticated (and we have history of it in the GiftRegistryContext).
    • they are a Registrant/Co-Registrant on this registry (The GiftRegistryRegistrantDataBean.getUserId(). value is checked against the users Id in the GiftRegistryContext
    Logic:
    If the AuthenticationGiftRegistryBOD has a password, then
    • 1) The password is validated against the gift registry
    If the AuthenticationGiftRegistryBOD has no password, then
    • 1) we check to see if this registry exists inside the users Context already
    • 2) we check to see if this registry is owned by this user
    Result: ConfirmAuthenticationGiftRegistryBOD
    On Success: It only contains a success message: getConfirmation().equals(Confirmation.SUCCESS)
    On Failure: an ECApplicationException is thrown. Possible messages include:
    • GiftRegistryMessage._ERR_EC_AUTHENTICATION_PASSWORD_FAILED
    • GiftRegistryMessage._ERR_EC_AUTHENTICATION_PASSWORD_REQUIRED
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        The internal copyright field.
        See Also:
        Constant Field Values
      • CLASSNAME

        public static final java.lang.String CLASSNAME
        Classname com.ibm.commerce.component.giftregistry.commands.CheckGiftRegistryCredentialsCmdImpl
        See Also:
        Constant Field Values
    • Constructor Detail

      • CheckGiftRegistryCredentialsCmdImpl

        public CheckGiftRegistryCredentialsCmdImpl()
    • Method Detail

      • performExecute

        public void performExecute()
                            throws ECException
        Executes this command. For each gift registry authentication value object, performExecute() will first validate the externalId, and then call authenticateUser() to authenticate the user.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        ECException