org.ow2.petals.registry.api
Interface RemoteOperations

All Known Subinterfaces:
IncomingManager, IOManager, MessageSender, OutgoingManager, RemoteRegistry

public interface RemoteOperations

The remote operations are used by the registries to communicate. The Information is added in each CRUD operation to be able to send registry information.

Author:
Christophe HAMERLING - eBM WebSourcing

Method Summary
 boolean delete(java.lang.String path, Information information)
          Delete the element from the registry.
 Resource get(java.lang.String path, Information info)
          Get the element from its path only if the path refers to an element.
 java.util.List<Resource> getAll(java.lang.String path, Information info)
          Get all the resources in the given path only if the given path is a directory.
 boolean put(java.lang.String path, Resource resource, Information info)
          Put a resource in the registry.
 java.util.List<Resource> query(Query query, Information info)
           
 

Method Detail

put

boolean put(java.lang.String path,
            Resource resource,
            Information info)
            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,
             Information info)
             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,
                                Information info)
                                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,
               Information information)
               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,
                               Information info)
                               throws RegistryException
Parameters:
query -
info -
Returns:
Throws:
RegistryException


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