org.ow2.petals.registry.api
Interface Operations

All Known Subinterfaces:
CoreRepository, LocalRegistry, Operations, Repository

public interface Operations

The operations allowed by the registry. This is an internal API to not be used by clients since they do not care about the resources but only wnat to get endpoints...

Author:
Christophe HAMERLING - eBM WebSourcing

Method Summary
 boolean delete(java.lang.String path, boolean propagate)
          Delete the element from the registry.
 Resource get(java.lang.String path, boolean remote)
          Get the element from its path only if the path refers to an element.
 java.util.List<Resource> getAll(java.lang.String path, boolean remote)
          Get all the resources in the given path only if the given path is a directory.
 boolean put(java.lang.String path, Resource resource, boolean propagate)
          Put a resource in the registry.
 java.util.List<Resource> query(Query query, boolean remote)
          Get a list of resources under the given path which assert that the endpoint properties match the given ones.
 

Method Detail

put

boolean put(java.lang.String path,
            Resource resource,
            boolean propagate)
            throws RegistryException
Put a resource in the registry.

Parameters:
path - The path to store the resource into. Contains the parent directory and the resource identifier (ie : in /path/to/resource/r1 r1 is the resource identifier) if the resource already exists override, create a new one if not.
resource - The resource to put
Throws:
RegistryException

get

Resource get(java.lang.String path,
             boolean remote)
             throws RegistryException
Get the element from its path only if the path refers to an element. If the path is a directory, it will returns null, please refer to #getAll(String)

Parameters:
path -
Returns:
the resource if found, otherwise it will throw an exception
Throws:
an - exception there is no resource at the given path or if a problem occurs.
RegistryException

getAll

java.util.List<Resource> getAll(java.lang.String path,
                                boolean remote)
                                throws RegistryException
Get all the resources in the given path only if the given path is a directory. If it is, returns all the children, if not, return null... For single resource retrieval, refer to #get(String). Be carefull on the implementation side when trying to get all the resources of all the registries. The best way is that the getAll implementation just returns the resources of the local registry ie its vision of the resources of the network at the current time.

Parameters:
path -
Returns:
Throws:
RegistryException - if the path is not a directory path...

delete

boolean delete(java.lang.String path,
               boolean propagate)
               throws RegistryException
Delete the element from the registry. If the path is a directory, delete all the children of the given path (and the path too...)

Parameters:
key -
Returns:
true if the resource has been deleted, false if not of if not found
Throws:
RegistryException

query

java.util.List<Resource> query(Query query,
                               boolean remote)
                               throws RegistryException
Get a list of resources under the given path which assert that the endpoint properties match the given ones.

Parameters:
query -
Returns:
Throws:
RegistryException


Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.