Class ReportInfo
java.lang.Object
org.apache.jackrabbit.webdav.version.report.ReportInfo
- All Implemented Interfaces:
XmlSerializable
The
ReportInfo class encapsulates the body of a REPORT request.
RFC 3253 the top Xml element
being the name of the requested report. In addition a Depth header may
be present (default value: DavConstants.DEPTH_0).-
Constructor Summary
ConstructorsConstructorDescriptionReportInfo(String typeLocalName, Namespace typeNamespace) Create a newReportInfoReportInfo(String typelocalName, Namespace typeNamespace, int depth, DavPropertyNameSet propertyNames) Create a newReportInfoReportInfo(ReportType type) Create a newReportInfoReportInfo(ReportType type, int depth) Create a newReportInfoReportInfo(ReportType type, int depth, DavPropertyNameSet propertyNames) Create a newReportInfoReportInfo(Element reportElement, int depth) Create a newReportInfoobject from the given Xml element. -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsContentElement(String localName, Namespace namespace) Indicates whether this info contains an element with the given name/namespace.getContentElement(String localName, Namespace namespace) Retrieves the Xml element with the given name/namespace that is a child of this info.getContentElements(String localName, Namespace namespace) Returns a list containing all child Xml elements of this info that have the specified name/namespace.intgetDepth()Returns the depth field.Returns aDavPropertyNameSetproviding the property names present in an eventualDavConstants.XML_PROPchild element.Name of the report type that will be / has been requested.voidsetContentElement(Element contentElement) Add the specified Xml element as child of this info.Returns the xml representation of the implementing object asElement.
-
Constructor Details
-
ReportInfo
Create a newReportInfo- Parameters:
type-
-
ReportInfo
Create a newReportInfo- Parameters:
type-depth-
-
ReportInfo
Create a newReportInfo- Parameters:
type-depth-propertyNames-
-
ReportInfo
Create a newReportInfo- Parameters:
typeLocalName-typeNamespace-
-
ReportInfo
public ReportInfo(String typelocalName, Namespace typeNamespace, int depth, DavPropertyNameSet propertyNames) Create a newReportInfo- Parameters:
typelocalName-typeNamespace-depth-propertyNames-
-
ReportInfo
Create a newReportInfoobject from the given Xml element.- Parameters:
reportElement-depth- Depth value as retrieved from theDavConstants.HEADER_DEPTH.- Throws:
DavException- if the report element isnull.
-
-
Method Details
-
getDepth
public int getDepth()Returns the depth field. The request must be applied separately to the collection itself and to all members of the collection that satisfy the depth value.- Returns:
- depth
-
getReportName
Name of the report type that will be / has been requested.- Returns:
- Name of the report type
-
containsContentElement
Indicates whether this info contains an element with the given name/namespace.- Parameters:
localName-namespace-- Returns:
- true if an element with the given name/namespace is present in the body of the request info.
-
getContentElement
Retrieves the Xml element with the given name/namespace that is a child of this info. If no such child existsnullis returned. If multiple elements with the same name exist, the first one is returned.- Parameters:
localName-namespace-- Returns:
- Xml element with the given name/namespace or
null
-
getContentElements
Returns a list containing all child Xml elements of this info that have the specified name/namespace. If this info contains no such element, an empty list is returned.- Parameters:
localName-namespace-- Returns:
- List contain all child elements with the given name/namespace or an empty list.
-
setContentElement
Add the specified Xml element as child of this info.- Parameters:
contentElement-
-
getPropertyNameSet
Returns aDavPropertyNameSetproviding the property names present in an eventualDavConstants.XML_PROPchild element. If no such child element is present an empty set is returned.- Returns:
DavPropertyNameSetproviding the property names present in an eventualDAV:propchild element or an empty set.
-
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:
-