Class RegisterRequisitionerCmdImpl

  • All Implemented Interfaces:, ECCommand, ECTargetableCommand, TaskCommand, RegisterRequisitionerCmd,,,,,,

    public class RegisterRequisitionerCmdImpl
    extends TaskCommandImpl
    implements RegisterRequisitionerCmd
    This is the implementation of RegisterRequisitionerCmd. It retrieves the requisitioning user if they are already registered, and registers them as a new requisitioning user if they are not registered. The RegisterRequisitioner command is called by the PunchOutSetup and BatchOrderRequest commands after successfully authenticating the PunchOutSetupRequest and PurchaseOrderRequest messages.
    See Also:
    Serialized Form
    • Field Detail


        public static final java.lang.String COPYRIGHT
        Copyright statement.
        See Also:
        Constant Field Values
    • Constructor Detail

      • RegisterRequisitionerCmdImpl

        public RegisterRequisitionerCmdImpl()
        The RegisterRequisitionerCmdImpl constructor calls its parents constructor.
    • Method Detail

      • getProtocolId

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

        public java.lang.Long getUsersId()
        This method gets the user ID.
        Specified by:
        getUsersId in interface RegisterRequisitionerCmd
        userId The user ID
      • isRegisteredSuccessfully

        public boolean isRegisteredSuccessfully()
        This method checks if a requisitioner registered successfully. Once the command is completed, this method is called to check whether the registration of the requisitioner succeeded.
        Specified by:
        isRegisteredSuccessfully in interface RegisterRequisitionerCmd
        true If the requisitioner is registered successfully; false otherwise.
      • performExecute

        public void performExecute()
                            throws ECException
        The business logic for this task command. This method will verify the required parameters and then lookup the requisitioner using the requisitioner ID. If the requisitioner is registered then update the postbackUrl, sessionId, sessionType, orderStatusUrl and commit the database changes.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface
        performExecute in class AbstractECTargetableCommand
        ECException - Raised when application errors occur.
      • setBuyerId

        public void setBuyerId(long aBuyerId)
        This method sets the buyer ID (ID of the buyer organization).
        Specified by:
        setBuyerId in interface RegisterRequisitionerCmd
        aBuyerId - The buyer ID.
      • setDeptName

        public void setDeptName(java.lang.String aDeptName)
        This method sets the department name (if any) to which the requisitioner belongs to.
        Specified by:
        setDeptName in interface RegisterRequisitionerCmd
        aDeptName - The department name.
      • setOrderStatusUrl

        public void setOrderStatusUrl(java.lang.String anOrderStatusUrl)
        This method sets the order status URL.
        anOrderStatusUrl - The order status URL.
      • setPostbackUrl

        public void setPostbackUrl(java.lang.String aPostbackUrl)
        This method sets the postback URL.
        Specified by:
        setPostbackUrl in interface RegisterRequisitionerCmd
        aPostbackUrl - The URL to use to post back.
      • setProtocolId

        public void setProtocolId(java.lang.Integer aProtocol)
        This method sets the protocol ID.
        Specified by:
        setProtocolId in interface RegisterRequisitionerCmd
        aProtocol - The requisitioner name.
      • setReqId

        public void setReqId(java.lang.String aReqId)
        This method sets the requisitioner ID.
        Specified by:
        setReqId in interface RegisterRequisitionerCmd
        aReqId - The requisitioner ID.
      • setReqName

        public void setReqName(java.lang.String aReqName)
        This method sets the requisitioner name.
        aReqName - The buyer cookie.
      • setSessionId

        public void setSessionId(java.lang.String aSessionId)
        This method sets the session ID.
        Specified by:
        setSessionId in interface RegisterRequisitionerCmd
        aSessionId - The buyer cookie
      • setSessionType

        public void setSessionType(java.lang.String aSessionType)
        This method sets the session type.
        aSessionType - The session type.
      • setSupplierId

        public void setSupplierId(long aSupplierId)
        This method sets the supplier ID.
        Specified by:
        setSupplierId in interface RegisterRequisitionerCmd
        aSupplierId - The supplier ID.
      • setUsersId

        public void setUsersId(java.lang.Long aUserId)
        This method sets the user ID.
        aUserId - The user ID.
      • validateParameters

        public void validateParameters()
                                throws ECException
        This method checks whether all the required parameters are available for authentication. To view the required parameters for each authentication level, see the comments for the class. The required parameters are: requisitionerId, buyerId, and sessionInfo. The requisitionerId and sessionInfo cannot be null. The buyerId cannot equal "-1".

        Specified by:
        validateParameters in interface ECCommand
        validateParameters in class AbstractECTargetableCommand
        ECException - Raised when there is no reqId parameter provided to this command.