Package org.apache.synapse.registry
Interface Registry
-
- All Known Implementing Classes:
AbstractRegistry,SimpleURLRegistry,UnitTestMockRegistry
public interface RegistryThis is the interface to a Registry from Synapse.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddelete(String path)Deletes a resource in the given pathRegistryEntry[]getChildren(RegistryEntry entry)Returns the child elements of a given registry entryPropertiesgetConfigurationProperties()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.OMElementgetFormat(Entry entry)StringgetProviderClass()Return the name of the implementation classRegistryEntrygetRegistryEntry(String key)Get the registry entry for the given keyObjectgetResource(Entry entry, Properties properties)This is the publicly used interface to the registry.PropertiesgetResourceProperties(String entryKey)Get the resource properties of a given resourcevoidinit(Properties properties)Initializes the registry with given propertiesbooleanisResourceExists(String path)Check if a resource existsorg.apache.axiom.om.OMNodelookup(String key)Perform an actual lookup for for an XML resource as an OMNode for the given keyorg.apache.axiom.om.OMNodelookupFormat(String key)voidnewNonEmptyResource(String path, boolean isDirectory, String contentType, String content, String propertyName)voidnewResource(String path, boolean isDirectory)Creates a new resource in the given pathvoidupdateRegistryEntry(RegistryEntry entry)Updates the registry enrty (metadata about a resource)voidupdateResource(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
-
-