Package org.apache.synapse.registry
Interface Registry
-
- All Known Implementing Classes:
AbstractRegistry
,SimpleURLRegistry
,UnitTestMockRegistry
public interface Registry
This is the interface to a Registry from Synapse.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
delete(String path)
Deletes a resource in the given pathRegistryEntry[]
getChildren(RegistryEntry entry)
Returns the child elements of a given registry entryProperties
getConfigurationProperties()
Return the list of configuration properties set on this instanceRegistryEntry[]
getDescendants(RegistryEntry entry)
Returns all descendant entries of the given registry entryorg.apache.axiom.om.OMElement
getFormat(Entry entry)
String
getProviderClass()
Return the name of the implementation classRegistryEntry
getRegistryEntry(String key)
Get the registry entry for the given keyObject
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 resourcevoid
init(Properties properties)
Initializes the registry with given propertiesboolean
isResourceExists(String path)
Check if a resource existsorg.apache.axiom.om.OMNode
lookup(String key)
Perform an actual lookup for for an XML resource as an OMNode for the given keyorg.apache.axiom.om.OMNode
lookupFormat(String key)
void
newNonEmptyResource(String path, boolean isDirectory, String contentType, String content, String propertyName)
void
newResource(String path, boolean isDirectory)
Creates a new resource in the given pathvoid
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
org.apache.axiom.om.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 Entryproperties
-- 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
-
getFormat
org.apache.axiom.om.OMElement getFormat(Entry entry)
-
lookupFormat
org.apache.axiom.om.OMNode lookupFormat(String 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 pathisDirectory
- Whether resource is a collection or not
-
newNonEmptyResource
void newNonEmptyResource(String path, boolean isDirectory, String contentType, String content, String propertyName)
- Parameters:
path
- new Resource pathisDirectory
- whether the resource is a collection or notcontentType
- content type of the resourcecontent
- resource content
-
updateResource
void updateResource(String path, Object value)
Updates the value of a resource- Parameters:
path
- The resource to be updatedvalue
- 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
-
isResourceExists
boolean isResourceExists(String path)
Check if a resource exists- Parameters:
path
- The path of the resource- Returns:
- true if the resource exists
-
-