Class OrderPatch
java.lang.Object
org.apache.jackrabbit.webdav.ordering.OrderPatch
- All Implemented Interfaces:
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 >
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classInternal classMemberrepresents the 'Order-Member' children elements of an 'OrderPatch' request body present in the ORDERPATCH request. -
Field Summary
Fields inherited from interface org.apache.jackrabbit.webdav.ordering.OrderingConstants
HEADER_ORDERING_TYPE, HEADER_POSITION, NAMESPACE, ORDERING_TYPE, ORDERING_TYPE_CUSTOM, ORDERING_TYPE_UNORDERED, SUPPORTED_LIVE_PROPERTY_SET, SUPPORTED_METHOD_SET, XML_AFTER, XML_BEFORE, XML_FIRST, XML_LAST, XML_ORDER_MEMBER, XML_ORDERING_TYPE, XML_ORDERPATCH, XML_POSITION, XML_SEGMENT -
Constructor Summary
ConstructorsConstructorDescriptionOrderPatch(String orderingType, OrderPatch.Member instruction) Create a newOrderPathobject.OrderPatch(String orderingType, OrderPatch.Member[] instructions) Create a newOrderPathobject. -
Method Summary
Modifier and TypeMethodDescriptionstatic OrderPatchcreateFromXml(Element orderPatchElement) Create a newOrderPathobject.Return the ordering type.Return an array ofOrderPatch.Memberobjects defining the re-ordering instructions to be applied to the requested resource.Returns the xml representation of the implementing object asElement.
-
Constructor Details
-
OrderPatch
Create a newOrderPathobject.- Parameters:
orderingType-instruction-
-
OrderPatch
Create a newOrderPathobject.- Parameters:
orderingType-instructions-
-
-
Method Details
-
getOrderingType
Return the ordering type.- Returns:
- ordering type
-
getOrderInstructions
Return an array ofOrderPatch.Memberobjects defining the re-ordering instructions to be applied to the requested resource.- Returns:
- ordering instructions.
-
toXml
Description copied from interface:XmlSerializableReturns the xml representation of the implementing object asElement. The givenDocumentis used as factory and represents theowner documentof the returned DOM element.- Specified by:
toXmlin interfaceXmlSerializable- Parameters:
document-- Returns:
-
createFromXml
Create a newOrderPathobject.- Parameters:
orderPatchElement-- Throws:
IllegalArgumentException- if the specified Xml element was not valid.DavException
-