Class PrincipalMatchReport
- java.lang.Object
-
- org.apache.jackrabbit.webdav.version.report.AbstractReport
-
- org.apache.jackrabbit.webdav.security.report.AbstractSecurityReport
-
- org.apache.jackrabbit.webdav.security.report.PrincipalMatchReport
-
- All Implemented Interfaces:
Report,XmlSerializable
public class PrincipalMatchReport extends AbstractSecurityReport
PrincipalMatchReportcan be request for any collection resources. The resulting report identifies member resources that either represent the requesting principal ("principal resources") or contain a specified property that matches the requesting principal in its value. For the first match the request body must contain a DAV:self element, for the latter a DAV:principal-property element which in turn specifies the property to be examined.The request body MUST be a DAV:principal-match XML element:
<!ELEMENT principal-match ((principal-property | self), prop?)> <!ELEMENT principal-property ANY> ANY value: an element whose value identifies a property. The value of this property typically contains an href element referring to a principal. <!ELEMENT self EMPTY> prop: see RFC 2518, Section 12.11
The response body of a successful report must contain a DAV:multistatus element. Each matching member is present with a separate DAV:response element.
-
-
Field Summary
Fields Modifier and Type Field Description static StringREPORT_NAMEThe report namestatic ReportTypeREPORT_TYPEThe report typestatic StringXML_PRINCIPAL_PROPERTYstatic StringXML_SELF-
Fields inherited from class org.apache.jackrabbit.webdav.security.report.AbstractSecurityReport
responses
-
-
Constructor Summary
Constructors Constructor Description PrincipalMatchReport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DavPropertyNamegetPrincipalPropertyName()Retrieve the property name that indicates which property must be search for matching principals.
Note, that the search result must be converted toMultiStatusResponses that must be returned back to this report.ReportTypegetType()Returns the registered type of this report.voidinit(DavResource resource, ReportInfo info)Checks if the given resource and report info are notnull, that the requested report type matches this implementation and that no other Depth header than 0 is present.voidsetResponses(MultiStatusResponse[] responses)Write the result(s) of the match back to the report.-
Methods inherited from class org.apache.jackrabbit.webdav.security.report.AbstractSecurityReport
isMultiStatusReport, toXml
-
Methods inherited from class org.apache.jackrabbit.webdav.version.report.AbstractReport
normalizeResourceHref
-
-
-
-
Field Detail
-
XML_PRINCIPAL_PROPERTY
public static final String XML_PRINCIPAL_PROPERTY
- See Also:
- Constant Field Values
-
XML_SELF
public static final String XML_SELF
- See Also:
- Constant Field Values
-
REPORT_NAME
public static final String REPORT_NAME
The report name- See Also:
- Constant Field Values
-
REPORT_TYPE
public static final ReportType REPORT_TYPE
The report type
-
-
Method Detail
-
getType
public ReportType getType()
Description copied from interface:ReportReturns the registered type of this report.- Returns:
- the type of this report.
- See Also:
Report.getType()
-
init
public void init(DavResource resource, ReportInfo info) throws DavException
Description copied from class:AbstractSecurityReportChecks if the given resource and report info are notnull, that the requested report type matches this implementation and that no other Depth header than 0 is present.- Specified by:
initin interfaceReport- Overrides:
initin classAbstractSecurityReport- Throws:
DavException- See Also:
Report.init(DavResource, ReportInfo)
-
getPrincipalPropertyName
public DavPropertyName getPrincipalPropertyName()
Retrieve the property name that indicates which property must be search for matching principals.
Note, that the search result must be converted toMultiStatusResponses that must be returned back to this report.- Returns:
- property name which should be check for match with the current user.
- See Also:
setResponses(MultiStatusResponse[])
-
setResponses
public void setResponses(MultiStatusResponse[] responses)
Write the result(s) of the match back to the report.- Parameters:
responses-
-
-