org.wso2.registry
Interface CoreRegistry

All Known Subinterfaces:
Registry
All Known Implementing Classes:
InMemoryJDBCRegistry, InMemoryRegistry, JDBCRegistry, RemoteRegistry, SecureRegistry

public interface CoreRegistry

CoreRegistry is the central get/put API for the Registry. This is typically what you want if you're a Java programmer wanting to simply store and manage Resources. Since it's an interface, you don't care if the results come from (say) an embedded file-based Registry or a remote one - that decision (and the resulting cache dynamics, exception throwing, etc) can be made by a factory or dependency injection. If you want programatic access to features like tags/comments/ratings/versions, please have a look at the full Registry interface which extends this one.


Method Summary
 void delete(java.lang.String path)
          Deletes the resource at the given path.
 Resource get(java.lang.String path)
          Returns the resource at the given path.
 java.lang.String put(java.lang.String suggestedPath, Resource resource)
          Adds or updates resources in the registry.
 boolean resourceExists(java.lang.String path)
          Check whether a resource exists at the given path
 

Method Detail

get

Resource get(java.lang.String path)
             throws RegistryException
Returns the resource at the given path.

Parameters:
path - Path of the resource. e.g. /project1/server/deployment.xml
Returns:
Resource instance
Throws:
RegistryException - is thrown if the resource is not in the registry

resourceExists

boolean resourceExists(java.lang.String path)
                       throws RegistryException
Check whether a resource exists at the given path

Parameters:
path - Path of the resource to be checked
Returns:
true if a resource exists at the given path, false otherwise.
Throws:
RegistryException - if an error occurs

put

java.lang.String put(java.lang.String suggestedPath,
                     Resource resource)
                     throws RegistryException
Adds or updates resources in the registry. If there is no resource at the given path, resource is added. If a resource already exist at the given path, it will be replaced with the new resource.

Parameters:
suggestedPath - the path which we'd like to use for the new resource.
resource - Resource instance for the new resource
Returns:
the actual path that the server chose to use for our Resource
Throws:
RegistryException

delete

void delete(java.lang.String path)
            throws RegistryException
Deletes the resource at the given path. If the path refers to a directory, all child resources of the directory will also be deleted.

Parameters:
path - Path of the resource to be deleted.
Throws:
RegistryException - is thrown depending on the implementation.


Copyright © 2007 Apache Web Services Project. All Rights Reserved.