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