Class DefaultDavProperty<T>

    • Constructor Detail

      • DefaultDavProperty

        public DefaultDavProperty​(java.lang.String name,
                                  T value,
                                  Namespace namespace,
                                  boolean isInvisibleInAllprop)
        Creates a new WebDAV property with the given namespace, name and value. If the property is intended to be protected the isProtected flag must be set to true.
        Parameters:
        name - the name of the property
        value - the value of the property
        namespace - the namespace of the property
        isInvisibleInAllprop - A value of true, defines this property to be protected. It will not be returned in a DAV:allprop PROPFIND request and cannot be set/removed with a PROPPATCH request.
      • DefaultDavProperty

        public DefaultDavProperty​(java.lang.String name,
                                  T value,
                                  Namespace namespace)
        Creates a new non-protected WebDAV property with the given namespace, name and value.
        Parameters:
        name - the name of the property
        value - the value of the property
        namespace - the namespace of the property
      • DefaultDavProperty

        public DefaultDavProperty​(DavPropertyName name,
                                  T value,
                                  boolean isInvisibleInAllprop)
        Creates a new WebDAV property with the given DavPropertyName and value. If the property is meant to be protected the 'isProtected' flag must be set to true.
        Parameters:
        name - the name of the property
        value - the value of the property
        isInvisibleInAllprop - A value of true, defines this property to be protected. It will not be returned in a DAV:allprop PROPFIND request and cannot be set/removed with a PROPPATCH request.
      • DefaultDavProperty

        public DefaultDavProperty​(DavPropertyName name,
                                  T value)
        Creates a new non- protected WebDAV property with the given DavPropertyName and value.
        Parameters:
        name - the name of the property
        value - the value of the property
    • Method Detail

      • getValue

        public T getValue()
        Returns the value of this property
        Returns:
        the value of this property
      • createFromXml

        public static DefaultDavProperty<?> createFromXml​(org.w3c.dom.Element propertyElement)
        Create a new DefaultDavProperty instance from the given Xml element. Name and namespace of the element are building the DavPropertyName, while the element's content forms the property value. The following logic is applied:
         - empty Element           -> null value
         - single Text content     -> String value
         - single non-Text content -> Element.getContent(0) is used as value
         - other: List obtained from Element.getContent() is used as value
         
        Parameters:
        propertyElement -
        Returns: