com.ibm.commerce.me.commands
Interface DBProcurementAuthenticationCmd

All Superinterfaces:
TaskCommand
All Known Implementing Classes:
DBProcurementAuthenticationCmdImpl

public interface DBProcurementAuthenticationCmd
extends TaskCommand

When a requisitioner (a user of the B2B buyer org) logs on to the supplier system, if server is configured to authenticate against the databse then this task command will be called to perform either authentication or an update.

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

    setAuthenticationLevel
    setBuyerCredentials
    setMarketPlaceBuyerCredentials
    setSupplierCredentilas
    setUpdateFlag

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

If the setUpdateFlag is not called then, 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(). Creation date: (2/27/01 4:43:36 PM)


Field Summary
static java.lang.String COPYRIGHT
          IBM Copyright field
static java.lang.String defaultCommandClassName
          Name of the default implementation of this command
static java.lang.String NAME
          The name of this interface
 
Method Summary
 long getBuyerId()
          If the isValidCredentilas() returns true (ie.
 int getErrorCode()
          If the isValidCredentilas() returns false (ie.
 long getSupplierId()
          If the isValidCredentilas() returns true (ie.
 boolean isValidCredentials()
          After the this task command is executed, a boolean result flag will be set to indicate if the authentication was successful.
 void setAuthenticationType(int authenticationType)
          Sets the authentication level (See B2BLogonCmd for details about against which credentials the buyer and supplier are validated.)
 void setBuyerCredentials( Credentials buyerCredentials)
          Sets the buyer credentials under which the current B2B user wishes to logon.
 void setMarketPlaceBuyerCredentials( Credentials mpBuyerCredentials)
          In case the buyer comes from a marketplace and wants to be authenticated against the marketplace credentials, use this method.
 void setMerchantKey(java.lang.String strMerchantKey)
          Sets the Merchant Key to be used in the encryption of the password.
 void setSupplierCredentilas( Credentials supplierCredentials)
          Sets the supplier credentials for the store to which the buyer want to connect.
 void setUpdateFlag()           This method is called to indicate instead of performing verification of the credentials, the credentials should be set in the database.
 

Field Detail
public static final java.lang.String COPYRIGHT
IBM Copyright field
See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
The name of this interface
See Also:
Constant Field Values

defaultCommandClassName

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

getBuyerId

public long getBuyerId()
If the isValidCredentilas() returns true (ie. if the command is successful) then this method can be called to get the buyer organization id.
Returns:
Id of the buyer organization.

getErrorCode

public int getErrorCode()
If the isValidCredentilas() returns false (ie. if the command fails) then this method can be called to get the error code. This is required because in the B2B scenario we need to know what is the exact reason for which athentication failed.
Returns:
code indicating the error status

getSupplierId

public long getSupplierId()
If the isValidCredentilas() returns true (ie. if the command is successful) then this method can be called to get the supplier organization id.
Returns:
Id of the supplier organization.

isValidCredentials

public boolean isValidCredentials()
After the this task command is executed, a boolean result flag will be set to indicate if the authentication was successful. This method will return the this result flag to indicate if the authentication was successful.
Returns:
true if authentication was successful false if otherwise

setAuthenticationType

public void setAuthenticationType(int authenticationType)
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

public void setBuyerCredentials(Credentials buyerCredentials)
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

public void setMarketPlaceBuyerCredentials(Credentials mpBuyerCredentials)
In case the buyer comes from a marketplace and wants to be authenticated against the marketplace credentials, use this method. This methode 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

public void setMerchantKey(java.lang.String strMerchantKey)
Sets the Merchant Key to be used in the encryption of the password. This should only be set if an Enciphered Merchant key was not set.

setSupplierCredentilas

public void setSupplierCredentilas(Credentials supplierCredentials)
Sets the supplier credentials for the store to which the buyer want to connect.
Parameters:
supplierCredentials - the supplier credentials for the store to which the buyer want to connect

setUpdateFlag

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