com.ibm.itim.script

Interface ScriptExtension



  • public interface ScriptExtension
    ScriptExtensions are the main method to add new functionality, new scripting objects and methods, into the scripting environment. Each ScriptExtension must have a default constructor so it can be easily created using reflection.
    Since:
    ITIM 5.0
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String ILLEGAL_ARG
      CTGIME212W TMS Message to show that the passed in ScriptInterface does not implement the correct ScriptInterface subclass.
    • Field Detail

      • ILLEGAL_ARG

        static final java.lang.String ILLEGAL_ARG
        CTGIME212W TMS Message to show that the passed in ScriptInterface does not implement the correct ScriptInterface subclass. This message takes two parameters: The names of the ScriptInterface classes that must be implemented as a single String, and the name of the ScriptExtension class.
        See Also:
        Constant Field Values
    • Method Detail

      • getContextItems

        java.util.List getContextItems()
        Get all the scripting objects the extension exports wrapped as ContextItem objects. This method will be called each time a script is run from a ScriptExtensionPoint that defines a particular extension, so it should be fast.
        Returns:
        A List of ContextItem objects.
      • initialize

        void initialize(ScriptInterface si,
                        ScriptContextDAO dao)
                 throws ScriptException,
                        java.lang.IllegalArgumentException
        Initialize the ScriptExtension by providing a reference to the ScriptInterface this extension should use to set its state. Only a ScriptEvaluator should call this method.
        Parameters:
        si - This ScriptInterface must be downcastable to the correct specific type for the given extension.
        dao - The Data Access Object to use to lookup and place items into the scripting environment.
        Throws:
        ScriptException - If an error occurs while initializing the extension.
        java.lang.IllegalArgumentException - If si is not the correct type for the given extension.