psdi.app.labor

Class LaborStatusHandler

  • All Implemented Interfaces:
    MboConstants


    public class LaborStatusHandler
    extends StatusHandler
    Handles all the status changes for a labor object.This is a helper class.
    • Constructor Detail

      • LaborStatusHandler

        public LaborStatusHandler(StatefulMbo sm)
        Constructor
    • 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 current external status of the Labor
        desiredStatus - The desired external status of the Labor
        accessModifier -
        Throws:
        MXApplicationException("LABOR", - "invalidstatus")
        MXException
        java.rmi.RemoteException
        See Also:
        possibleStatusChange, statusChangeMatrix#matrix
      • canInactivate

        protected void canInactivate()
                              throws MXException,
                                     java.rmi.RemoteException
        Inactivate the labor. This is called by status handler. It is not an exposed method on the remote interface. A labor may not be inactivated if it is referenced on an Assignment or WO Plan for a work order that is open, or if the labor is referenced on a job plan.
        Throws:
        MXException
        java.rmi.RemoteException
      • canActivate

        protected void canActivate()
                            throws MXException,
                                   java.rmi.RemoteException
        Activate the labor. This is called by status handler. It is not an exposed method on the remote interface. A labor may only be activated if the person associated with it is active.
        Throws:
        MXException
        java.rmi.RemoteException
      • changeStatus

        public void changeStatus(java.lang.String currentStatus,
                                 java.lang.String status,
                                 java.util.Date asOfDate,
                                 java.lang.String memo)
                          throws MXException,
                                 java.rmi.RemoteException
        Object can over override this method to process pre status change logic. called by statefulmbo
        Overrides:
        changeStatus in class StatusHandler
        Throws:
        MXException
        java.rmi.RemoteException