Class MergeInfo

  • All Implemented Interfaces:
    DeltaVConstants, XmlSerializable

    public class MergeInfo
    extends Object
    implements DeltaVConstants, XmlSerializable
    MergeInfo encapsulates the information present in the DAV:merge element, that forms the mandatory request body of a MERGE request.
    The DAV:merge element is specified to have the following form.
     <!ELEMENT merge ANY>
     ANY value: A sequence of elements with one DAV:source element, at most one
     DAV:no-auto-merge element, at most one DAV:no-checkout element, at most one
     DAV:prop element, and any legal set of elements that can occur in a DAV:checkout
     element.
     <!ELEMENT source (href+)>
     <!ELEMENT no-auto-merge EMPTY>
     <!ELEMENT no-checkout EMPTY>
     prop: see RFC 2518, Section 12.11
     
    • Constructor Detail

      • MergeInfo

        public MergeInfo​(Element mergeElement)
                  throws DavException
        Create a new MergeInfo
        Parameters:
        mergeElement -
        Throws:
        DavException - if the mergeElement is null or not a DAV:merge element.
    • Method Detail

      • getSourceHrefs

        public String[] getSourceHrefs()
        Returns the URL specified with the DAV:source element or null if no such child element is present in the DAV:merge element.
        Returns:
        href present in the DAV:source child element or null.
      • isNoAutoMerge

        public boolean isNoAutoMerge()
        Returns true if the DAV:merge element contains a DAV:no-auto-merge child element.
        Returns:
        true if the DAV:merge element contains a DAV:no-auto-merge child.
      • isNoCheckout

        public boolean isNoCheckout()
        Returns true if the DAV:merge element contains a DAV:no-checkout child element.
        Returns:
        true if the DAV:merge element contains a DAV:no-checkout child
      • getPropertyNameSet

        public DavPropertyNameSet getPropertyNameSet()
        Returns a DavPropertyNameSet. If the DAV:merge 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.
      • getMergeElement

        public Element getMergeElement()
        Returns the DAV:merge element used to create this MergeInfo object.
        Returns:
        DAV:merge element
      • createMergeElement

        public static Element createMergeElement​(String[] mergeSource,
                                                 boolean isNoAutoMerge,
                                                 boolean isNoCheckout,
                                                 Document factory)
        Factory method to create a minimal DAV:merge element to create a new MergeInfo object.
        Parameters:
        mergeSource -
        isNoAutoMerge -
        isNoCheckout -
        factory -
        Returns: