public class DBProcurementAuthenticationCmdImpl extends TaskCommandImpl implements DBProcurementAuthenticationCmd
A requisitioner is a user of a Business-to-Business buyer organization. Upon requisitioner logon via 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 set operations should be performed:
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().
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM Copyright field
|
Constructor and Description |
---|
DBProcurementAuthenticationCmdImpl()
DBAuthenticationCmdImpl default constructor
|
Modifier and Type | Method and Description |
---|---|
protected byte[] | formatPassword(byte[] bytePassword)
This method pads the password to it's maximum length with the OS padding character.
|
long | getBuyerId()
If isValidCredentials() returns true (the command is successful), this method can be called to get the buyer organization ID.
|
int | getErrorCode()
If isValidCredentials() returns false (the command fails), this method can be called to get the error code.
|
long | getSupplierId()
If isValidCredentials() returns true (the command is successful), this method can be called to get the supplier organization ID.
|
boolean | isValidCredentials()
After this task command is executed, a boolean result flag is set to indicate if authentication succeeds.
|
void | performExecute()
This method contains the business logic for this task command.
|
void | setAuthenticationType(int authenticationType)
This method sets the authentication level for this user.
|
void | setBuyerCredentials(Credentials buyerCredentials)
This method sets the buyer credentials under which the current B2B user wishes to logon.
|
void | setMarketPlaceBuyerCredentials(Credentials mpBuyerCredentials)
Use this method if the buyer comes from a marketplace and wants to be authenticated against the marketplace credentials.
|
void | setMerchantKey(java.lang.String aMerchantKey)
This method sets the Merchant Key to use in the encryption of the password.
|
void | setSupplierCredentilas(Credentials supplierCredentials)
This method sets the supplier credentials for the store to which the buyer wants to connect.
|
void | setUpdateFlag()
This method is called to indicate that the credentials should be set in the database, instead of performing verification of the credentials.
|
void | validateParameters()
This method checks whether all the required parameters are available for authentication.
|
public static final java.lang.String COPYRIGHT
public DBProcurementAuthenticationCmdImpl()
protected byte[] formatPassword(byte[] bytePassword)
public long getBuyerId()
public int getErrorCode()
public long getSupplierId()
public boolean isValidCredentials()
public void performExecute() throws ECException
public void setAuthenticationType(int authenticationType)
public void setBuyerCredentials(Credentials buyerCredentials)
public void setMarketPlaceBuyerCredentials(Credentials mpBuyerCredentials)
public void setMerchantKey(java.lang.String aMerchantKey)
public void setSupplierCredentilas(Credentials supplierCredentials)
public void setUpdateFlag()
public void validateParameters() throws ECException