org.apache.jackrabbit.webdav.security.report
Class SearchablePropertyReport

java.lang.Object
  extended by org.apache.jackrabbit.webdav.security.report.SearchablePropertyReport
All Implemented Interfaces:
Report, XmlSerializable

public class SearchablePropertyReport
extends Object
implements Report

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 requiered for each property that may be searched with the DAV:principal-property-search REPORT.


Field Summary
static String REPORT_NAME
          The report name
static ReportType REPORT_TYPE
          The report type
 Set<org.apache.jackrabbit.webdav.security.report.SearchablePropertyReport.PrincipalSearchProperty> searchPropertySet
          Set collecting the DAV:principal-search-property entries.
static String XML_PRINCIPAL_SEARCH_PROPERTY_SET
          Constant used for the DAV:principal-search-property-set response element.
 
Constructor Summary
SearchablePropertyReport()
           
 
Method Summary
 void addPrincipalSearchProperty(DavPropertyName propName, String description, String language)
          Add a property name that should be listed in the DAV:principal-search-property-set.
 ReportType getType()
          Returns the registered type of this report.
 void init(DavResource resource, ReportInfo info)
          Set the DeltaVResource for which this report was requested and the ReportInfo as specified by the REPORT request body, that defines the details for this report.
 boolean isMultiStatusReport()
          Returns true if this Report will send a MultiStatus response.
 Element toXml(Document document)
          Returns the xml representation of the implementing object as Element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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


XML_PRINCIPAL_SEARCH_PROPERTY_SET

public static final String XML_PRINCIPAL_SEARCH_PROPERTY_SET
Constant used for the DAV:principal-search-property-set response element.

See Also:
Constant Field Values

searchPropertySet

public final Set<org.apache.jackrabbit.webdav.security.report.SearchablePropertyReport.PrincipalSearchProperty> searchPropertySet
Set collecting the DAV:principal-search-property entries.

Constructor Detail

SearchablePropertyReport

public SearchablePropertyReport()
Method Detail

getType

public ReportType getType()
Description copied from interface: Report
Returns the registered type of this report.

Specified by:
getType in interface Report
Returns:
the type of this report.
See Also:
Report.getType()

isMultiStatusReport

public boolean isMultiStatusReport()
Description copied from interface: Report
Returns true if this Report will send a MultiStatus response.
Please note that RFC 3253 that the the response must be a 207 Multi-Status, if a Depth request header is present.

Specified by:
isMultiStatusReport in interface Report
Returns:
false Status code of after a successful completion must be 200 (ok).
See Also:
Report.isMultiStatusReport()

init

public void init(DavResource resource,
                 ReportInfo info)
          throws DavException
Description copied from interface: Report
Set the DeltaVResource for which this report was requested and the ReportInfo as 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 execeptional situations during the xml serialization.

Specified by:
init in interface Report
Throws:
DavException
See Also:
Report.init(DavResource, ReportInfo)

toXml

public Element toXml(Document document)
Description copied from interface: XmlSerializable
Returns the xml representation of the implementing object as Element. The given Document is used as factory and represents the owner document of the returned DOM element.

Specified by:
toXml in interface XmlSerializable
Parameters:
document - to be used as factory.
Returns:
a w3c element representing this object
See Also:
XmlSerializable.toXml(Document)

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 the PrincipalSearchReport.
description - Human readable description of the searchable property.
language - defines in which language the description is written.
Throws:
IllegalArgumentException - if propName is null.


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.