psdi.app.lictrack

Class MaxLicStatusHandler

  • All Implemented Interfaces:
    MboConstants


    public class MaxLicStatusHandler
    extends StatusHandler
    Handles all the status changes for a MaxLicense object
    • Constructor Detail

      • MaxLicStatusHandler

        public MaxLicStatusHandler(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 License's current status
        desiredStatus - the status to change to
        accessModifier - If this flag is set to NOACCESSCHECK, a License may change status.
        Throws:
        MXApplicationException - (lictrack, invalidstatus) is thrown if the desired status is not legal.
        MXException
        java.rmi.RemoteException
      • checkStatusChangeAuthorization

        public void checkStatusChangeAuthorization(java.lang.String desiredExternalStatus)
                                            throws MXException,
                                                   java.rmi.RemoteException
        Checks to see if the user is authorized 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 asset.
        desiredExternalStatus - The desired external status of the asset.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        checkUserSecurity, possibleStatusChange
      • checkUserSecurity

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

        public void checkUserSecurity(java.lang.String desiredMaxStatus,
                                      boolean applevel)
                               throws MXException,
                                      java.rmi.RemoteException
        Check out the users security in mbo or applevel
        Parameters:
        desiredMaxStatus -
        applevel -
        Throws:
        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
        Set status value.
        Overrides:
        changeStatus in class StatusHandler
        Parameters:
        currentStatus - the Licens's current status
        desiredStatus - the status to change to
        date - the date as of the status change is to be made
        memo - memo text
        Throws:
        MXException
        java.rmi.RemoteException