psdi.app.invoice

Class InvoiceStatusHandler

  • All Implemented Interfaces:
    MboConstants


    public class InvoiceStatusHandler
    extends StatusHandler
    Handles all the status changes for a invoice object.
    • Constructor Detail

      • InvoiceStatusHandler

        public InvoiceStatusHandler(StatefulMbo sm)
        Construct the invoice status handler.
        Parameters:
        sm -
    • Method Detail

      • checkStatusChangeAuthorization

        public void checkStatusChangeAuthorization(java.lang.String desiredStatus)
                                            throws MXException,
                                                   java.rmi.RemoteException
        Determines which statuses to show in the list returned by the Mbo's getStatusList method. This test determines whether a status change is possible by only checking the user's security and the current status of the invoice.
        Specified by:
        checkStatusChangeAuthorization in class StatusHandler
        Parameters:
        currentStatus - The invoice's current status.
        desiredStatus - The status to change the invoice to. This is the synonym value.
        Throws:
        MXException - Throws an access exception with group key "access" and error key "notauthorized" if the user does not have security for a status change.
        MXApplicationException - (invoice, InvalidStatusChange) This status change is not allowed.
        java.rmi.RemoteException
        See Also:
        The calling method.
      • getOptionName

        public static java.lang.String getOptionName(java.lang.String status)
        Given a Invoice 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.
      • 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, a MXAccessException is thrown. The status specified are external values.
        Overrides:
        canChangeStatus in class StatusHandler
        Parameters:
        currentStatus - The invoice's current status.
        desiredStatus - The status to change the invoice to. This is the synonym value.
        Throws:
        MXApplicationException - (invoice, InvalidStatusChange) This status change is not allowed.
        MXException
        java.rmi.RemoteException
      • changeStatus

        public void changeStatus(java.lang.String currentStatus,
                                 java.lang.String desiredStatus,
                                 java.util.Date date,
                                 java.lang.String memo)
                          throws MXException,
                                 java.rmi.RemoteException
        Change the status from the current state to a desired state.
        Overrides:
        changeStatus in class StatusHandler
        Parameters:
        currentStatus - The parent invoice's current status.
        desiredStatus - The status to change to.
        date - The date as of the status change is to be made.
        memo - Memo field to record any comments about this status change.
        Throws:
        MXApplicationException - (invoice, StatusDate)
        MXException
        java.rmi.RemoteException