org.apache.webdav.lib.properties

Class PropertyFactory


public class PropertyFactory
extends java.lang.Object

Factory for instanciating Propertys.

Method Summary

static Property
create(ResponseEntity response, Element element)
Creates a new property from an xml element provided in an WebDAV response.
static void
register(String namespaceUri, String elementName, Class cls)
Registers a new property.

Method Details

create

public static Property create(ResponseEntity response,
                              Element element)
Creates a new property from an xml element provided in an WebDAV response.

If no property class was registered a BaseProperty will returned.


register

public static void register(String namespaceUri,
                            String elementName,
                            Class cls)
            throws NoSuchMethodException,
                   SecurityException
Registers a new property.
Parameters:
namespaceUri - namespace of the property
cls - class that implements the property. Must have a constructor that takes two parameters of type ResponseEntity and Element.