Class 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

    • Constructor Detail

      • SimpleURLRegistry

        public SimpleURLRegistry()
    • 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
        Specified by:
        lookup in interface Registry
        Parameters:
        key - the key for the registry lookup
        Returns:
        the XML content from the registry as an OMNode
      • getRegistryEntry

        public RegistryEntry getRegistryEntry​(String key)
        Description copied from interface: Registry
        Get the registry entry for the given key
        Specified by:
        getRegistryEntry in interface Registry
        Parameters:
        key - the registry key
        Returns:
        The registry entry for the given key
      • lookupFormat

        public org.apache.axiom.om.OMNode lookupFormat​(String key)
        Specified by:
        lookupFormat in interface Registry
      • init

        public void init​(Properties properties)
        Description copied from interface: Registry
        Initializes the registry with given properties
        Specified by:
        init in interface Registry
        Overrides:
        init in class AbstractRegistry
        Parameters:
        properties - The configuration properties
      • delete

        public void delete​(String path)
        Description copied from interface: Registry
        Deletes a resource in the given path
        Specified by:
        delete in interface Registry
        Parameters:
        path - The path the of resource
      • 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 interface Registry
        Parameters:
        path - The new resource path
        isDirectory - 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 interface Registry
        Parameters:
        path - new Resource path
        isDirectory - whether the resource is a collection or not
        contentType - content type of the resource
        content - 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 interface Registry
        Parameters:
        path - The resource to be updated
        value - 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 interface Registry
        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 interface Registry
        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 interface Registry
        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 interface Registry
        Parameters:
        entry - - parent registry entry
        Returns:
        Array of decendant registry entries of the given registry entry