psdi.app.rfq

Class RFQStatusHandler

  • All Implemented Interfaces:
    MboConstants


    public class RFQStatusHandler
    extends StatusHandler
    Handles all the status changes for the RFQ object.
    • Field Detail

      • statusChangeMatrix

        public static boolean[][] statusChangeMatrix
        A statusChangeMatrix for the legal status changes that can be made.

        Status   INPRG   COMP    SENT   READY  CLOSE  CANCEL 
        INPRG false false true true false true
        COMP false false false false true false
        SENT true true false false true true
        READY true false true false false true
        CLOSE false false false false false false
        CANCEL false false false false false false
        The above table must be read from right to left only.
        For example , if you want to change the status from CLOSE to WAPPR , look at the left for the CLOSE row and look at the intersecting WAPPR column. The value is false. This means that this status change is not allowed.
    • Constructor Detail

      • RFQStatusHandler

        public RFQStatusHandler(StatefulMbo sm)
        Constructs the RFQStatus object.
        Parameters:
        sm - A stateful Mbo
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • canChangeStatus

        public void canChangeStatus(java.lang.String currentStatus,
                                    java.lang.String desiredStatus,
                                    long accessModifier)
                             throws MXException,
                                    java.rmi.RemoteException
        Defines which status changes are legal. If a status change is not legal, an MXAccessException is thrown.

        Overrides:
        canChangeStatus in class StatusHandler
        Parameters:
        currentStatus - The parent Mbo's status now
        desiredStatus - The status to change to
        accessModifier - If this flag is set to NOACCESSCHECK, signature security is not checked. Currently this flag is not using in RFQ.
        Throws:
        MXException
        java.rmi.RemoteException
      • checkStatusChangeAuthorization

        public void checkStatusChangeAuthorization(java.lang.String desiredExternalStatus)
                                            throws MXException,
                                                   java.rmi.RemoteException
        Checks to see if the user is authorised to make a status changes. In other words , it checks if the user has the required privilege to change the status. After ensuring that the user has the required privilege, this methods checks if the status change is legal.
        Specified by:
        checkStatusChangeAuthorization in class StatusHandler
        Parameters:
        currentExternalStatus - The current external status of the RFQ.
        desiredExternalStatus - The desired external status of the RFQ.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        checkUserSecurity
      • getOptionName

        public static java.lang.String getOptionName(java.lang.String status)
        Given a RFQ Status, return the optionName Note the status passed in is the INTERNAL status code.
        The SigOption Option Name doesn't always match the status name.
        Parameters:
        status - The status to return the optionName of.
        Returns:
        optionName The Option Name.
      • changeStatus

        public void changeStatus(java.lang.String currentStatus,
                                 java.lang.String desiredStatus,
                                 java.util.Date asOfDate,
                                 java.lang.String memo)
                          throws MXException,
                                 java.rmi.RemoteException
        Changes the status from the current state to a desired state.

        Overrides:
        changeStatus in class StatusHandler
        Parameters:
        asOfDate - The date as of the status change is to be made. If null, set to the current date/time.
        currentStatus - The parent RFQ's status now
        memo - text
        desiredStatus - The status to change to
        Throws:
        MXException
        java.rmi.RemoteException
      • checkChargeValues

        public void checkChargeValues()
                               throws MXException,
                                      java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException