com.ibm.ism.script.autoscript

Class AutoScript

    • 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

      • AutoScript

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

      • init

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

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Default value for some of the fields of the new Script. The table below shows the default values for each of the attributes listed.
        userdefinedtrue
        createdbyCurrent username
        statusdateCurrent date
        changebyCurrent username
        changedateCurrent date
        statusDraft
        createddateCurrent date
        scriptlanguageFirst supported script engine name
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • getStatusHandler

        protected StatusHandler getStatusHandler()
        Description copied from class: StatefulMbo
        Return the status handler object to be used for the actual changing of the status. This is only called once by the framework. This method must be provided by the Mbo programmer.
        Specified by:
        getStatusHandler in class StatefulMbo
      • getStatusHistory

        protected MboSetRemote getStatusHistory()
                                         throws MXException,
                                                java.rmi.RemoteException
        Description copied from class: StatefulMbo
        Return the MboSet object used for storing the status change history. This method must be provided by the Mbo programmer.
        Specified by:
        getStatusHistory in class StatefulMbo
        Throws:
        MXException
        java.rmi.RemoteException
      • save

        protected void save()
                     throws MXException,
                            java.rmi.RemoteException
        Description copied from class: StatefulMbo
        Overrides the save of Mbo so that a row is added to the status history table when a new object is saved.
        Overrides:
        save in class StatefulMbo
        Throws:
        MXException
        java.rmi.RemoteException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        Description copied from class: Mbo
        Pre-save validation method. Programmer can override with specific rules.
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        scripts cannot be deleted when they are in archived state or when they are being referenced by objects
        Overrides:
        canDelete in class Mbo
        Throws:
        MXApplicationException - With the key "autoscript", and one of the "AUTOSCRIPTNoDeleteArchive", "AUTOSCRIPTNoDeleteActive"
        MXException
        java.rmi.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)
      • modify

        public void modify()
                    throws MXException,
                           java.rmi.RemoteException
        called whenever a field is modified to update the changedate and changeby attributes
        Overrides:
        modify in class Mbo
        Throws:
        MXException
        java.rmi.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. STATUS
        3. STATUSDATE
        4. SCHEDULEDSTATUS
        5. CHANGEDATE
        6. CHANGEBY
        7. CREATEDBYID
        8. CREATEDBYNAME
        9. CREATEDBYPHONE
        10. CREATEDBYEMAIL
        11. CREATEDBY
        12. CREATEDDATE
        13. USERDEFINED
        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
      • getIfaceType

        protected int getIfaceType()
                            throws MXException,
                                   java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getIfaceDirection

        protected java.lang.String getIfaceDirection()
                                              throws MXException,
                                                     java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getIfaceExit

        protected java.lang.String getIfaceExit()
                                         throws MXException,
                                                java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getIfaceBa

        protected java.lang.String getIfaceBa()
                                       throws MXException,
                                              java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • setScriptIfaceValues

        protected void setScriptIfaceValues()
                                     throws MXException,
                                            java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • setScriptIfaceRequiredFields

        protected void setScriptIfaceRequiredFields()
                                             throws MXException,
                                                    java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • validateScriptIfaceFields

        protected void validateScriptIfaceFields()
                                          throws MXException,
                                                 java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • processingClassIface

        protected java.lang.String processingClassIface()
                                                 throws MXException,
                                                        java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • processingClassESIC

        protected java.lang.String processingClassESIC(MboSetRemote ifaceSet)
                                                throws MXException,
                                                       java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException