Class PropertyFactory


  • public class PropertyFactory
    extends java.lang.Object
    Factory for instanciating Propertys.
    • Constructor Summary

      Constructors 
      Constructor Description
      PropertyFactory()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      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
    • Constructor Detail

      • PropertyFactory

        public PropertyFactory()
    • Method Detail

      • 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 property
        elmentName - name of the property
        cls - 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