org.apache.synapse.registry
Interface Registry

All Known Implementing Classes:
AbstractRegistry, SimpleURLRegistry

public interface Registry

This is the interface to a Registry from Synapse.


Method Summary
 void delete(String path)
          Deletes a resource in the given path
 RegistryEntry[] getChildren(RegistryEntry entry)
          Returns the child elements of a given registry entry
 Properties getConfigurationProperties()
          Return the list of configuration properties set on this instance
 RegistryEntry[] getDescendants(RegistryEntry entry)
          Returns all descendant entries of the given registry entry
 String getProviderClass()
          Return the name of the implementation class
 RegistryEntry getRegistryEntry(String key)
          Get the registry entry for the given key
 Object getResource(Entry entry, Properties properties)
          This is the publicly used interface to the registry.
 Properties getResourceProperties(String entryKey)
          Get the resource properties of a given resource
 void init(Properties properties)
          Initializes the registry with given properties
 OMNode lookup(String key)
          Perform an actual lookup for for an XML resource as an OMNode for the given key
 void newResource(String path, boolean isDirectory)
          Creates a new resource in the given path
 void updateRegistryEntry(RegistryEntry entry)
          Updates the registry enrty (metadata about a resource)
 void updateResource(String path, Object value)
          Updates the value of a resource
 

Method Detail

init

void init(Properties properties)
Initializes the registry with given properties

Parameters:
properties - The configuration properties

lookup

OMNode lookup(String key)
Perform an actual lookup for for an XML resource as an OMNode for the given key

Parameters:
key - the key for the registry lookup
Returns:
the XML content from the registry as an OMNode

getResource

Object getResource(Entry entry,
                   Properties properties)
This is the publicly used interface to the registry. It will fetch the content from the registry and cache if required.

Parameters:
entry - the registry Entry
properties -
Returns:
the value from the registry or local cache
See Also:
AbstractRegistry

getRegistryEntry

RegistryEntry getRegistryEntry(String key)
Get the registry entry for the given key

Parameters:
key - the registry key
Returns:
The registry entry for the given key

getChildren

RegistryEntry[] getChildren(RegistryEntry entry)
Returns the child elements of a given registry entry

Parameters:
entry - - parent registry entry
Returns:
Array of child registry entries of the given parent registry entry

getDescendants

RegistryEntry[] getDescendants(RegistryEntry entry)
Returns all descendant entries of the given registry entry

Parameters:
entry - - parent registry entry
Returns:
Array of decendant registry entries of the given registry entry

getProviderClass

String getProviderClass()
Return the name of the implementation class

Returns:
name of the registry provider implementation class name

getConfigurationProperties

Properties getConfigurationProperties()
Return the list of configuration properties set on this instance

Returns:
a Map of configuration properties

delete

void delete(String path)
Deletes a resource in the given path

Parameters:
path - The path the of resource

newResource

void newResource(String path,
                 boolean isDirectory)
Creates a new resource in the given path

Parameters:
path - The new resource path
isDirectory - Whether resource is a collection or not

updateResource

void updateResource(String path,
                    Object value)
Updates the value of a resource

Parameters:
path - The resource to be updated
value - The value to be set

updateRegistryEntry

void updateRegistryEntry(RegistryEntry entry)
Updates the registry enrty (metadata about a resource)

Parameters:
entry - The registry entry

getResourceProperties

Properties getResourceProperties(String entryKey)
Get the resource properties of a given resource

Parameters:
entryKey - The registry entry


Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.