java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.me.commands.AuthenticationHelperCmdImpl
This command will be invoked by the B2BLogon command to authenticate a b2b 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 getSupplierIdCreation date: (4/24/01 7:18:48 PM)
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT IBM copyright notice field. |
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.me.commands. AuthenticationHelperCmd |
defaultCommandClassName,
NAME |
Fields inherited from interface com.ibm.commerce.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
AuthenticationHelperCmdImpl() |
Method Summary | |
---|---|
protected
boolean |
checkCredentials(int authLevel) verify the buyer and supplier credentials given by the buyer depending upon the mode of authentication This calls either the DBProcurementAuthenticationCmd (default), LdapAuthenticationCmd, or the ThirdPartyB2BAuthCmd to verify the credential. |
int |
getAuthType() Gets the authentication type |
Credentials |
getBuyerCredentials() Gets the buyer credential information which stores the buyer organizations code, code type, user id and password |
long |
getBuyerId() If the isValidCredentilas() returns true (ie. |
int |
getErrorCode() If the isValidCredentilas() returns false (ie. |
SessionInfo |
getSessionInfo() get the userId (registered requisitioner id) |
Credentials |
getSupplierCredentials() Gets the supplier credential information which stores the supplier organizations code, code type, user id and password |
long |
getSupplierId() If the isValidCredentilas() returns true (ie. |
boolean |
isValidCredentials() After the task commands are executed, a boolean result flag will be set to indicate if the authentication was successful. |
void |
performExecute() The business logic for this task command. |
void |
setAuthType(int anAuthType) Sets the authentication type |
void |
setBuyerCredentials(
Credentials buyerCredentials) Sets the buyer credentials under which the current B2B user wishes to logon. |
void |
setLogonMode(short logonMode) Sets the logon mode |
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 |
setProtocolId(java.lang.Integer aProtocolId) Sets the protocol id |
void |
setSessionInfo(
SessionInfo sessionInfo) Sets the sessionInfo (information pertaining to requisitioner registration) |
void |
setSupplierCredentials(
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. |
protected
java.lang.Long |
validateBuyerGroupLogonCredentials() Check whether the buyer credential information is valid. |
void |
validateParameters() Check whether all the required parameters are available forauthentication. |
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
accessControlCheck,
checkIsAllowed,
checkParameters,
checkResourcePermission,
createCommandExecutionEvent,
execute,
finalize,
getAccCheck,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getResources,
getStoreId,
getUser,
getUserId,
isReadyToCallExecute,
reset,
setAccCheck,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait,
wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
Constructor Detail |
---|
public AuthenticationHelperCmdImpl()
Method Detail |
---|
protected boolean checkCredentials(int authLevel) throws ECException
ECException
- Raised by the authentication commandpublic 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
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 class
AbstractECTargetableCommand
ECException.
- Raised if checkCredentails()
catchs any exceptionECException
public void setAuthType(int anAuthType)
setAuthType
in interface
AuthenticationHelperCmd
public void setBuyerCredentials(Credentials buyerCredentials)
setBuyerCredentials
in interface
AuthenticationHelperCmd
buyerCredentials
- the buyer credentialpublic void setLogonMode(short logonMode)
setLogonMode
in interface
AuthenticationHelperCmd
logonMode
- the new logon modepublic void setMarketPlaceBuyerCredentials(Credentials mpBuyerCredentials)
setMarketPlaceBuyerCredentials
in interface
AuthenticationHelperCmd
mpBuyerCredentials
- the marketspace buyer
credentialpublic 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 registrationpublic void setSupplierCredentials(Credentials supplierCredentials)
setSupplierCredentials
in interface
AuthenticationHelperCmd
supplierCredentials
- the supplier
credentialpublic void setUpdateFlag()
setUpdateFlag
in interface
AuthenticationHelperCmd
protected java.lang.Long validateBuyerGroupLogonCredentials() throws ECException
ECException
- Raised with message _ERR_PROCUREMENT_INVALID_CREDENTIAL if LogonCmd raise an
exceptionpublic void validateParameters() throws ECException
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECException
- Raised with message _ERR_PROCUREMENT_INVALID_CREDENTIAL if the check for
buyer credential fails