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, setDefaultProperties
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
public static final java.lang.String COPYRIGHT
public int getAuthType()
public Credentials getBuyerCredentials()
getBuyerCredentials
in interface AuthenticationHelperCmd
public long getBuyerId()
getBuyerId
in interface AuthenticationHelperCmd
public int getErrorCode()
getErrorCode
in interface AuthenticationHelperCmd
public SessionInfo getSessionInfo()
getSessionInfo
in interface AuthenticationHelperCmd
com.ibm.commerce.me.datatype
public Credentials getSupplierCredentials()
getSupplierCredentials
in interface AuthenticationHelperCmd
public long getSupplierId()
getSupplierId
in interface AuthenticationHelperCmd
public boolean isValidCredentials()
isValidCredentials
in interface AuthenticationHelperCmd
public void performExecute() throws ECException
performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
ECException
- is raised if checkCredentails()
catches any exceptions.public void setAuthType(int anAuthType)
setAuthType
in interface AuthenticationHelperCmd
the
- authentication typepublic void setBuyerCredentials(Credentials buyerCredentials)
setBuyerCredentials
in interface AuthenticationHelperCmd
buyerCredentials
- the buyer credentialspublic void setLogonMode(short logonMode)
setLogonMode
in interface AuthenticationHelperCmd
logonMode
- the new logon modepublic void setMarketPlaceBuyerCredentials(Credentials mpBuyerCredentials)
setMarketPlaceBuyerCredentials
in interface AuthenticationHelperCmd
mpBuyerCredentials
- the marketplace buyer credentialspublic void setProtocolId(java.lang.Integer aProtocolId)
setProtocolId
in interface AuthenticationHelperCmd
aProtocolId
- the protocol IDpublic void setSessionInfo(SessionInfo sessionInfo)
setSessionInfo
in interface AuthenticationHelperCmd
sessionInfo
- the session information pertaining to requisitioner
registrationcom.ibm.commerce.me.datatype
public void setSupplierCredentials(Credentials supplierCredentials)
setSupplierCredentials
in interface AuthenticationHelperCmd
supplierCredentials
- the supplier credentialpublic void setUpdateFlag()
setUpdateFlag
in interface AuthenticationHelperCmd
public void validateParameters() throws ECException
validateParameters
in interface ECCommand
validateParameters
in class AbstractECTargetableCommand
ECException
- is raised with message _ERR_PROCUREMENT_INVALID_CREDENTIAL if the
check for buyer credential fails