org.ow2.wildcat.hierarchy.attribute
Class POJOAttribute

java.lang.Object
  extended by org.ow2.wildcat.hierarchy.attribute.POJOAttribute
All Implemented Interfaces:
Attribute, Mountable

public class POJOAttribute
extends Object
implements Attribute

Attribute holding an object.


Field Summary
protected  Context context
           
protected  Path path
           
protected  Object value
           
 
Constructor Summary
POJOAttribute(Object value)
          Construct a new global POJOAttribute with a given initial value.
POJOAttribute(WEventInterface.Scope scope, Object value)
          Construct a new POJOAttribute with a given initial value and a given scope.
 
Method Summary
 WEventInterface.Scope getScope()
           
 Object getValue()
           
 boolean isMount()
           
 void mount(Context context, Path mountPoint)
          Mount the Mountable.
 void setScope(WEventInterface.Scope scope)
          Set the scope of the events generated when setting the value.
 Object setValue(Object value)
          Set attribute's value.
 void unMount()
          Unmount the Mountable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected Context context

path

protected Path path

value

protected Object value
Constructor Detail

POJOAttribute

public POJOAttribute(WEventInterface.Scope scope,
                     Object value)
Construct a new POJOAttribute with a given initial value and a given scope.

Parameters:
scope - the scope of the events generated when setting the value
value - the initial value

POJOAttribute

public POJOAttribute(Object value)
Construct a new global POJOAttribute with a given initial value.

Parameters:
value - the initial value
Method Detail

getValue

public Object getValue()
Specified by:
getValue in interface Attribute
Returns:
attribute's value

setValue

public Object setValue(Object value)
Description copied from interface: Attribute
Set attribute's value.

Specified by:
setValue in interface Attribute
Parameters:
value - the new value
Returns:
the old value

getScope

public WEventInterface.Scope getScope()
Returns:
the scope of the events generated when setting the value

setScope

public void setScope(WEventInterface.Scope scope)
Set the scope of the events generated when setting the value.

Parameters:
scope - the scope of the events generated when setting the value

isMount

public boolean isMount()
Specified by:
isMount in interface Mountable
Returns:
true if is mount, false else.

mount

public void mount(Context context,
                  Path mountPoint)
Description copied from interface: Mountable
Mount the Mountable.

Specified by:
mount in interface Mountable
Parameters:
context - the context the Mountable is attached
mountPoint - the path to mount it

unMount

public void unMount()
Description copied from interface: Mountable
Unmount the Mountable.

Specified by:
unMount in interface Mountable


Copyright © 2010 OW2 Consortium. All Rights Reserved.