net.sf.pipet.api
Class ModuleAttributes

java.lang.Object
  extended by net.sf.pipet.api.ModuleAttributes
Direct Known Subclasses:
ModuleDefinition

public class ModuleAttributes
extends Object

An object holding the module's configuration. The configuration consists of a set of name/value pairs. The configuration may be hierarchical, which means that name/value pairs may be inherited from a parent ModuleAttributes object.


Nested Class Summary
static interface ModuleAttributes.ChangeListener
           
 
Field Summary
static ModuleAttributes EMPTY
           
 
Constructor Summary
ModuleAttributes()
           
ModuleAttributes(Map<String,net.sf.qxs.types.UntypedValue> atts)
           
ModuleAttributes(ModuleAttributes parent)
           
ModuleAttributes(ModuleAttributes parent, Map<String,net.sf.qxs.types.UntypedValue> atts)
           
 
Method Summary
 void addChangeListener(ModuleAttributes.ChangeListener l)
           
protected  void changed()
           
 net.sf.qxs.types.UntypedValue getDefaultValue(String key)
          Returns the value which would have been returned by getValue(String) if this ModuleAttributes object has no value associated with key.
 ModuleAttributes getInterfaceRoot()
           
 ModuleAttributes getParent()
          Returns the parent of this object (may be null).
 ModuleDefinition getPipelineModule()
           
 ModuleAttributes getRoot()
          Returns the root of this object, which is this, if this has no parent; or the root of the parent, otherwise.
 net.sf.qxs.types.UntypedValue getValue(String key)
          Convenience method for getValue(String,boolean)
 net.sf.qxs.types.UntypedValue getValue(String key, boolean inherit)
          Returns the value associated with key.
 int hashCode()
           
 boolean hasValue(String key)
           
 boolean hasValue(String key, boolean inherit)
           
 void setValue(String key, net.sf.qxs.types.UntypedValue value)
          Assigns a value to a key.
 Map<String,net.sf.qxs.types.UntypedValue> toMap(boolean inherit)
          Returns a Map representation of this ModuleAttributes object.
 int valueHash()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY

public static final ModuleAttributes EMPTY
Constructor Detail

ModuleAttributes

public ModuleAttributes()

ModuleAttributes

public ModuleAttributes(ModuleAttributes parent)

ModuleAttributes

public ModuleAttributes(Map<String,net.sf.qxs.types.UntypedValue> atts)

ModuleAttributes

public ModuleAttributes(ModuleAttributes parent,
                        Map<String,net.sf.qxs.types.UntypedValue> atts)
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class Object

valueHash

public int valueHash()

getParent

public ModuleAttributes getParent()
Returns the parent of this object (may be null).


getRoot

public ModuleAttributes getRoot()
Returns the root of this object, which is


getPipelineModule

public ModuleDefinition getPipelineModule()

getInterfaceRoot

public ModuleAttributes getInterfaceRoot()

hasValue

public boolean hasValue(String key)

hasValue

public boolean hasValue(String key,
                        boolean inherit)

getValue

public net.sf.qxs.types.UntypedValue getValue(String key)
Convenience method for getValue(String,boolean)


getValue

public net.sf.qxs.types.UntypedValue getValue(String key,
                                              boolean inherit)
Returns the value associated with key.

Parameters:
key - A key value.
inherit - if true, the parent's value is returned if key is not present in this ModuleAttributes object; if false, null is returned in that case.
Returns:
The value associated with key, or null if no value is associated with key.

getDefaultValue

public net.sf.qxs.types.UntypedValue getDefaultValue(String key)
Returns the value which would have been returned by getValue(String) if this ModuleAttributes object has no value associated with key.


setValue

public void setValue(String key,
                     net.sf.qxs.types.UntypedValue value)
Assigns a value to a key.

Parameters:
key - The key.
value - The value.

toMap

public Map<String,net.sf.qxs.types.UntypedValue> toMap(boolean inherit)
Returns a Map representation of this ModuleAttributes object.


addChangeListener

public void addChangeListener(ModuleAttributes.ChangeListener l)

changed

protected void changed()


Copyright © 2012 VU University Amsterdam. All Rights Reserved.