com.ibm.commerce.me.commands

Interface DBProcurementAuthenticationCmd

  • All Superinterfaces:
    com.ibm.websphere.command.CacheableCommand, com.ibm.commerce.command.CacheableECCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, ECCommand, java.io.Serializable, com.ibm.websphere.command.TargetableCommand, TaskCommand
    All Known Implementing Classes:
    DBProcurementAuthenticationCmdImpl


    public interface DBProcurementAuthenticationCmd
    extends TaskCommand

    A requisitioner is a user of the Business Direct buyer organization. Upon requisitioner logon of the supplier system, this task command will perform either an authentication or an update. This task command runs only if the server is configured to authenticate against the database.

    Before executing this task command the following operation set should be performed:

    • setAuthenticationLevel
    • setBuyerCredentials
    • setMarketPlaceBuyerCredentials
    • setSupplierCredentilas
    • setUpdateFlag

    If the setUpdateFlag method is called, upon execution of this task command, the credentials set are updated in the database.

    If the setUpdateFlag method is not called, upon execution of this task command, verification of the credentials is performed. To determine whether the authentication was successful a call should be made to isValidCredentials().

    • Field Detail

      • defaultCommandClassName

        static final java.lang.String defaultCommandClassName
        Name of the default implementation of this command
        See Also:
        Constant Field Values
    • Method Detail

      • getBuyerId

        long getBuyerId()
        If isValidCredentilas() returns true (if the command is successful), this method can be called to get the buyer organization ID.
        Returns:
        ID of the buyer organization.
      • getErrorCode

        int getErrorCode()
        If isValidCredentilas() returns false (if the command fails), this method can be called to get the error code. This is required because the B2B scenario needs the exact reason for each authentication failure.
        Returns:
        code indicating the error status
      • getSupplierId

        long getSupplierId()
        If isValidCredentilas() returns true (if the command is successful), this method can be called to get the supplier organization ID.
        Returns:
        ID of the supplier organization.
      • isValidCredentials

        boolean isValidCredentials()
        After this task command executes, a boolean result flag is set to indicate if authentication succeeds. This method will return the result flag to indicate if authentication succeeds.
        Returns:
        true if authentication succeeds, otherwise false
      • setAuthenticationType

        void setAuthenticationType(int authenticationType)
        This method sets the authentication level. See B2BLogonCmd for details about against which credentials the buyer and supplier are validated.
        Parameters:
        authenticationType - code indicating authentication type
      • setBuyerCredentials

        void setBuyerCredentials(Credentials buyerCredentials)
        This method sets the buyer credentials under which the current B2B user wishes to logon.
        Parameters:
        buyerCredentials - buyer credentials under which the current B2B user wishes to logon
      • setMarketPlaceBuyerCredentials

        void setMarketPlaceBuyerCredentials(Credentials mpBuyerCredentials)
        Use this method if the buyer comes from a marketplace and wants to be authenticated against the marketplace credentials. This method will set the marketplace buyer credentials under which the current B2B user wishes to logon.
        Parameters:
        mpBuyerCredentials - the marketplace buyer credentials under which the current B2B user wishes to logon
      • setMerchantKey

        void setMerchantKey(java.lang.String strMerchantKey)
        This method sets the Merchant Key to use in the encryption of the password. This should only be set if an Enciphered Merchant key was not set.
        Parameters:
        merchantKey - the Merchant Key.
      • setSupplierCredentilas

        void setSupplierCredentilas(Credentials supplierCredentials)
        This method sets the supplier credentials for the store to which the buyer wants to connect.
        Parameters:
        supplierCredentials - the supplier credentials for the store to which the buyer wants to connect
      • setUpdateFlag

        void setUpdateFlag()
        This method is called to indicate the credentials should be set in the database, instead of performing verification on the credentials.