java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.ControllerCommandImpl | +--com.ibm.commerce.me.commands.PunchOutSetupCmdImpl
This is the implementation of PunchOutSetupCmd. It is used when the PunchOutSetup message is received from a procurement system for a requisitioning user. It performs the authentication of the buyer organization and registers the requisitioning user as a member of the buyer organization if the user is not already registered.
Field Summary |
---|
Fields inherited from class com.ibm.commerce.command. ControllerCommandImpl |
requestProperties,
responseProperties,
retriable,
viewReqProperties |
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.me.commands. PunchOutSetupCmd |
COPYRIGHT,
defaultCommandClassName,
messageName,
NAME |
Fields inherited from interface com.ibm.commerce.command. ECTargetableCommand |
COPYRIGHT |
Constructor Summary | |
---|---|
PunchOutSetupCmdImpl() PunchOutSetupCmdImpl constructor. |
Method Summary | |
---|---|
int |
getAuthType() Gets authentication type |
java.lang.Long |
getOrganizationUnitId() Gets Organization unit Id |
java.lang.Integer |
getProtocolId() Gets protocol Id. |
java.lang.String |
getRequisitionerId() Gets requisitioner id. |
java.lang.Long |
getUsersId() Gets users id. |
protected
void |
initializeInputData() Initialize InputData. |
boolean |
isGeneric() Check if it is a generic user or not. |
boolean |
isRetriable() Check to see if this command is retriable on transaction rollback exception. |
protected
boolean |
isTwoStepProtocol() Checks whether the protocol currently used is single step or two step. |
void |
performExecute() The business logic for this controller command. |
void |
setAuthType(int anAuthType) Sets authentication type |
protected
void |
setBuyerRequestProperties() Sets buyer request properties. |
void |
setOrganizationUnitId(java.lang.Long orgUnit) Sets the organization unit id |
void |
setRequestProperties(
TypedProperty p) The WebController calls the setRequestProperties method before invoking the execute method in this command. |
void |
setRequisitionerId(java.lang.String requisitionerId) Sets requisitionerId. |
void |
setUsersId(java.lang.Long userId) Sets the User id of the ower of the order |
protected
void |
updateCmdContext() Switches the current user identity to the identity associated with the LoginID supplied to this Logon command. |
void |
validateParameters() Validates the required parameters for this controller command. |
Methods inherited from class com.ibm.commerce.command. ControllerCommandImpl |
checkPermission,
fulfills,
getForUserId,
getGeneric,
getOwner,
getRequestProperties,
getResolvedRequestProperties,
getResourceOwners,
getResponseProperties,
getRetriable,
getViewInputProperties,
mergeProperties,
setForUserId,
setGeneric,
setOwner,
setResponseProperties,
setRetriable,
setViewInputProperties |
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 |
Methods inherited from interface com.ibm.commerce.command. ControllerCommand |
checkPermission,
execute,
getGeneric,
getRequestProperties,
getResolvedRequestProperties,
getResponseProperties,
getRetriable,
getViewInputProperties,
mergeProperties,
setGeneric,
setRetriable,
setViewInputProperties |
Methods inherited from interface com.ibm.commerce.command. AccCommand |
accessControlCheck,
getAccCheck,
getForUserId,
getResourceOwners,
setAccCheck,
setForUserId,
setOwner |
Methods inherited from interface com.ibm.commerce.command. ECCommand |
checkIsAllowed,
checkResourcePermission,
createCommandExecutionEvent,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getResources,
getStoreId,
getUser,
getUserId,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
Constructor Detail |
---|
public PunchOutSetupCmdImpl()
Method Detail |
---|
public int getAuthType()
public java.lang.Long getOrganizationUnitId()
public java.lang.Integer getProtocolId()
public java.lang.String getRequisitionerId()
public java.lang.Long getUsersId()
protected void initializeInputData()
public boolean isGeneric()
isGeneric
in interface
ControllerCommand
isGeneric
in class
ControllerCommandImpl
public boolean isRetriable()
isRetriable
in interface
ControllerCommand
isRetriable
in class
ControllerCommandImpl
protected boolean isTwoStepProtocol()
public void performExecute() throws ECException
This method will do the following: 1. Gets sessionInfo from CIData 2. Stores the protocol table Id in the sessionInfo 3. Uses the Authentication Helper Command to Authenticate User 4. Sets the properties of the AuthenticationHelperCommand 5. If the user is authenticated, gets the procurement buyer profile properties 6. Invokes requisitioner registration command 7. Generates the supplier cookie: first we create the buyer request info object which will be referenced by the supplier cookie. The primary purpose of the buyer request info object is to pass relevant params onto the PunchOutCatalogDisplayCmdImpl command which will in turn call the store .jsps passing these parameteres to it.
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
- Rasied when failed to register requisitioner; or failed to retrieve catalogId
from BuyerSupplierMappingBean.public void setAuthType(int anAuthType)
anAuthType
- The authentication typeprotected void setBuyerRequestProperties()
public void setOrganizationUnitId(java.lang.Long orgUnit)
orgUnit
- The organization unit id.public void setRequestProperties(TypedProperty p) throws ECException
setRequestProperties
in interface
ControllerCommand
setRequestProperties
in class
ControllerCommandImpl
p
- request propertiescom.ibm.commerce.exception.ECException.
ECException
public void setRequisitionerId(java.lang.String requisitionerId)
requisitionerId
- The requisitioner id.public void setUsersId(java.lang.Long userId)
protected void updateCmdContext() throws ECException
ECException
public void validateParameters() throws ECException
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECException.
ECException