com.ibm.commerce.me.commands
Interface AuthenticationHelperCmd

All Superinterfaces:
TaskCommand
All Known Implementing Classes:
AuthenticationHelperCmdImpl

public interface AuthenticationHelperCmd
extends TaskCommand

Invoked by the B2BLogon command to authenticate a b2b buyer.


Field Summary
static java.lang.String COPYRIGHT
          IBM copyright notice field.
static java.lang.String defaultCommandClassName
          Name of the default implementation of this command
static java.lang.String NAME
          Class name
 
Method Summary
  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()
          Gets the sessionInfo (information pertaining to requisitioner registration)
  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 setAuthType(int authType)
          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 protocolId)
          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.
 

Field Detail
public static final java.lang.String COPYRIGHT
IBM copyright notice field.
See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
Class name
See Also:
Constant Field Values

defaultCommandClassName

public static final java.lang.String defaultCommandClassName
Name of the default implementation of this command
See Also:
Constant Field Values
Method Detail

getBuyerCredentials

public Credentials getBuyerCredentials()
Gets the buyer credential information which stores the buyer organizations code, code type, user id and password
Returns:
the buyer credential information

getBuyerId

public long getBuyerId()
If the isValidCredentilas() returns true (ie. if the command is successful) then this method can be called to get the buyer organization id.
Returns:
the id of the buyer organization.

getErrorCode

public int getErrorCode()
If the isValidCredentilas() returns false (ie. if authentication failed) then this method can be called to get the error code. This is required because in the B2B scenario we need to know what is the exact reason for which athentication failed.
Returns:
a code indicating the error status

getSessionInfo

public SessionInfo getSessionInfo()
Gets the sessionInfo (information pertaining to requisitioner registration)
Returns:
the session information

getSupplierCredentials

public Credentials getSupplierCredentials()
Gets the supplier credential information which stores the supplier organizations code, code type, user id and password
Returns:
the supplier credential information

getSupplierId

public long getSupplierId()
If the isValidCredentilas() returns true (ie. if the command is successful) then this method can be called to get the supplier organization id.
Returns:
the id of the supplier organization.

isValidCredentials

public boolean isValidCredentials()
After the task commands are executed, a boolean result flag will be set to indicate if the authentication was successful. This method will return the this result flag to indicate if the authentication was successful.
Returns:
true if authentication was successful, false if otherwise

setAuthType

public void setAuthType(int authType)
Sets the authentication type

setBuyerCredentials

public void setBuyerCredentials(Credentials buyerCredentials)
Sets the buyer credentials under which the current B2B user wishes to logon.
Parameters:
buyerCredentials - the buyer credential

setLogonMode

public void setLogonMode(short logonMode)
Sets the logon mode
Parameters:
logonMode - the new logon mode

setMarketPlaceBuyerCredentials

public void setMarketPlaceBuyerCredentials(Credentials mpBuyerCredentials)
In case the buyer comes from a marketplace and wants to be authenticated against the marketplace credentials, use this method. This method will set the marketplace buyer credentials under which the current B2B user wishes to logon.
Parameters:
mpBuyerCredentials - the marketspace buyer credential

setProtocolId

public void setProtocolId(java.lang.Integer protocolId)
Sets the protocol id

setSessionInfo

public void setSessionInfo(SessionInfo sessionInfo)
Sets the sessionInfo (information pertaining to requisitioner registration)
Parameters:
sessionInfo - the session information pertaining to requisitioner registration

setSupplierCredentials

public void setSupplierCredentials(Credentials supplierCredentials)
Sets the supplier credentials for the store to which the buyer want to connect.
Parameters:
supplierCredentials - the supplier credential

setUpdateFlag

public void setUpdateFlag()
This method is called to indicate instead of performing verification of the credentials, the credentials should be set in the database.