Jacson

de.spieleck.app.jacson.ant
Class ProjectJacsonState

java.lang.Object
  extended byde.spieleck.app.jacson.JacsonState
      extended byde.spieleck.app.jacson.ant.ProjectJacsonState
All Implemented Interfaces:
ConfigParamMap, java.io.Serializable, SimpleParamGetter

public class ProjectJacsonState
extends JacsonState

Wrap the ant Project to an JacsonState, so that the JacsonTask can read/write Ant properties.

Author:
fsn
See Also:
Serialized Form

Field Summary
protected  Project proj
           
 
Fields inherited from class de.spieleck.app.jacson.JacsonState
attributes, chunkNo, parent
 
Constructor Summary
ProjectJacsonState(Project proj)
          Create a ProjectJacsonState to wrap a Project.
ProjectJacsonState(Project proj, java.util.List params)
          Create a ProjectJacsonState to wrap a Project and overwrite some properties by the Task params.
 
Method Summary
 java.lang.Object getContextual(java.lang.String key)
          Get the value to a given key, searching locally and then the parent.
 java.lang.Object getGlobal(java.lang.String key)
          Get the value from the root (no parent) state.
 java.util.Set getLocalKeySet()
          What keys do we have locally ?
protected  JacsonState getParent()
           
protected  JacsonState getRoot()
           
 void putContext(java.lang.String key, java.lang.Object value)
          Store the key/value pair in the most local context containing this key.
 void putGlobal(java.lang.String key, java.lang.Object value)
          Store key/value pair in the root state.
 
Methods inherited from class de.spieleck.app.jacson.JacsonState
expand, get, getChunkNo, getKeySet, getLocal, getParam, incChunkNo, put, putLocal, set, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

proj

protected Project proj
Constructor Detail

ProjectJacsonState

public ProjectJacsonState(Project proj)
Create a ProjectJacsonState to wrap a Project.


ProjectJacsonState

public ProjectJacsonState(Project proj,
                          java.util.List params)
Create a ProjectJacsonState to wrap a Project and overwrite some properties by the Task params.

Method Detail

getContextual

public java.lang.Object getContextual(java.lang.String key)
Description copied from class: JacsonState
Get the value to a given key, searching locally and then the parent.

Overrides:
getContextual in class JacsonState

getGlobal

public java.lang.Object getGlobal(java.lang.String key)
Description copied from class: JacsonState
Get the value from the root (no parent) state. Depending on the driver program the root state is often a special one: It is the ant environment within ant tasks and it is the JJacket environment within jjacket.

Overrides:
getGlobal in class JacsonState

putContext

public void putContext(java.lang.String key,
                       java.lang.Object value)
Description copied from class: JacsonState
Store the key/value pair in the most local context containing this key. This will be root if the key isn't existing yet.

Overrides:
putContext in class JacsonState
Parameters:
key - the name of the object
value - the object to be remembered

getLocalKeySet

public java.util.Set getLocalKeySet()
Description copied from class: JacsonState
What keys do we have locally ?

Overrides:
getLocalKeySet in class JacsonState

putGlobal

public void putGlobal(java.lang.String key,
                      java.lang.Object value)
Description copied from class: JacsonState
Store key/value pair in the root state. Depending on the driver program the root state is often a special one: It is the ant environment within ant tasks and it is the JJacket environment within jjacket.

Overrides:
putGlobal in class JacsonState
Parameters:
key - the name of the object
value - the object to be remembered

getRoot

protected JacsonState getRoot()
Overrides:
getRoot in class JacsonState

getParent

protected JacsonState getParent()
Overrides:
getParent in class JacsonState

Spieleck

Copyleft 2002 spieleck.de.