Class Script

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class Script
    extends java.lang.Object
    implements java.lang.Cloneable
    This is a container for a script. It contains some informations about a beanshell script:
    1. of course the script text itself
    2. the unit or unitcontainer number
    3. the last known cursor position (or null)
    4. the priority of this script inside the group of scripts of the same type
    Version:
    1.0, 12.04.2008
    Author:
    Thoralf Rickert
    • Constructor Summary

      Constructors 
      Constructor Description
      Script​(java.lang.String containerId, int scripttype, ContainerType type, java.lang.String script)
      Creates a new script
      Script​(org.w3c.dom.Element node)
      Creates a script from an XML document block.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object clone()  
      java.lang.String getContainerId()
      Returns the value of containerId.
      int getCursor()
      Returns the value of cursor.
      Priority getPriority()
      Returns the value of priority.
      java.lang.String getScript()
      Returns the value of script.
      ContainerType getType()
      Returns the value of type.
      void setContainerId​(java.lang.String containerId)
      Sets the value of containerId.
      void setCursor​(int cursor)
      Sets the value of cursor.
      void setPriority​(Priority priority)
      Sets the value of priority.
      void setScript​(java.lang.String script)
      Sets the value of script.
      void setType​(ContainerType type)
      Sets the value of type.
      void toXML​(java.io.PrintWriter writer)
      Writes this block as XML.
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • SCRIPTTYPE_UNKNOWN

        public static final int SCRIPTTYPE_UNKNOWN
        A script of unknown type.
        See Also:
        Constant Field Values
      • SCRIPTTYPE_LIBRARY

        public static final int SCRIPTTYPE_LIBRARY
        A library script.
        See Also:
        Constant Field Values
      • SCRIPTTYPE_CONTAINER

        public static final int SCRIPTTYPE_CONTAINER
        A unit container's script.
        See Also:
        Constant Field Values
      • SCRIPTTYPE_UNIT

        public static final int SCRIPTTYPE_UNIT
        A unit's script.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Script

        public Script​(java.lang.String containerId,
                      int scripttype,
                      ContainerType type,
                      java.lang.String script)
        Creates a new script
      • Script

        public Script​(org.w3c.dom.Element node)
        Creates a script from an XML document block. This can currently be a "library", "container", or "unit" block.
        See Also:
        toXML(PrintWriter)
    • Method Detail

      • getScript

        public java.lang.String getScript()
        Returns the value of script.
        Returns:
        Returns script.
      • setScript

        public void setScript​(java.lang.String script)
        Sets the value of script.
        Parameters:
        script - The value for script.
      • getCursor

        public int getCursor()
        Returns the value of cursor.
        Returns:
        Returns cursor.
      • setCursor

        public void setCursor​(int cursor)
        Sets the value of cursor.
        Parameters:
        cursor - The value for cursor.
      • getPriority

        public Priority getPriority()
        Returns the value of priority.
        Returns:
        Returns priority.
      • setPriority

        public void setPriority​(Priority priority)
        Sets the value of priority.
        Parameters:
        priority - The value for priority.
      • getContainerId

        public java.lang.String getContainerId()
        Returns the value of containerId.
        Returns:
        Returns containerId.
      • setContainerId

        public void setContainerId​(java.lang.String containerId)
        Sets the value of containerId.
        Parameters:
        containerId - The value for containerId.
      • getType

        public ContainerType getType()
        Returns the value of type.
        Returns:
        Returns type.
      • setType

        public void setType​(ContainerType type)
        Sets the value of type.
        Parameters:
        type - The value for type.
      • toXML

        public void toXML​(java.io.PrintWriter writer)
        Writes this block as XML.
        See Also:
        Script(Element)
      • clone

        public java.lang.Object clone()
        Overrides:
        clone in class java.lang.Object
        See Also:
        Object.clone()