com.ibm.commerce.me.commands

Class 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
    • 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 interface ControllerCommand
        Overrides:
        isGeneric in class ControllerCommandImpl
        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 interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        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 interface ControllerCommand
        Overrides:
        setRequestProperties in class ControllerCommandImpl
        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.