org.apache.webdav.lib
Class WebdavResources
java.lang.Object
org.apache.webdav.lib.WebdavResources
public class WebdavResources
extends java.lang.Object
This WebdavResources class represents a set of
WebDAV resources
.
Two WebdavResource instances are considered equal, if there
getName()
method returns the same string.
(package private) Hashtable | hrefTable - The resources for each href and its properties.
|
hrefTable
(package private) Hashtable hrefTable
The resources for each href and its properties.
WebdavResources
public WebdavResources()
Default constuctor.
WebdavResources
public WebdavResources(WebdavResource resource)
This constuctor.
resource
- A resource to add.
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.
resourceName
- The resource name.resource
- The resource.
addResource
public void addResource(WebdavResource resource)
Add the specified resource.
resource
- The resource to add.
getResource
public WebdavResource getResource(String resourceName)
Get an resource.
resourceName
- The resource name.
- The wanted resource if it exists.
getResourceNames
public Enumeration getResourceNames()
Get an enumeration of the resource names.
- An enumeration of the resource names.
getResources
public Enumeration getResources()
Get an enumeration of the resources.
- An enumeration of resources.
isEmpty
public boolean isEmpty()
Test if there is no resource.
isThereResource
public boolean isThereResource(WebdavResource resource)
Test if there is a resource.
resource
- The specified resource.
isThereResourceName
public boolean isThereResourceName(String resourceName)
Test if there is a resource called the specified resource name.
resourceName
- The resource name to check.
list
public String[] list()
Get an array of resource names.
- An array of resource names.
listResources
public WebdavResource[] listResources()
Get an arraay of resources.
removeAll
public void removeAll()
Remove all resources.
removeResource
public WebdavResource removeResource(String resourceName)
Remove the specified resource name.
resourceName
- The specified resource name.
toString
public String toString()
Return the string for this class.