com.ibm.ism.script.autoscript

Class AutoScriptVars

  • java.lang.Object
    • Field Detail

      • skipFieldCopy

        protected static java.util.Set skipFieldCopy
        This is a static HashSet that contains the names of the fields whose values need not be copied from the source Mbo to the target Mbo and is used only for duplication the Script Mbo. This HashSet is loaded in the loadSkipFieldCopyHashSet.
      • isHashSetLoaded

        protected static boolean isHashSetLoaded
        This is a protected boolean variable to check if the HashSet has already been loaded. The HashSet is loaded only once since it is static. The same hashSet can be used by all duplicate methods once it has been loaded
    • Constructor Detail

      • AutoScriptVars

        public AutoScriptVars(MboSet ms)
                       throws java.rmi.RemoteException
        Throws:
        java.rmi.RemoteException
    • Method Detail

      • init

        public void init()
                  throws MXException
        initialization routine. This sets the READONLY flag on script
        Overrides:
        init in class Mbo
        Throws:
        MXException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Description copied from class: Mbo
        This is called when a new Mbo is added to the Mboset collection. It is called AFTER user defaults have been set from the data dictionary. Programmer should usually override this to set some defaults. Default behavior is to do nothing.
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • modify

        public void modify()
                    throws MXException,
                           java.rmi.RemoteException
        This is called whenever a change is made to the attributes of AutoScriptVars. When any field related to AutoScriptVars is changed, AutoScript objects changedate and changeby is updated.
        Overrides:
        modify in class Mbo
        Throws:
        MXException - throws MXException
        java.rmi.RemoteException - throws RemoteException
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        override delete to delete this and records associated with this script
        Specified by:
        delete in interface MboRemote
        Overrides:
        delete in class Mbo
        Parameters:
        accessModifier - The bitwise flag specified to determine if certain normal security checks are to be bypassed for this delete request. For example: if the accessModifer is NOACCESSCHECK, then the check for the object's NODELETE flag and the call to the object's canDelete() method will not be performed. If the accessModifer is NONE, then all the access checks are performed before this object is marked delete.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.delete(long)
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        checks whether the Auto Script variable records can be deleted
        Overrides:
        canDelete in class Mbo
        Throws:
        MXException - throws MXApplicationException if the auto script is user defined
        java.rmi.RemoteException - throws RemoteException
      • loadSkipFieldCopyHashSet

        protected void loadSkipFieldCopyHashSet()
                                         throws MXException,
                                                java.rmi.RemoteException
        Loads the static HashSet with the names of the fields whose values need not be copied from the source Mbo to the target Mbo when a duplicate operation is performed. As an example the statusdate is one of the fields that need not be copied and the hashSet is loaded in the following way skipFieldCopy.add("STATUSDATE") The following is a list of fields that are not copied from the source script to the target script and these are the field names that are loaded into the HashSet.
        1. AUTOSCRIPT
        2. VARNAME
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.skipCopyField(psdi.mbo.MboValueInfo)
      • skipCopyField

        protected boolean skipCopyField(MboValueInfo mvi)
                                 throws java.rmi.RemoteException,
                                        MXException
        Overrides the skipCopyField() in the Mbo. Since this method takes the MboValueInfo as its parameter just check to see if this field needs to be copied or skipped by using the data from the static HashSet. If this field does not need to be copied return true.
        Overrides:
        skipCopyField in class Mbo
        Parameters:
        The - MboValueInfo object of the MboValue that needs to be copied.
        Returns:
        True,if the field does not need to be copied.In all other cases return false
        Throws:
        java.rmi.RemoteException
        MXException
      • isFlagExist

        public boolean isFlagExist(long dbValue,
                                   long compValue)
                            throws MXException,
                                   java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        Called when the mbo is saved to the database. Remove all Mbo's from the set which are nor selected.
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException - Maximo Exception
        java.rmi.RemoteException - Remote Exception