org.apache.webdav.lib.properties
Class PropertyFactory
java.lang.Object
org.apache.webdav.lib.properties.PropertyFactory
public class PropertyFactory
- extends java.lang.Object
Factory for instanciating Property
s.
Method Summary |
static Property |
create(ResponseEntity response,
org.w3c.dom.Element element)
Creates a new property from an xml element provided in an WebDAV response. |
static void |
register(java.lang.String namespaceUri,
java.lang.String elementName,
java.lang.Class cls)
Registers a new property. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PropertyFactory
public PropertyFactory()
create
public static Property create(ResponseEntity response,
org.w3c.dom.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.
- See Also:
Property
,
BaseProperty
register
public static void register(java.lang.String namespaceUri,
java.lang.String elementName,
java.lang.Class cls)
throws java.lang.NoSuchMethodException,
java.lang.SecurityException
- Registers a new property.
- Parameters:
namespaceUri
- namespace of the propertyelmentName
- name of the propertycls
- class that implements the property. Must have a constructor that
takes two parameters of type ResponseEntity and Element.
- Throws:
java.lang.NoSuchMethodException
- if cls does not implement the required ctor.
java.lang.SecurityException