Class UpdateInfo

  • All Implemented Interfaces:
    DeltaVConstants, XmlSerializable

    public class UpdateInfo
    extends java.lang.Object
    implements DeltaVConstants, XmlSerializable
    UpdateInfo encapsulates the request body of an UPDATE request. RFC 3253 defines the request body as follows:
     <!ELEMENT update ANY>
     ANY value: A sequence of elements with at most one DAV:label-name or
     DAV:version element (but not both).
     In addition at one DAV:prop element can be present.
    
     <!ELEMENT version (href)>
     <!ELEMENT label-name (#PCDATA)> PCDATA value: string
     prop: see RFC 2518, Section 12.11
     
    In order to reflect the complete range of version restoring and updating of nodes defined by JSR170 the definition has been extended:
     <!ELEMENT update ( (version | label-name | workspace ) , (prop)?, (removeExisting)? ) >
     <!ELEMENT version (href+) >
     <!ELEMENT label-name (#PCDATA) >
     <!ELEMENT workspace (href) >
     <!ELEMENT prop ANY >
     <!ELEMENT removeExisting EMPTY >
     
    • Constructor Detail

      • UpdateInfo

        public UpdateInfo​(java.lang.String[] updateSource,
                          int updateType,
                          DavPropertyNameSet propertyNameSet)
      • UpdateInfo

        public UpdateInfo​(org.w3c.dom.Element updateElement)
                   throws DavException
        Create a new UpdateInfo object.
        Parameters:
        updateElement -
        Throws:
        DavException - if the updateElement is null or not a DAV:update element or if the element does not match the required structure.
    • Method Detail

      • getVersionHref

        public java.lang.String[] getVersionHref()
        Returns:
      • getLabelName

        public java.lang.String[] getLabelName()
        Returns:
      • getWorkspaceHref

        public java.lang.String getWorkspaceHref()
        Returns:
      • getPropertyNameSet

        public DavPropertyNameSet getPropertyNameSet()
        Returns a DavPropertyNameSet. If the DAV:update element contains a DAV:prop child element the properties specified therein are included in the set. Otherwise an empty set is returned.

        WARNING: modifying the DavPropertyNameSet returned by this method does not modify this UpdateInfo.

        Returns:
        set listing the properties specified in the DAV:prop element indicating those properties that must be reported in the response body.
      • getUpdateElement

        public org.w3c.dom.Element getUpdateElement()
        Returns:
      • toXml

        public org.w3c.dom.Element toXml​(org.w3c.dom.Document document)
        Description copied from interface: XmlSerializable
        Returns the xml representation of the implementing object as Element. The given Document is used as factory and represents the owner document of the returned DOM element.
        Specified by:
        toXml in interface XmlSerializable
        Parameters:
        document -
        Returns:
        a w3c element representing this object
        See Also:
        XmlSerializable.toXml(Document)
      • createUpdateElement

        public static org.w3c.dom.Element createUpdateElement​(java.lang.String[] updateSource,
                                                              int updateType,
                                                              org.w3c.dom.Document factory)
        Factory method to create the basic structure of an UpdateInfo object.
        Parameters:
        updateSource -
        updateType -
        factory -
        Returns: