smbdav
Class PropertiesDirector

java.lang.Object
  extended bysmbdav.PropertiesDirector

public class PropertiesDirector
extends java.lang.Object

This class directs a PropertiesBuilder in the creation and retrieval of a PROPFIND result XML document.

Author:
Eric Glass

Constructor Summary
PropertiesDirector(PropertiesBuilder builder, jcifs.smb.SmbFileFilter filter)
          Creates a PropertiesDirector which uses the specified builder to create the PROPFIND XML document.
 
Method Summary
 org.w3c.dom.Document getAllProperties(jcifs.smb.SmbFile file, java.lang.String href, int depth)
          Returns the PROPFIND result XML document for the specified resource containing the names and values of all supported properties.
protected  jcifs.smb.SmbFileFilter getFilter()
          Returns the filter applied when obtaining child resources.
 org.w3c.dom.Document getProperties(jcifs.smb.SmbFile file, java.lang.String href, org.w3c.dom.Element[] props, int depth)
          Returns the PROPFIND result XML document for the specified resource containing the values of the specifed properties.
protected  PropertiesBuilder getPropertiesBuilder()
          Returns the builder used to construct the XML document.
 org.w3c.dom.Document getPropertyNames(jcifs.smb.SmbFile file, java.lang.String href, int depth)
          Returns the PROPFIND result XML document for the specified resource containing the names of all supported properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesDirector

public PropertiesDirector(PropertiesBuilder builder,
                          jcifs.smb.SmbFileFilter filter)
Creates a PropertiesDirector which uses the specified builder to create the PROPFIND XML document.

Parameters:
builder - The PropertiesBuilder used to create the PROPFIND result XML document.
filter - An SmbFileFilter to apply when obtaining child resources.
Method Detail

getPropertyNames

public org.w3c.dom.Document getPropertyNames(jcifs.smb.SmbFile file,
                                             java.lang.String href,
                                             int depth)
                                      throws java.io.IOException
Returns the PROPFIND result XML document for the specified resource containing the names of all supported properties.

Parameters:
file - The resource whose property names are to be retrieved.
href - The HTTP URL by which the resource was accessed.
depth - The depth to which the request is applied. One of SmbDAVUtilities.RESOURCE_ONLY_DEPTH (applied to the resource only), SmbDAVUtilities.CHILDREN_DEPTH (applied to the resource and its immediate children), or SmbDAVUtilities.INFINITE_DEPTH (the resource and all of its progeny).
Returns:
An XML Document containing the PROPFIND result.
Throws:
java.io.IOException - If an IO error occurs during the construction of the document.

getAllProperties

public org.w3c.dom.Document getAllProperties(jcifs.smb.SmbFile file,
                                             java.lang.String href,
                                             int depth)
                                      throws java.io.IOException
Returns the PROPFIND result XML document for the specified resource containing the names and values of all supported properties.

Parameters:
file - The resource whose properties are to be retrieved.
href - The HTTP URL by which the resource was accessed.
depth - The depth to which the request is applied. One of SmbDAVUtilities.RESOURCE_ONLY_DEPTH (applied to the resource only), SmbDAVUtilities.CHILDREN_DEPTH (applied to the resource and its immediate children), or SmbDAVUtilities.INFINITE_DEPTH (the resource and all of its progeny).
Returns:
An XML Document containing the PROPFIND result.
Throws:
java.io.IOException - If an IO error occurs during the construction of the document.

getProperties

public org.w3c.dom.Document getProperties(jcifs.smb.SmbFile file,
                                          java.lang.String href,
                                          org.w3c.dom.Element[] props,
                                          int depth)
                                   throws java.io.IOException
Returns the PROPFIND result XML document for the specified resource containing the values of the specifed properties.

Parameters:
file - The resource whose properties are to be retrieved.
href - The HTTP URL by which the resource was accessed.
props - The names of the properties which are to be retrieved.
depth - The depth to which the request is applied. One of SmbDAVUtilities.RESOURCE_ONLY_DEPTH (applied to the resource only), SmbDAVUtilities.CHILDREN_DEPTH (applied to the resource and its immediate children), or SmbDAVUtilities.INFINITE_DEPTH (the resource and all of its progeny).
Returns:
An XML Document containing the PROPFIND result.
Throws:
java.io.IOException - If an IO error occurs during the construction of the document.

getPropertiesBuilder

protected PropertiesBuilder getPropertiesBuilder()
Returns the builder used to construct the XML document.

Returns:
The PropertiesBuilder object that will be used to create the PROPFIND result XML document.

getFilter

protected jcifs.smb.SmbFileFilter getFilter()
Returns the filter applied when obtaining child resources.

Returns:
The SmbFileFilter object that will be applied to the set of child resources.


Copyright © 2004 Eric Glass