Class OrderPatch

  • All Implemented Interfaces:
    OrderingConstants, XmlSerializable

    public class OrderPatch
    extends java.lang.Object
    implements OrderingConstants, XmlSerializable
    OrderPatch represents the mandatory request body of an ORDERPATCH request. RFC 3648 defines the following structure for it:
     <!ELEMENT orderpatch (ordering-type?, order-member*) >
     <!ELEMENT order-member (segment, position) >
     <!ELEMENT position (first | last | before | after) >
     <!ELEMENT segment (#PCDATA) >
     <!ELEMENT first EMPTY >
     <!ELEMENT last EMPTY >
     <!ELEMENT before segment >
     <!ELEMENT after segment >
     
    • Constructor Detail

      • OrderPatch

        public OrderPatch​(java.lang.String orderingType,
                          OrderPatch.Member instruction)
        Create a new OrderPath object.
        Parameters:
        orderingType -
        instruction -
      • OrderPatch

        public OrderPatch​(java.lang.String orderingType,
                          OrderPatch.Member[] instructions)
        Create a new OrderPath object.
        Parameters:
        orderingType -
        instructions -
    • Method Detail

      • getOrderingType

        public java.lang.String getOrderingType()
        Return the ordering type.
        Returns:
        ordering type
      • getOrderInstructions

        public OrderPatch.Member[] getOrderInstructions()
        Return an array of OrderPatch.Member objects defining the re-ordering instructions to be applied to the requested resource.
        Returns:
        ordering instructions.
      • 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:
      • createFromXml

        public static OrderPatch createFromXml​(org.w3c.dom.Element orderPatchElement)
                                        throws DavException
        Create a new OrderPath object.
        Parameters:
        orderPatchElement -
        Throws:
        java.lang.IllegalArgumentException - if the specified Xml element was not valid.
        DavException