public class AuthenticationHelperCmdImpl extends TaskCommandImpl implements AuthenticationHelperCmd
This command is invoked by the Business Direct commands to authenticate a Business Direct buyer. Before invoking this command the caller has to set the following parameters.
setLogonMode setBuyerCredentials setMarketPlaceBuyerCredentials setSupplierCredentilas setUpdateFlag
After this command is executed, the following methods can be invoked to get the results of command execution.
isValidCredentials getErrorCode getBuyerId getSupplierId
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
AuthenticationHelperCmdImpl() |
Modifier and Type | Method and Description |
---|---|
protected boolean | checkCredentials(int authLevel)
Verify the buyer and supplier credentials given by the buyer depending upon the mode of authentication.
|
int | getAuthType()
This method gets the authentication type.
|
Credentials | getBuyerCredentials()
This method gets the buyer credential information that stores the buyer organization code, code type, user ID, and password.
|
long | getBuyerId()
If the isValidCredentials() returns true (if the command succeeds) then this method can be called to get the buyer organization ID.
|
int | getErrorCode()
If the isValidCredentials() returns false (if authentication fails) then this method can be called to get the error code.
|
SessionInfo | getSessionInfo()
This method returns the registered requisitioner ID.
|
Credentials | getSupplierCredentials()
This method gets the supplier credential information which stores the supplier organizations code, code type, user ID and password.
|
long | getSupplierId()
If the isValidCredentials() returns true (if the command succeeds) then this method can be called to get the supplier organization ID.
|
boolean | isValidCredentials()
After the task commands execute, a boolean result flag is set to indicate if authentication succeeds.
|
void | performExecute()
The business logic for this task command.
|
void | setAuthType(int anAuthType)
This method sets the authentication type.
|
void | setBuyerCredentials(Credentials buyerCredentials)
This method sets the buyer credentials under which the current B2B user wishes to logon.
|
void | setLogonMode(short logonMode)
This method sets the logon mode.
|
void | setMarketPlaceBuyerCredentials(Credentials mpBuyerCredentials)
Use this method if the buyer comes from a marketplace and wants to be authenticated against the marketplace credentials.
|
void | setProtocolId(java.lang.Integer aProtocolId)
This method sets the protocol ID.
|
void | setSessionInfo(SessionInfo sessionInfo)
This method sets information pertaining to requisitioner registration.
|
void | setSupplierCredentials(Credentials supplierCredentials)
This method sets the supplier credentials for the store that the buyer wants to connect to.
|
void | setUpdateFlag()
This method indicates that the credentials should be set in the database, instead of performing verification on the credentials.
|
protected java.lang.Long | validateBuyerGroupLogonCredentials()
This method checks whether the buyer credential information is valid.
|
void | validateParameters()
This method checks whether all the required parameters are available for authentication.
|
public static final java.lang.String COPYRIGHT
protected boolean checkCredentials(int authLevel) throws ECException
public int getAuthType()
public Credentials getBuyerCredentials()
public long getBuyerId()
public int getErrorCode()
public SessionInfo getSessionInfo()
public Credentials getSupplierCredentials()
public long getSupplierId()
public boolean isValidCredentials()
public void performExecute() throws ECException
public void setAuthType(int anAuthType)
public void setBuyerCredentials(Credentials buyerCredentials)
public void setLogonMode(short logonMode)
public void setMarketPlaceBuyerCredentials(Credentials mpBuyerCredentials)
public void setProtocolId(java.lang.Integer aProtocolId)
public void setSessionInfo(SessionInfo sessionInfo)
public void setSupplierCredentials(Credentials supplierCredentials)
public void setUpdateFlag()
protected java.lang.Long validateBuyerGroupLogonCredentials() throws ECException
public void validateParameters() throws ECException