com.vividsolutions.jump.workbench.model
Class Task

java.lang.Object
  extended by com.vividsolutions.jump.workbench.model.Task
All Implemented Interfaces:
LayerManagerProxy

public class Task
extends java.lang.Object
implements LayerManagerProxy

Whatever the user needs to do a particular task. Currently a thin wrapper around a LayerManager.


Nested Class Summary
static interface Task.NameListener
          Interface: NameListener must respond to task name changing.
 
Constructor Summary
Task()
           
 
Method Summary
 void add(Task.NameListener nameListener)
           
 void addCategory(Category category)
          Called by Java2XML
 java.util.Collection<Category> getCategories()
           
 LayerManager getLayerManager()
           
 java.lang.String getName()
           
 java.io.File getProjectFile()
           
 java.util.Map<javax.xml.namespace.QName,java.lang.Object> getProperties()
          Get all the task properties.
<T> T
getProperty(javax.xml.namespace.QName name)
           Get the value for the named property casting it to the return value.
 void setName(java.lang.String name)
           
 void setProjectFile(java.io.File projectFile)
           
 void setProperties(java.util.Map<javax.xml.namespace.QName,java.lang.Object> properties)
          Set all the task properties.
 void setProperty(javax.xml.namespace.QName name, java.lang.Object value)
          Set the value for the named property.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Task

public Task()
Method Detail

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

add

public void add(Task.NameListener nameListener)

getProjectFile

public java.io.File getProjectFile()

setProjectFile

public void setProjectFile(java.io.File projectFile)

getLayerManager

public LayerManager getLayerManager()
Specified by:
getLayerManager in interface LayerManagerProxy

getCategories

public java.util.Collection<Category> getCategories()

addCategory

public void addCategory(Category category)
Called by Java2XML


setProperty

public void setProperty(javax.xml.namespace.QName name,
                        java.lang.Object value)
Set the value for the named property.

Parameters:
name - The name of the property.
value - The value for the property.

getProperty

public <T> T getProperty(javax.xml.namespace.QName name)

Get the value for the named property casting it to the return value.

Instead of:

 Integer i = (Integer)task.getProperty(...)
 

You can use the following:

 Integer i = task.getProperty(...)
 

Parameters:
name - The name of the property.
Returns:
value The value for the property.

getProperties

public java.util.Map<javax.xml.namespace.QName,java.lang.Object> getProperties()
Get all the task properties.

Returns:
The task properties.

setProperties

public void setProperties(java.util.Map<javax.xml.namespace.QName,java.lang.Object> properties)
Set all the task properties.

Parameters:
properties - The task properties.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object