Class PunchOutSetupCmdImpl

  • All Implemented Interfaces:
    AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, PunchOutSetupCmd, Protectable,,,,,,

    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.
        authType The authentication type.
      • getOrganizationUnitId

        public java.lang.Long getOrganizationUnitId()
        This method gets the Organization unit ID
        organizationUnitId The organization unit ID.
      • getProtocolId

        public java.lang.Integer getProtocolId()
        This method gets the protocol ID.
        protocolId The protocol ID.
      • getRequisitionerId

        public java.lang.String getRequisitionerId()
        This method gets the requisitioner ID.
        requisitionerId The requisitioner ID.
      • getUsersId

        public java.lang.Long getUsersId()
        This method gets the user ID.
        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
        isGeneric in class ControllerCommandImpl
        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
        performExecute in class AbstractECTargetableCommand
        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.
        anAuthType - The authentication type
      • setOrganizationUnitId

        public void setOrganizationUnitId(java.lang.Long orgUnit)
        This method sets the organization unit ID.
        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
        setRequestProperties in class ControllerCommandImpl
        requestProperties -
      • setRequisitionerId

        public void setRequisitionerId(java.lang.String newRequisitionerId)
        This method sets the requisitioner ID.
        newRequisitionerId - The requisitioner ID.
      • setUsersId

        public void setUsersId(java.lang.Long newUserId)
        This method sets the User ID of the owner of the order.