Class OptionsInfo
java.lang.Object
org.apache.jackrabbit.webdav.version.OptionsInfo
- All Implemented Interfaces:
XmlSerializable
OptionsInfo represents the Xml request body, that may be present
with a OPTIONS request.
The DAV:options element is specified to have the following form.
<!ELEMENT options ANY> ANY value: A sequence of elements each at most once.Note, that this is a simplified implementation of the very generic definition: We assume that the DAV:options element only contains empty child elements, such as e.g.
DAV:version-history-collection-set
or DAV:workspace-collection-set.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionOptionsInfo(String[] entriesLocalNames) Create a new OptionsInfo with the specified entries. -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsElement(String localName, Namespace namespace) Returns true if a child element with the given name and namespace is present.static OptionsInfocreateFromXml(Element optionsElement) Build anOptionsInfoobject from the root element present in the request body.Returns the xml representation of the implementing object asElement.
-
Constructor Details
-
OptionsInfo
Create a new OptionsInfo with the specified entries. Each entry will be converted to an empty Xml element when callingtoXml. As namespaceDeltaVConstants.NAMESPACEis used.- Parameters:
entriesLocalNames-
-
-
Method Details
-
containsElement
Returns true if a child element with the given name and namespace is present.- Parameters:
localName-namespace-- Returns:
- true if such a child element exists in the options element.
-
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:
- a w3c element representing this object
- See Also:
-
createFromXml
Build anOptionsInfoobject from the root element present in the request body.- Parameters:
optionsElement-- Returns:
- Throws:
DavException- if the optionsElement isnullor not a DAV:options element.
-