All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface w3c.tools.store.ResourceShadower

public interface ResourceShadower
This interface describe the proxy pattern. Resource can be proxied: a given resource can act as if it was some other resource; this interface describe how to access the proxy resource attributes in such cases.


Method Index

 o definesTargetAttribute(int)
Does this shadow object defines the given attribute.
 o definesTargetAttribute(String)
Does this shadow object defines the given attribute (by name).
 o getTargetAttributes()
Get the list of attributes shadowed byt htis shadowing resource.
 o getTargetResource()
Get the resource shadowed by this object.
 o getTargetValue(int, Object)
Get a shadowed attribute value.
 o getTargetValue(String, Object)
Get a shadowed attribute value (by name).
 o setTargetValue(int, Object)
Set a shadowed attribute value.
 o setTargetValue(String, Object)
Set a shadowed attribute value by name.

Methods

 o getTargetResource
 public abstract Resource getTargetResource()
Get the resource shadowed by this object.

Returns:
A Resource instance, or null
 o getTargetAttributes
 public abstract Attribute[] getTargetAttributes()
Get the list of attributes shadowed byt htis shadowing resource.

Returns:
The attribute list of the shadowed object.
 o getTargetValue
 public abstract Object getTargetValue(int idx,
                                       Object def)
Get a shadowed attribute value.

Parameters:
idx - The index of the shadowed attribute.
def - The default return value (if no shadow value defined).
Returns:
The shadowed attribute value, of the provided default.
 o getTargetValue
 public abstract Object getTargetValue(String name,
                                       Object def)
Get a shadowed attribute value (by name).

Parameters:
name - The name of the shadowed attribute.
def - The default return value (if no shadow value defined).
Returns:
The shadowed attribute value, of the provided default.
 o setTargetValue
 public abstract void setTargetValue(int idx,
                                     Object value)
Set a shadowed attribute value.

Parameters:
idx - The index of the attribute to set.
value - Its new value.
 o setTargetValue
 public abstract void setTargetValue(String name,
                                     Object def)
Set a shadowed attribute value by name.

Parameters:
name - The name of the shadowed attribute.
value - Its new value.
 o definesTargetAttribute
 public abstract boolean definesTargetAttribute(int idx)
Does this shadow object defines the given attribute.

Parameters:
idx - The index of the shadowed attribute to test.
 o definesTargetAttribute
 public abstract boolean definesTargetAttribute(String name)
Does this shadow object defines the given attribute (by name).

Parameters:
name - The name of the target attribute.
Returns:
A boolean true if attribute is defined.

All Packages  Class Hierarchy  This Package  Previous  Next  Index