    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.

##

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

##

getTargetResource

     public abstract Resource getTargetResource()

  Get the resource shadowed by this object.

  Returns:
    A Resource instance, or null

getTargetAttributes

     public abstract Attribute[] getTargetAttributes()

  Get the list of attributes shadowed byt htis shadowing resource.

  Returns:
    The attribute list of the shadowed object.

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.

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.

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.

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.

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.

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