smbdav
Class DefaultPropertiesBuilder

java.lang.Object
  extended bysmbdav.DefaultPropertiesBuilder
All Implemented Interfaces:
PropertiesBuilder

public class DefaultPropertiesBuilder
extends java.lang.Object
implements PropertiesBuilder

Default builder for the PROPFIND result XML document. This builder supports retrieval for most of the basic WebDAV properties.

Author:
Eric Glass

Constructor Summary
DefaultPropertiesBuilder()
           
 
Method Summary
 void addAllProps(org.w3c.dom.Document document, jcifs.smb.SmbFile file, java.lang.String href)
          Adds a response containing the names and values of all properties supported by the given resource.
 void addPropNames(org.w3c.dom.Document document, jcifs.smb.SmbFile file, java.lang.String href)
          Adds a response containing the property names supported by the given resource.
 void addProps(org.w3c.dom.Document document, jcifs.smb.SmbFile file, java.lang.String href, org.w3c.dom.Element[] props)
          Adds a response containing the names and values of the properties specified by the given Element array.
 org.w3c.dom.Document createDocument()
          Creates an XML document in which a result can be built.
 void destroy()
           
protected  javax.servlet.ServletConfig getServletConfig()
          Returns the servlet configuration.
 void init(javax.servlet.ServletConfig config)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPropertiesBuilder

public DefaultPropertiesBuilder()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Specified by:
init in interface PropertiesBuilder
Throws:
javax.servlet.ServletException

destroy

public void destroy()
Specified by:
destroy in interface PropertiesBuilder

addPropNames

public void addPropNames(org.w3c.dom.Document document,
                         jcifs.smb.SmbFile file,
                         java.lang.String href)
                  throws java.io.IOException
Description copied from interface: PropertiesBuilder
Adds a response containing the property names supported by the given resource.

Specified by:
addPropNames in interface PropertiesBuilder
Parameters:
document - The document to which modifications are made.
file - The SmbFile resource whose property names are to be retrieved.
href - The HTTP URL by which the resource was accessed.
Throws:
java.io.IOException - If an IO error occurs while adding the property names.

addAllProps

public void addAllProps(org.w3c.dom.Document document,
                        jcifs.smb.SmbFile file,
                        java.lang.String href)
                 throws java.io.IOException
Description copied from interface: PropertiesBuilder
Adds a response containing the names and values of all properties supported by the given resource.

Specified by:
addAllProps in interface PropertiesBuilder
Parameters:
file - The SmbFile resource whose property names and values are to be retrieved.
href - The HTTP URL by which the resource was accessed.
Throws:
java.io.IOException - If an IO error occurs while adding the properties.

addProps

public void addProps(org.w3c.dom.Document document,
                     jcifs.smb.SmbFile file,
                     java.lang.String href,
                     org.w3c.dom.Element[] props)
              throws java.io.IOException
Description copied from interface: PropertiesBuilder
Adds a response containing the names and values of the properties specified by the given Element array.

Specified by:
addProps in interface PropertiesBuilder
Parameters:
file - The SmbFile resource whose properties are to be retrieved.
href - The HTTP URL by which the resource was accessed.
props - An array of Elements, each of which specifies the name of a property to be retrieved.
Throws:
java.io.IOException - If an IO error occurs while adding the properties.

createDocument

public org.w3c.dom.Document createDocument()
Description copied from interface: PropertiesBuilder
Creates an XML document in which a result can be built.

Specified by:
createDocument in interface PropertiesBuilder
Returns:
A Document object to hold the resulting XML.

getServletConfig

protected javax.servlet.ServletConfig getServletConfig()
Returns the servlet configuration.

Returns:
A ServletConfig containing the servlet's configuration information.


Copyright © 2004 Eric Glass