com.ibm.commerce.giftcenter.facade.server.commands

Class ProcessGiftListAuthenticateActionCmdImpl

  • All Implemented Interfaces:
    AbstractProcessNounActionCmd, ProcessGiftListActionCmd, 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 ProcessGiftListAuthenticateActionCmdImpl
    extends AbstractProcessCustomActionUsingBusinessObjectMediatorCmdImpl
    implements ProcessGiftListActionCmd
    The ProcessGiftListAuthenticateActionCmdImpl command authenticates the user for a gift list by guest access password or by manage access password. If both the passwords are not provided, the command checks if the gift list requires a password for granting guest access. It also checks if the user owning the gift list is making a request to update the context with the registrant relationship with the gift list. If both passwords are provided, an exception is thrown as the service can authenticate based on either of the passwords. The command never updates the user"s context to lower the access level on the gift list. For example, if the user already bears a registrant relationship with the gift list, a service request with manage password will not change the user"s relationship to co-registrant.
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copy right field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ProcessGiftListAuthenticateActionCmdImpl

        public ProcessGiftListAuthenticateActionCmdImpl()
        The default constructor for the class.
    • Method Detail

      • performExecute

        public void performExecute()
                            throws java.lang.Exception
        Authenticates the user based on manage access password or guest access password. If no passwords are provided, the method checks the following based on which it decides if the user is authenticated or not.
      • If the gift list is Public.
      • If the gift list is owned by the user.
      • If the user is already authenticated for the gift list. If any of the above conditions returns true, the user is said to be authenticated. The context is updated using the GiftListContextUpdateCmd In all other cases, an error is thrown.
Specified by:
performExecute in interface com.ibm.websphere.command.TargetableCommand
Specified by:
performExecute in class com.ibm.websphere.command.TargetableCommandImpl
Throws:
java.lang.Exception - the authentication fails.
See Also:
ProcessGiftListAuthenticateActionCmdImpl#checkUserOwnsGiftList(String, String)} {@link ProcessGiftListAuthenticateActionCmdImpl#checkUsersContext(String)} {@link ProcessGiftListAuthenticateActionCmdImpl#authenticateUser(Grgftreg, String, int)} {@link ProcessGiftListAuthenticateActionCmdImpl#checkIfGiftListRequiresGuestAuthentication(Grgftreg)}, GiftListContextUpdateCmd}
  • validate

    public void validate()
                  throws AbstractApplicationException
    Validates the request made. This method checks if the gift list unique ID or external ID is passed or not. It also validates if either of guest access password and manage access password are passed and not both. It however, does not make either of the passwords mandatory.
    Specified by:
    validate in interface AbstractProcessNounActionCmd
    Throws:
    AbstractApplicationException - When the validation fails.