psdi.app.inspection

Class InspectionFormStatusHandler

  • All Implemented Interfaces:
    MboConstants


    public class InspectionFormStatusHandler
    extends StatusHandler
    Handles all the status changes.This is a helper class.
    • Constructor Detail

      • InspectionFormStatusHandler

        public InspectionFormStatusHandler(StatefulMbo sm)
        Constructor
        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 template.
        Specified by:
        checkStatusChangeAuthorization in class StatusHandler
        Parameters:
        desiredStatus - The status to change the template 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.
        java.rmi.RemoteException
        See Also:
        The calling method.
      • 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 exception is thrown. This method does not check user's security clearance.
        Overrides:
        canChangeStatus in class StatusHandler
        Parameters:
        currentStatus - The work order's current status
        desiredStatus - The status to change the template to. This is the synonym value.
        accessModifier - If this flag is set to NOACCESSCHECK, a work flow controlled template may change status.
        Throws:
        MXException - Throws a MXAccessException with a group key of "template". The error key will be one of: "new", "wappr", "assign", "inprog", "pending", "resolved", "close" depending on the desired status parameter. If called on a work flow controlled template without the NOACCESSCHECK flag, an access exception with "WORKFLOW" & "IllegalStatusChange" is thrown.
        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:
        asOfDate - The date as of the status change is to be made. If null, set to the current date/time.
        currentStatus - The Template's status now.
        memo - Memo text.
        desiredStatus - The status to change to.
        Throws:
        MXException
        java.rmi.RemoteException