Package org.apache.synapse.registry.url
Class SimpleURLRegistry
- java.lang.Object
-
- org.apache.synapse.registry.AbstractRegistry
-
- org.apache.synapse.registry.url.SimpleURLRegistry
-
- All Implemented Interfaces:
Registry
public class SimpleURLRegistry extends AbstractRegistry implements Registry
A Simple HTTP GET based registry which will work with a Web Server / WebDAV This saves the root server URL, and appends the a given key to construct the full URL to locate resources
-
-
Field Summary
-
Fields inherited from class org.apache.synapse.registry.AbstractRegistry
properties
-
-
Constructor Summary
Constructors Constructor Description SimpleURLRegistry()
-
Method Summary
All Methods Instance Methods Concrete 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 entryRegistryEntry[]
getDescendants(RegistryEntry entry)
Returns all descendant entries of the given registry entryorg.apache.axiom.om.OMElement
getFormat(Entry entry)
RegistryEntry
getRegistryEntry(String key)
Get the registry entry for the given keyvoid
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-
Methods inherited from class org.apache.synapse.registry.AbstractRegistry
getConfigurationProperties, getProviderClass, getResource, getResourceProperties
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.synapse.registry.Registry
getConfigurationProperties, getProviderClass, getResource, getResourceProperties
-
-
-
-
Method Detail
-
lookup
public org.apache.axiom.om.OMNode lookup(String key)
Description copied from interface:Registry
Perform an actual lookup for for an XML resource as an OMNode for the given key
-
getRegistryEntry
public RegistryEntry getRegistryEntry(String key)
Description copied from interface:Registry
Get the registry entry for the given key- Specified by:
getRegistryEntry
in interfaceRegistry
- Parameters:
key
- the registry key- Returns:
- The registry entry for the given key
-
getFormat
public org.apache.axiom.om.OMElement getFormat(Entry entry)
- Specified by:
getFormat
in interfaceRegistry
- Overrides:
getFormat
in classAbstractRegistry
- Returns:
- the OMElement of the format from the configuration
-
lookupFormat
public org.apache.axiom.om.OMNode lookupFormat(String key)
- Specified by:
lookupFormat
in interfaceRegistry
-
init
public void init(Properties properties)
Description copied from interface:Registry
Initializes the registry with given properties- Specified by:
init
in interfaceRegistry
- Overrides:
init
in classAbstractRegistry
- Parameters:
properties
- The configuration properties
-
delete
public void delete(String path)
Description copied from interface:Registry
Deletes a resource in the given path
-
newResource
public void newResource(String path, boolean isDirectory)
Description copied from interface:Registry
Creates a new resource in the given path- Specified by:
newResource
in interfaceRegistry
- Parameters:
path
- The new resource pathisDirectory
- Whether resource is a collection or not
-
newNonEmptyResource
public void newNonEmptyResource(String path, boolean isDirectory, String contentType, String content, String propertyName)
- Specified by:
newNonEmptyResource
in interfaceRegistry
- Parameters:
path
- new Resource pathisDirectory
- whether the resource is a collection or notcontentType
- content type of the resourcecontent
- resource content
-
updateResource
public void updateResource(String path, Object value)
Description copied from interface:Registry
Updates the value of a resource- Specified by:
updateResource
in interfaceRegistry
- Parameters:
path
- The resource to be updatedvalue
- The value to be set
-
updateRegistryEntry
public void updateRegistryEntry(RegistryEntry entry)
Description copied from interface:Registry
Updates the registry enrty (metadata about a resource)- Specified by:
updateRegistryEntry
in interfaceRegistry
- Parameters:
entry
- The registry entry
-
isResourceExists
public boolean isResourceExists(String path)
Description copied from interface:Registry
Check if a resource exists- Specified by:
isResourceExists
in interfaceRegistry
- Parameters:
path
- The path of the resource- Returns:
- true if the resource exists
-
getChildren
public RegistryEntry[] getChildren(RegistryEntry entry)
Description copied from interface:Registry
Returns the child elements of a given registry entry- Specified by:
getChildren
in interfaceRegistry
- Parameters:
entry
- - parent registry entry- Returns:
- Array of child registry entries of the given parent registry entry
-
getDescendants
public RegistryEntry[] getDescendants(RegistryEntry entry)
Description copied from interface:Registry
Returns all descendant entries of the given registry entry- Specified by:
getDescendants
in interfaceRegistry
- Parameters:
entry
- - parent registry entry- Returns:
- Array of decendant registry entries of the given registry entry
-
-