com.ibm.ism.script.autoscript

Class AutoScriptTestContext

  • java.lang.Object
    • com.ibm.ism.script.autoscript.AutoScriptTestContext


  • public class AutoScriptTestContext
    extends java.lang.Object
    Integration context class wihich will be associated with specific ThreadLocal
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      static AutoScriptTestContext createCurrentContext()
      Creates Integration Context if its not there and returnes it if no IntegrationContext is assocoated with the current thread.
      static void destroyCurrentContext() 
      static AutoScriptTestContext getCurrentContext()
      Returns Integration Context
      java.util.Date getDateProperty(java.lang.String propName)
      Return proprty value for specified property as Date
      java.lang.Double getDoubleProperty(java.lang.String propName)
      Return proprty value for specified property as Double
      java.lang.Integer getIntegerProperty(java.lang.String propName)
      Return proprty value for specified property as Integer
      java.lang.String getLog()
      Return proprty value for specified property as string
      java.lang.Long getLongProperty(java.lang.String propName)
      Return proprty value for specified property as Long
      java.util.Map getProperties()
      returns Map of all context properties.
      java.lang.Object getProperty(java.lang.String propName)
      Return proprty value for specified property
      java.lang.String getStringProperty(java.lang.String propName)
      Return proprty value for specified property as string
      void removeProperty(java.lang.String propName)
      Removes property propName.
      void setDoubleProperty(java.lang.String propName, double val)
      Sets property with double value
      void setIntegerProperty(java.lang.String propName, int val)
      Sets property with integer value
      void setLog(java.lang.String value)
      Sets property with any value
      void setProperties(java.util.Map data)
      Sets properties from the list
      void setProperty(java.lang.String propName, java.lang.Object value)
      Sets property with any value
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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
      • getLog

        public java.lang.String getLog()
        Return proprty value for specified property as string
        Parameters:
        propName - property name
        Returns:
        property value as string
      • 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 - property value
      • 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
      • setLog

        public void setLog(java.lang.String 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 AutoScriptTestContext getCurrentContext()
        Returns Integration Context
        Returns:
        the current IntegrationContext for this thread
      • createCurrentContext

        public static AutoScriptTestContext createCurrentContext()
        Creates Integration Context if its not there and returnes it if no IntegrationContext is assocoated with the current thread. If current thread has an associated IntegrationContext then it will return that context irrespective of the value of create.
        Returns:
        the current IntegrationContext for this thread
      • destroyCurrentContext

        public static void destroyCurrentContext()