Class ReportType
- java.lang.Object
-
- org.apache.jackrabbit.webdav.version.report.ReportType
-
- All Implemented Interfaces:
DeltaVConstants,XmlSerializable
public class ReportType extends java.lang.Object implements DeltaVConstants, XmlSerializable
ReportType...
-
-
Field Summary
Fields Modifier and Type Field Description static ReportTypeEXPAND_PROPERTYstatic ReportTypeLOCATE_BY_HISTORYstatic ReportTypeVERSION_TREE-
Fields inherited from interface org.apache.jackrabbit.webdav.version.DeltaVConstants
ATTR_NAME, ATTR_NAMESPACE, COMMENT, CREATOR_DISPLAYNAME, HEADER_LABEL, HEADER_LOCATION, NAMESPACE, SUPPORTED_LIVE_PROPERTY_SET, SUPPORTED_METHOD_SET, SUPPORTED_REPORT_SET, VERSION_CONTROLLED_CONFIGURATION, WORKSPACE, XML_ACTIVITY, XML_ACTIVITY_COLLECTION_SET, XML_BASELINE, XML_CHECKOUT, XML_CHECKOUT_CHECKIN, XML_CHECKOUT_UNLOCK_CHECKIN, XML_EXPAND_PROPERTY, XML_LABEL, XML_LABEL_ADD, XML_LABEL_NAME, XML_LABEL_REMOVE, XML_LABEL_SET, XML_LOCATE_BY_HISTORY, XML_LOCKED_CHECKIN, XML_MERGE, XML_N0_AUTO_MERGE, XML_N0_CHECKOUT, XML_OPTIONS, XML_OPTIONS_RESPONSE, XML_PROPERTY, XML_REPORT, XML_SUPPORTED_METHOD, XML_SUPPORTED_REPORT, XML_UPDATE, XML_VERSION, XML_VERSION_HISTORY, XML_VERSION_HISTORY_SET, XML_VERSION_TREE, XML_VH_COLLECTION_SET, XML_WORKSPACE, XML_WSP_COLLECTION_SET
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ReportcreateReport(DeltaVResource resource, ReportInfo info)Creates a newReportwith this type.java.lang.StringgetLocalName()NamespacegetNamespace()java.lang.StringgetReportName()Return the qualified name of thisReportType.static ReportTypegetType(ReportInfo reportInfo)Return theReportTyperequested by the given report info object.booleanisRequestedReportType(ReportInfo reqInfo)Returns true if thisReportTypeis requested by the givenReportInfostatic ReportTyperegister(java.lang.String localName, Namespace namespace, java.lang.Class<? extends Report> reportClass)Register the report type with the given name, namespace and class, that can run that report.org.w3c.dom.ElementtoXml(org.w3c.dom.Document document)Returns an Xml element representing this report type.
-
-
-
Field Detail
-
VERSION_TREE
public static final ReportType VERSION_TREE
-
EXPAND_PROPERTY
public static final ReportType EXPAND_PROPERTY
-
LOCATE_BY_HISTORY
public static final ReportType LOCATE_BY_HISTORY
-
-
Method Detail
-
createReport
public Report createReport(DeltaVResource resource, ReportInfo info) throws DavException
Creates a newReportwith this type.- Returns:
- Throws:
DavException
-
toXml
public org.w3c.dom.Element toXml(org.w3c.dom.Document document)
Returns an Xml element representing this report type. It may be used to build the body for a REPORT request.- Specified by:
toXmlin interfaceXmlSerializable- Parameters:
document-- Returns:
- Xml representation
- See Also:
XmlSerializable.toXml(org.w3c.dom.Document)
-
isRequestedReportType
public boolean isRequestedReportType(ReportInfo reqInfo)
Returns true if thisReportTypeis requested by the givenReportInfo- Parameters:
reqInfo-- Returns:
-
getReportName
public java.lang.String getReportName()
Return the qualified name of thisReportType.- Returns:
- qualified name
-
getLocalName
public java.lang.String getLocalName()
- Returns:
-
getNamespace
public Namespace getNamespace()
- Returns:
-
register
public static ReportType register(java.lang.String localName, Namespace namespace, java.lang.Class<? extends Report> reportClass)
Register the report type with the given name, namespace and class, that can run that report.- Parameters:
localName-namespace-reportClass-- Returns:
- Throws:
java.lang.IllegalArgumentException- if either parameter isnullor if the given class does not implement theReportinterface or if it does not provide an empty constructor.
-
getType
public static ReportType getType(ReportInfo reportInfo)
Return theReportTyperequested by the given report info object.- Parameters:
reportInfo-- Returns:
- the requested
ReportType - Throws:
java.lang.IllegalArgumentException- if the reportInfo isnullor if the requested report type has not been registered yet.
-
-