## org.w3c.jigsaw.admin
Interface RemoteResource

All Known Implementing Classes:
  PlainRemoteResource

public abstract interface RemoteResource

The client side view of a server-side resource. The whole servers state are exported through resources, which allows the administration application to discover and query it using a homogeneous interface. All methods will throw a `RemoteAccessException` in case of network failure.

See Also:
  `ResourceBroker`

Method Summary
`void` | `delete()` Delete that resource, and detach it from its container.
`java.lang.String[]` | `enumerateResourceIdentifiers()`
`Attribute[]` | `getAttributes()` Get the target resource list of attributes.
`java.lang.String[]` | `getClassHierarchy()` Get the target resource class hierarchy.
`RemoteResource[]` | `getFrames()` Get the frames attached to that resource.
`java.lang.Object` | `getValue(java.lang.String attr)`
`java.lang.Object[]` | `getValues(java.lang.String[] attrs)`
`boolean` | `isContainer()`
`boolean` | `isDirectoryResource()`
`boolean` | `isFrame()`
`boolean` | `isFramed()` Is this resource a framed resource ?
`boolean` | `isIndexersCatalog()`
`RemoteResource` | `loadResource(java.lang.String identifier)`
`RemoteResource` | `registerFrame(java.lang.String identifier, java.lang.String classname)` Attach a new frame to that resource.
`RemoteResource` | `registerResource(java.lang.String id, java.lang.String classname)` Register a new resource within this container.
`void` | `reindex()` Reindex the resource's children if this resource is a DirectoryResource.
`void` | `setValue(java.lang.String attr, java.lang.Object value)`
`void` | `setValues(java.lang.String[] attrs, java.lang.Object[] values)` Set a set of attribute values in one shot.
`void` | `unregisterFrame(RemoteResource frame)` Unregister a given frame from that resource.
`void` | `updateURL(java.net.URL parentURL)` Is this resource a filtered resource ?

Method Detail

### getClassHierarchy

    public java.lang.String[] getClassHierarchy()
                                         throws RemoteAccessException

  Get the target resource class hierarchy. This method will return the class hierarchy as an array of String. The first string in the array is the name of the resource class itself, the last string will always be java.lang.Object.
  Returns:
    A String array givimg the target resource's class description.
  Throws:
    RemoteAccessException - If somenetwork failure occured.

### delete

    public void delete()
                throws RemoteAccessException

  Delete that resource, and detach it from its container.
  Throws:
    RemoteAccessException - If somenetwork failure occured.

### reindex

    public void reindex()
                 throws RemoteAccessException

  Reindex the resource's children if this resource is a DirectoryResource.
  Throws:
    RemoteAccessException - If it's not a DirectoryResource

### getAttributes

    public Attribute[] getAttributes()
                              throws RemoteAccessException

  Get the target resource list of attributes. This method returns the target resource attributes description. The resulting array contains instances of the Attribute class, one item per described attributes.

  Even though this returns all the attribute resources, only the ones that are advertized as being editable can be set through this interface.

  Returns:
    An array of Attribute.
  Throws:
    RemoteAccessException - If somenetwork failure occured.

### getValue

    public java.lang.Object getValue(java.lang.String attr)
                              throws RemoteAccessException

  Parameters:
    `name` - The attribute whose value is to be fetched, encoded as its name.
  Throws:
    RemoteAccessException - If somenetwork failure occured.

### getValues

    public java.lang.Object[] getValues(java.lang.String[] attrs)
                                 throws RemoteAccessException

  Parameters:
    `attrs` - The (ordered) set of attributes whose value is to be fetched.
  Returns:
    An (ordered) set of values, one per queried attribute.
  Throws:
    RemoteAccessException - If somenetwork failure occured.

### setValue

    public void setValue(java.lang.String attr,
                         java.lang.Object value)
                  throws RemoteAccessException

  Parameters:
    `attr` - The attribute to set, encoded as it's name.
    `value` - The new value for that attribute.
  Throws:
    RemoteAccessException - If somenetwork failure occured.

### setValues

    public void setValues(java.lang.String[] attrs,
                          java.lang.Object[] values)
                   throws RemoteAccessException

  Set a set of attribute values in one shot. This method guarantees that either all setting is done, or none of them are.
  Parameters:
    `attrs` - The (ordered) list of attribute to set, encoded as their names.
    `values` - The (ordered) list of values, for each of the above attributes.
  Throws:
    RemoteAccessException - If somenetwork failure occured.

### isContainer

    public boolean isContainer()
                        throws RemoteAccessException

  Throws:
    RemoteAccessException - If somenetwork failure occured.

### isDirectoryResource

    public boolean isDirectoryResource()
                                throws RemoteAccessException

### isIndexersCatalog

    public boolean isIndexersCatalog()
                              throws RemoteAccessException

### enumerateResourceIdentifiers

    public java.lang.String[] enumerateResourceIdentifiers()
                                                    throws RemoteAccessException

  Throws:
    RemoteAccessException - If somenetwork failure occured.

### loadResource

    public RemoteResource loadResource(java.lang.String identifier)
                                throws RemoteAccessException

  Throws:
    RemoteAccessException - If somenetwork failure occured.

### registerResource

    public RemoteResource registerResource(java.lang.String id,
                                           java.lang.String classname)
                                    throws RemoteAccessException

  Register a new resource within this container.
  Parameters:
    `id` - The identifier of the resource to be created.
    `classname` - The name of the class of the resource to be added.
  Throws:
    RemoteAccessException - if a remote access error occurs.

### isFramed

    public boolean isFramed()
                     throws RemoteAccessException

  Is this resource a framed resource ?
  Returns:
    A boolean, true if the resource is framed and it currently has some frames attached, false otherwise.
  Throws:
    RemoteAccessException - if a remote access error occurs.

### isFrame

    public boolean isFrame()

### getFrames

    public RemoteResource[] getFrames()
                               throws RemoteAccessException

  Get the frames attached to that resource. Each frame is itself a resource, so it is returned as an instance of a remote resource.
  Returns:
    A (posssibly null) array of frames attached to that resource.
  Throws:
    RemoteAccessException - if a remote access error occurs.

### unregisterFrame

    public void unregisterFrame(RemoteResource frame)
                         throws RemoteAccessException

  Unregister a given frame from that resource.
  Parameters:
    `filter` - The frame to unregister.
  Throws:
    RemoteAccessException - if a remote access error occurs.

### registerFrame

    public RemoteResource registerFrame(java.lang.String identifier,
                                        java.lang.String classname)
                                 throws RemoteAccessException

  Attach a new frame to that resource.
  Parameters:
    `identifier` - The name for this frame (if any).
    `clsname` - The name of the frame's class.
  Returns:
    A remote handle to the (remotely) created frame instance.
  Throws:
    RemoteAccessException - if a remote access error occurs.

### updateURL

    public void updateURL(java.net.URL parentURL)

  Is this resource a filtered resource ?
  Returns:
    A boolean, true if the resource is filtered and it currently has some filters attached, false otherwise.