|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wink.webdav.server.WebDAVResponseBuilder.PropertyHandler
public static class WebDAVResponseBuilder.PropertyHandler
Used during the creation of a WebDAV multistatus response to get the properties and their values. Applications may override any of the methods as required.
Constructor Summary | |
---|---|
WebDAVResponseBuilder.PropertyHandler()
|
Method Summary | |
---|---|
void |
setAllPropertyNames(WebDAVResponseBuilder builder,
Prop prop,
SyndBase synd)
Set the Prop instance with empty (no values) properties. |
void |
setPropertyValue(WebDAVResponseBuilder builder,
Response response,
java.lang.Object property,
SyndBase synd)
Set the value of a provided property, and set the property on the response object with the correct status. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WebDAVResponseBuilder.PropertyHandler()
Method Detail |
---|
public void setAllPropertyNames(WebDAVResponseBuilder builder, Prop prop, SyndBase synd)
builder
- the current WebDAVResponseBuilder which can be used to
obtain context informationsynd
- instance of the synd to set the property names forprop
- the Prop instance to fillpublic void setPropertyValue(WebDAVResponseBuilder builder, Response response, java.lang.Object property, SyndBase synd)
Applications should override this method with their own implementation in order to set the values of proprietary properties and to extend the default behavior.
see Response#setProperty(Object, int, String, Error)
for a
detailed description of the possible property values.
Examples:
if the property is DAV:getcontentlanguage
then the type
of the property is an instance of Getcontentlanguage, and setting
it's value is performed as follows:
if (property instanceof Getcontentlanguage) { ((Getcontentlanguage)property).setValue("en-us"); response.setOk(property); }if the property is
K:myprop
then the type of the
property is an instance of org.w3c.dom.Element, and setting it's
value is performed as follows:
if (property instanceof Element) { ((Element)property).setTextContent("My Property Value!"); response.setOk(property); }If the requested property does not have a value, the application should call the
Response#setPropertyNotFound(Object)
method
and pass it the property object, like so:
response.setNotFound(property);
builder
- the current WebDAVResponseBuilder which can be used to
obtain context informationresponse
- the Response
instance that is to receive the property and its valueproperty
- the property object. see
Response.setProperty(Object, int, String, Error)
for a detailed description of the possible property valuessynd
- an instance of synd (either feed or entry)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |