Class SearchablePropertyReport
java.lang.Object
org.apache.jackrabbit.webdav.version.report.AbstractReport
org.apache.jackrabbit.webdav.security.report.SearchablePropertyReport
- All Implemented Interfaces:
Report,XmlSerializable
SearchablePropertyReport identifies those properties that may be
searched using the DAV:principal-property-search REPORT.
This report must be supported on all collections identified in the value of
a DAV:principal-collection-set property.
The request body MUST be an empty DAV:principal-search-property-set element.
The response body MUST be a DAV:principal-search-property-set XML element with the following structure:
<!ELEMENT principal-search-property-set (principal-search-property*) > <!ELEMENT principal-search-property (prop, description) > prop: see RFC 2518, Section 12.11 <!ELEMENT description #PCDATA > Human readable description. Note, that the language of the description must be indicated by the xml:lang attribute.Note that a DAV:principal-search-property XML element is required for each property that may be searched with the DAV:principal-property-search REPORT.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe report namestatic final ReportTypeThe report typestatic final StringConstant used for the DAV:principal-search-property-set response element. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPrincipalSearchProperty(DavPropertyName propName, String description, String language) Add a property name that should be listed in the DAV:principal-search-property-set.getType()Returns the registered type of this report.voidinit(DavResource resource, ReportInfo info) Set theDeltaVResourcefor which this report was requested and theReportInfoas specified by the REPORT request body, that defines the details for this report.
Please note that this methods should perform basic validation checks in order to prevent exceptional situations during the xml serialization.booleanReturns true if thisReportwill send aMultiStatusresponse.
Please note that RFC 3253 that the the response must be a 207 Multi-Status, if a Depth request header is present.Returns the xml representation of the implementing object asElement.
-
Field Details
-
REPORT_NAME
The report name- See Also:
-
REPORT_TYPE
The report type -
XML_PRINCIPAL_SEARCH_PROPERTY_SET
Constant used for the DAV:principal-search-property-set response element.- See Also:
-
-
Constructor Details
-
SearchablePropertyReport
public SearchablePropertyReport()
-
-
Method Details
-
getType
Description copied from interface:ReportReturns the registered type of this report.- Returns:
- the type of this report.
- See Also:
-
isMultiStatusReport
public boolean isMultiStatusReport()Description copied from interface:ReportReturns true if thisReportwill send aMultiStatusresponse.
Please note that RFC 3253 that the the response must be a 207 Multi-Status, if a Depth request header is present.- Returns:
- false Status code of after a successful completion must be
200 (ok). - See Also:
-
init
Description copied from interface:ReportSet theDeltaVResourcefor which this report was requested and theReportInfoas specified by the REPORT request body, that defines the details for this report.
Please note that this methods should perform basic validation checks in order to prevent exceptional situations during the xml serialization.- Parameters:
resource-info-- Throws:
DavException- See Also:
-
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.- Parameters:
document- to be used as factory.- Returns:
- a w3c element representing this object
- See Also:
-
addPrincipalSearchProperty
public void addPrincipalSearchProperty(DavPropertyName propName, String description, String language) Add a property name that should be listed in the DAV:principal-search-property-set.- Parameters:
propName- a property name that may be searched in thePrincipalSearchReport.description- Human readable description of the searchable property.language- defines in which language the description is written.- Throws:
IllegalArgumentException- if propName isnull.
-