com.ibm.tivoli.maximo.script

Class ScriptEngineContext

  • java.lang.Object
    • com.ibm.tivoli.maximo.script.ScriptEngineContext
  • All Implemented Interfaces:
    ScriptConstants


    public class ScriptEngineContext
    extends java.lang.Object
    implements ScriptConstants
    Script context class wihich will be associated with specific ThreadLocal
    • Field Detail

      • ERRLOG

        public static java.lang.String ERRLOG
      • OUTLOG

        public static java.lang.String OUTLOG
    • Method Detail

      • getProperties

        public java.util.Map getProperties()
        returns Map of all context properties.
        Returns:
        Map of all context properties.
      • getProperty

        public java.lang.Object getProperty(java.lang.String propName)
        Return proprty value for specified property
        Parameters:
        propName - property name
        Returns:
        property value
      • getStringProperty

        public java.lang.String getStringProperty(java.lang.String propName)
        Return proprty value for specified property as string
        Parameters:
        propName - property name
        Returns:
        property value as string
      • startExecutingScript

        public void startExecutingScript(java.lang.String scriptName)
      • doneExecutingScript

        public void doneExecutingScript(java.lang.String scriptName)
      • isExecutingScript

        public boolean isExecutingScript(java.lang.String scriptName)
      • getIntegerProperty

        public java.lang.Integer getIntegerProperty(java.lang.String propName)
        Return proprty value for specified property as Integer
        Parameters:
        propName - property name
        Returns:
        property value as Integer
      • getLongProperty

        public java.lang.Long getLongProperty(java.lang.String propName)
        Return proprty value for specified property as Long
        Parameters:
        propName - property name
        Returns:
        property value as Long
      • setIntegerProperty

        public void setIntegerProperty(java.lang.String propName,
                                       int val)
        Sets property with integer value
        Parameters:
        propName - property name
        val - the integer value of the property
      • setDoubleProperty

        public void setDoubleProperty(java.lang.String propName,
                                      double val)
        Sets property with double value
        Parameters:
        propName - property name
        val - property value
      • getDoubleProperty

        public java.lang.Double getDoubleProperty(java.lang.String propName)
        Return proprty value for specified property as Double
        Parameters:
        propName - property name
        Returns:
        property value as Double
      • getDateProperty

        public java.util.Date getDateProperty(java.lang.String propName)
        Return proprty value for specified property as Date
        Parameters:
        propName - property name
        Returns:
        property value as Date
      • setProperty

        public void setProperty(java.lang.String propName,
                                java.lang.Object value)
        Sets property with any value
        Parameters:
        propName - property name
        value - property value
      • removeProperty

        public void removeProperty(java.lang.String propName)
        Removes property propName.
        Parameters:
        propName - name of the property.
      • setProperties

        public void setProperties(java.util.Map data)
        Sets properties from the list
        Parameters:
        data - set of properties for the context.
      • getCurrentContext

        public static ScriptEngineContext getCurrentContext()
        Returns Integration Context
        Returns:
        the current IntegrationContext for this thread
      • createCurrentContext

        public static ScriptEngineContext createCurrentContext()
        Creates ScriptEngineContext if its not there and returns it if no ScriptEngineContext is assocoated with the current thread. If current thread has an associated ScriptEngineContext then it will return that context.
        Returns:
        the current ScriptEngineContext for this thread
      • destroyCurrentContext

        public static void destroyCurrentContext()