Class WebdavResources

java.lang.Object
org.apache.webdav.lib.WebdavResources

public class WebdavResources extends Object
This WebdavResources class represents a set of WebDAV resources . Two WebdavResource instances are considered equal, if there getName() method returns the same string.
  • Field Details

    • hrefTable

      Hashtable hrefTable
      The resources for each href and its properties.
  • Constructor Details

    • WebdavResources

      public WebdavResources()
      Default constuctor.
    • WebdavResources

      public WebdavResources(WebdavResource resource)
      This constuctor.
      Parameters:
      resource - A resource to add.
  • Method Details

    • isEmpty

      public boolean isEmpty()
      Test if there is no resource.
      Returns:
      true if it's empty.
    • isThereResourceName

      public boolean isThereResourceName(String resourceName)
      Test if there is a resource called the specified resource name.
      Parameters:
      resourceName - The resource name to check.
    • isThereResource

      public boolean isThereResource(WebdavResource resource)
      Test if there is a resource.
      Parameters:
      resource - The specified resource.
      Returns:
      true if it exists.
    • getResourceNames

      public Enumeration getResourceNames()
      Get an enumeration of the resource names.
      Returns:
      An enumeration of the resource names.
    • getResources

      public Enumeration getResources()
      Get an enumeration of the resources.
      Returns:
      An enumeration of resources.
    • list

      public String[] list()
      Get an array of resource names.
      Returns:
      An array of resource names.
    • listResources

      public WebdavResource[] listResources()
      Get an arraay of resources.
      Returns:
      An array of resources.
    • getResource

      public WebdavResource getResource(String resourceName)
      Get an resource.
      Parameters:
      resourceName - The resource name.
      Returns:
      The wanted resource if it exists.
    • addResource

      public void addResource(String resourceName, WebdavResource resource)
      Maps the resource name to its resource. The resource name could be different from the displayname property. It's useful for representing itself or parent collection.
      Parameters:
      resourceName - The resource name.
      resource - The resource.
      See Also:
    • addResource

      public void addResource(WebdavResource resource)
      Add the specified resource.
      Parameters:
      resource - The resource to add.
    • removeResource

      public WebdavResource removeResource(String resourceName)
      Remove the specified resource name.
      Parameters:
      resourceName - The specified resource name.
      Returns:
      The wanted resource.
    • removeAll

      public void removeAll()
      Remove all resources.
    • toString

      public String toString()
      Return the string for this class.
      Overrides:
      toString in class Object