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 voiddelete(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.OMElementgetFormat(Entry entry)RegistryEntrygetRegistryEntry(String key)Get the registry entry for the given keyvoidinit(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-
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:RegistryPerform 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:RegistryGet the registry entry for the given key- Specified by:
getRegistryEntryin 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:
getFormatin interfaceRegistry- Overrides:
getFormatin classAbstractRegistry- Returns:
- the OMElement of the format from the configuration
-
lookupFormat
public org.apache.axiom.om.OMNode lookupFormat(String key)
- Specified by:
lookupFormatin interfaceRegistry
-
init
public void init(Properties properties)
Description copied from interface:RegistryInitializes the registry with given properties- Specified by:
initin interfaceRegistry- Overrides:
initin classAbstractRegistry- Parameters:
properties- The configuration properties
-
delete
public void delete(String path)
Description copied from interface:RegistryDeletes a resource in the given path
-
newResource
public void newResource(String path, boolean isDirectory)
Description copied from interface:RegistryCreates a new resource in the given path- Specified by:
newResourcein 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:
newNonEmptyResourcein 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:RegistryUpdates the value of a resource- Specified by:
updateResourcein interfaceRegistry- Parameters:
path- The resource to be updatedvalue- The value to be set
-
updateRegistryEntry
public void updateRegistryEntry(RegistryEntry entry)
Description copied from interface:RegistryUpdates the registry enrty (metadata about a resource)- Specified by:
updateRegistryEntryin interfaceRegistry- Parameters:
entry- The registry entry
-
isResourceExists
public boolean isResourceExists(String path)
Description copied from interface:RegistryCheck if a resource exists- Specified by:
isResourceExistsin interfaceRegistry- Parameters:
path- The path of the resource- Returns:
- true if the resource exists
-
getChildren
public RegistryEntry[] getChildren(RegistryEntry entry)
Description copied from interface:RegistryReturns the child elements of a given registry entry- Specified by:
getChildrenin 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:RegistryReturns all descendant entries of the given registry entry- Specified by:
getDescendantsin interfaceRegistry- Parameters:
entry- - parent registry entry- Returns:
- Array of decendant registry entries of the given registry entry
-
-