Class PunchOutSetupCmdImpl
- java.lang.Object
-
- com.ibm.websphere.command.TargetableCommandImpl
-
- com.ibm.websphere.command.CacheableCommandImpl
-
- com.ibm.commerce.command.MeasuredCacheableCommandImpl
-
- com.ibm.commerce.command.AbstractECTargetableCommand
-
- com.ibm.commerce.command.ControllerCommandImpl
-
- com.ibm.commerce.me.commands.PunchOutSetupCmdImpl
-
- All Implemented Interfaces:
- AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, PunchOutSetupCmd, Protectable, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable
public class PunchOutSetupCmdImpl extends ControllerCommandImpl implements PunchOutSetupCmd
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 not already registered.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.ibm.commerce.me.commands.PunchOutSetupCmd
defaultCommandClassName, messageName, NAME
-
-
Constructor Summary
Constructors Constructor and Description PunchOutSetupCmdImpl()
The PunchOutSetupCmdImpl constructor calls its parents constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description int
getAuthType()
This method gets the authentication type.CIData
getCIData()
This method gets the CIData object.java.lang.Long
getOrganizationUnitId()
This method gets the Organization unit IDjava.lang.Integer
getProtocolId()
This method gets the protocol ID.java.lang.String
getRequisitionerId()
This method gets the requisitioner ID.java.lang.Long
getUsersId()
This method gets the user ID.boolean
isGeneric()
This method checks if the user is a generic user or not.void
performExecute()
The business logic for this controller command.void
setAuthType(int anAuthType)
This method sets the authentication type.void
setCIData(CIData newCIData)
This method sets the CIData object to store the logon properties.void
setOrganizationUnitId(java.lang.Long orgUnit)
This method sets the organization unit ID.void
setRequestProperties(TypedProperty p)
The Web controller calls the setRequestProperties method before invoking the execute method in this command.void
setRequisitionerId(java.lang.String newRequisitionerId)
This method sets the requisitioner ID.void
setUsersId(java.lang.Long newUserId)
This method sets the User ID of the owner of the order.void
validateParameters()
This method 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, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
-
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
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
-
Methods inherited from class com.ibm.websphere.command.CacheableCommandImpl
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
-
Methods inherited from class com.ibm.websphere.command.TargetableCommandImpl
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
-
Methods inherited from class java.lang.Object
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, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
-
Methods inherited from interface com.ibm.websphere.command.CacheableCommand
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
-
Methods inherited from interface com.ibm.websphere.command.TargetableCommand
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
-
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, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
-
Methods inherited from interface com.ibm.commerce.security.Protectable
fulfills, getOwner
-
-
-
-
Constructor Detail
-
PunchOutSetupCmdImpl
public PunchOutSetupCmdImpl()
The PunchOutSetupCmdImpl constructor calls its parents constructor.
-
-
Method Detail
-
getAuthType
public int getAuthType()
This method gets the authentication type.- Returns:
- authType The authentication type.
-
getOrganizationUnitId
public java.lang.Long getOrganizationUnitId()
This method gets the Organization unit ID- Returns:
- organizationUnitId The organization unit ID.
-
getProtocolId
public java.lang.Integer getProtocolId()
This method gets the protocol ID.- Returns:
- protocolId The protocol ID.
-
getRequisitionerId
public java.lang.String getRequisitionerId()
This method gets the requisitioner ID.- Returns:
- requisitionerId The requisitioner ID.
-
getUsersId
public java.lang.Long getUsersId()
This method gets the user ID.- Returns:
- userId The user ID
-
isGeneric
public boolean isGeneric()
This method checks if the user is a generic user or not.- Specified by:
isGeneric
in interfaceControllerCommand
- Overrides:
isGeneric
in classControllerCommandImpl
- Returns:
- This method always returns true. A user is generic until they logon, so always return true
-
performExecute
public void performExecute() throws ECException
The business logic for this controller command.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 information object that is referenced by the supplier cookie. The primary purpose of the buyer request information object is to pass relevant parameters onto the PunchOutCatalogDisplayCmdImpl command. The PunchOutCatalogDisplayCmdImp in turn calls the store JSPs passing these parameters to it.
- Specified by:
performExecute
in interfaceECCommand
- Specified by:
performExecute
in interfacecom.ibm.websphere.command.TargetableCommand
- Overrides:
performExecute
in classAbstractECTargetableCommand
- Throws:
ECException
- Raised when failed to register requisitioner; or failed to retrieve catalogId from BuyerSupplierMappingBean.
-
setAuthType
public void setAuthType(int anAuthType)
This method sets the authentication type.- Parameters:
anAuthType
- The authentication type
-
setOrganizationUnitId
public void setOrganizationUnitId(java.lang.Long orgUnit)
This method sets the organization unit ID.- Parameters:
orgUnit
- The organization unit ID.
-
setRequestProperties
public void setRequestProperties(TypedProperty p) throws ECException
The Web controller calls the setRequestProperties method before invoking the execute method in this command. It is the responsibility of the implementer of the ControllerCommand to extract the required input parameters from the request properties and perform parameter checking.- Specified by:
setRequestProperties
in interfaceControllerCommand
- Overrides:
setRequestProperties
in classControllerCommandImpl
- Parameters:
requestProperties
- com.ibm.commerce.datatype.TypedProperty- Throws:
com.ibm.commerce.exception.ECException.
ECException
-
setRequisitionerId
public void setRequisitionerId(java.lang.String newRequisitionerId)
This method sets the requisitioner ID.- Parameters:
newRequisitionerId
- The requisitioner ID.
-
setUsersId
public void setUsersId(java.lang.Long newUserId)
This method sets the User ID of the owner of the order.
-
validateParameters
public void validateParameters() throws ECException
This method validates the required parameters for this controller command. The required parameters are protocolName, protocolVersion, protocolType.- Specified by:
validateParameters
in interfaceECCommand
- Overrides:
validateParameters
in classAbstractECTargetableCommand
- Throws:
ECException.
ECException
-
getCIData
public CIData getCIData()
This method gets the CIData object.- Returns:
- The CIData object.
- See Also:
com.ibm.commerce.me.datatype
-
setCIData
public void setCIData(CIData newCIData)
This method sets the CIData object to store the logon properties.- See Also:
com.ibm.commerce.me.datatype
-
-