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.
|
defaultCommandClassName, NAME| Constructor and Description |
|---|
AuthenticationHelperCmdImpl() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
void |
validateParameters()
This method checks whether all the required parameters are available for authentication.
|
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultPropertiesexecuteFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCachegetCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicyequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecuteFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCachegetCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputPropertiescheckIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultPropertiespublic static final java.lang.String COPYRIGHT
public int getAuthType()
public Credentials getBuyerCredentials()
getBuyerCredentials in interface AuthenticationHelperCmdpublic long getBuyerId()
getBuyerId in interface AuthenticationHelperCmdpublic int getErrorCode()
getErrorCode in interface AuthenticationHelperCmdpublic SessionInfo getSessionInfo()
getSessionInfo in interface AuthenticationHelperCmdcom.ibm.commerce.me.datatypepublic Credentials getSupplierCredentials()
getSupplierCredentials in interface AuthenticationHelperCmdpublic long getSupplierId()
getSupplierId in interface AuthenticationHelperCmdpublic boolean isValidCredentials()
isValidCredentials in interface AuthenticationHelperCmdpublic void performExecute()
throws ECException
performExecute in interface ECCommandperformExecute in interface com.ibm.websphere.command.TargetableCommandperformExecute in class AbstractECTargetableCommandECException - is raised if checkCredentails() catches any exceptions.public void setAuthType(int anAuthType)
setAuthType in interface AuthenticationHelperCmdthe - authentication typepublic void setBuyerCredentials(Credentials buyerCredentials)
setBuyerCredentials in interface AuthenticationHelperCmdbuyerCredentials - the buyer credentialspublic void setLogonMode(short logonMode)
setLogonMode in interface AuthenticationHelperCmdlogonMode - the new logon modepublic void setMarketPlaceBuyerCredentials(Credentials mpBuyerCredentials)
setMarketPlaceBuyerCredentials in interface AuthenticationHelperCmdmpBuyerCredentials - the marketplace buyer credentialspublic void setProtocolId(java.lang.Integer aProtocolId)
setProtocolId in interface AuthenticationHelperCmdaProtocolId - the protocol IDpublic void setSessionInfo(SessionInfo sessionInfo)
setSessionInfo in interface AuthenticationHelperCmdsessionInfo - the session information pertaining to requisitioner
registrationcom.ibm.commerce.me.datatypepublic void setSupplierCredentials(Credentials supplierCredentials)
setSupplierCredentials in interface AuthenticationHelperCmdsupplierCredentials - the supplier credentialpublic void setUpdateFlag()
setUpdateFlag in interface AuthenticationHelperCmdpublic void validateParameters()
throws ECException
validateParameters in interface ECCommandvalidateParameters in class AbstractECTargetableCommandECException - is raised with message _ERR_PROCUREMENT_INVALID_CREDENTIAL if the
check for buyer credential fails