org.openbp.cockpit.plugins.variables
Class VariablesContainer

java.lang.Object
  extended by org.openbp.common.generic.description.DescriptionObjectImpl
      extended by org.openbp.common.generic.description.DisplayObjectImpl
          extended by org.openbp.cockpit.plugins.variables.VariablesContainer
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable, Copyable, DescriptionObject, Displayable, DisplayObject, Validatable

public class VariablesContainer
extends DisplayObjectImpl

Container object for the list of process variables of a process. We extend DisplayObject in order to have a nice display in the property browser.

Author:
Heiko Erhardt
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.openbp.common.generic.Copyable
COPY_DEEP, COPY_FIRST_LEVEL, COPY_SHALLOW
 
Constructor Summary
VariablesContainer()
          Value constructor.
VariablesContainer(ProcessItem process, java.util.List processVariableList)
          Value constructor.
 
Method Summary
 void addProcessVariable(ProcessVariable processVariable)
          Adds a process variable.
 void clearProcessVariables()
          Clears the process variables of the process.
 void copyFrom(java.lang.Object source, int copyMode)
          Copies the values of the source object to this object.
 ProcessVariable createProcessVariableListElement()
          Creates a process variable and assigns a unique name to it to.
 ProcessItem getProcess()
          Gets the process that owns the process variables.
 java.util.List getProcessVariableList()
          Gets the process variables of the process.
 java.util.Iterator getProcessVariables()
          Gets the process variables of the process.
 void setProcessVariableList(java.util.List processVariableList)
          Sets the process variables of the process.
 
Methods inherited from class org.openbp.common.generic.description.DisplayObjectImpl
getDisplayName, getDisplayText, setDisplayName
 
Methods inherited from class org.openbp.common.generic.description.DescriptionObjectImpl
clone, compareTo, getDescription, getDescriptionEscape, getDescriptionText, getName, setDescription, setDescriptionEscape, setName, toString, validate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.openbp.common.generic.description.DescriptionObject
clone, getDescription, getDescriptionText, getName, setDescription, setName
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

VariablesContainer

public VariablesContainer()
Value constructor.


VariablesContainer

public VariablesContainer(ProcessItem process,
                          java.util.List processVariableList)
Value constructor.

Parameters:
process - Process that owns the process variables
processVariableList - List of process variables or null
Method Detail

copyFrom

public void copyFrom(java.lang.Object source,
                     int copyMode)
              throws java.lang.CloneNotSupportedException
Copies the values of the source object to this object.

Specified by:
copyFrom in interface Copyable
Overrides:
copyFrom in class DisplayObjectImpl
Parameters:
source - The source object. Must be of the same type as this object.
copyMode - Determines if a deep copy, a first level copy or a shallow copy is to be performed. See the constants of the org.openbp.common.generic.description.Copyable class.
Throws:
java.lang.CloneNotSupportedException - If the cloning of one of the contained objects failed

getProcessVariables

public java.util.Iterator getProcessVariables()
Gets the process variables of the process.

Returns:
An iterator of ProcessVariable objects

createProcessVariableListElement

public ProcessVariable createProcessVariableListElement()
Creates a process variable and assigns a unique name to it to.

Returns:
The new process variable

addProcessVariable

public void addProcessVariable(ProcessVariable processVariable)
Adds a process variable.

Parameters:
processVariable - The process variable to add

clearProcessVariables

public void clearProcessVariables()
Clears the process variables of the process.


getProcessVariableList

public java.util.List getProcessVariableList()
Gets the process variables of the process.

Returns:
A list of ProcessVariable objects

setProcessVariableList

public void setProcessVariableList(java.util.List processVariableList)
Sets the process variables of the process.

Parameters:
processVariableList - A list of ProcessVariable objects

getProcess

public ProcessItem getProcess()
Gets the process that owns the process variables.



Copyright © 2011. All Rights Reserved.