com.ibm.ism.script.autoscript

Class AutoScriptStateHandler

  • All Implemented Interfaces:
    MboConstants


    public class AutoScriptStateHandler
    extends StatusHandler
    Handles all the state changes for a Script object
    • Constructor Detail

      • AutoScriptStateHandler

        public AutoScriptStateHandler(StatefulMbo sm)
        Constructor
    • Method Detail

      • checkStatusChangeAuthorization

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

        public void checkUserSecurity(java.lang.String desiredMaxState)
                               throws MXException,
                                      java.rmi.RemoteException
        Check out the users security rights to call the specified State. Note the State passed in is the INTERNAL State code.
        Note that the SigOption Option Name doesn't always match the State name.
        Parameters:
        State - The State to check if we can change to.
        Throws:
        MXAccessException - Throws an access exception "notauthorized" if the check fails.
        MXException
        java.rmi.RemoteException
      • canChangeStatus

        public void canChangeStatus(java.lang.String currentState,
                                    java.lang.String desiredState,
                                    long accessModifier)
                             throws MXException,
                                    java.rmi.RemoteException
        Defines which State changes are legal. If a State change is not legal, an MXAccessException is thrown. For the script, there is no restriction on changing from one state to another.
        Overrides:
        canChangeStatus in class StatusHandler
        Parameters:
        currentState - the script's current State
        desiredState - the State to change to
        accessModifier - If this flag is set to NOACCESSCHECK, a work flow controlled purchase requisition may change State.
        Throws:
        MXApplicationException - (autoscr, invalidState) is thrown if the desired State is not legal.
        MXException
        java.rmi.RemoteException
      • changeStatus

        public void changeStatus(java.lang.String currentState,
                                 java.lang.String desiredState,
                                 java.util.Date date,
                                 java.lang.String memo)
                          throws MXException,
                                 java.rmi.RemoteException
        Changes the State from the current state to a desired state.
        Overrides:
        changeStatus in class StatusHandler
        Parameters:
        currentState - the script's current State
        desiredState - the State to change to
        date - the date as of the State change is to be made
        memo - memo text
        Throws:
        MXException
        java.rmi.RemoteException
      • postStatusChange

        public void postStatusChange(java.lang.String currentState,
                                     java.lang.String State,
                                     java.util.Date asOfDate,
                                     java.lang.String memo)
                              throws MXException,
                                     java.rmi.RemoteException
        This method is called by the framework's changeState method. Any post processing that needs to be done after State changes must be included in this method.
        Overrides:
        postStatusChange in class StatusHandler
        Throws:
        MXException
        java.rmi.RemoteException