|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wink.webdav.model.Response
public class Response
The response
XML element per the WebDAV specification [RFC 4918]
Name: response Namespace: DAV: Purpose: Holds a single response describing the effect of a method on resource and/or its properties. Description: A particular href MUST NOT appear more than once as the child of a response XML element under a multistatus XML element. This requirement is necessary in order to keep processing costs for a response to linear time. Essentially, this prevents having to search in order to group together all the responses by href. There are, however, no requirements regarding ordering based on href values. <!ELEMENT response (href, ((href*, status)|(propstat+)), responsedescription?) >
Field Summary | |
---|---|
protected Error |
error
|
protected List<String> |
href
|
protected List<Propstat> |
propstat
|
protected String |
responsedescription
|
protected String |
status
|
Constructor Summary | |
---|---|
Response()
|
|
Response(String href)
|
Method Summary | |
---|---|
Error |
getError()
Gets the value of the error property. |
List<String> |
getHref()
Gets the value of the href property. |
Propstat |
getOrCreatePropstat(int status,
String description,
Error error)
Get a Propstat instance contained within this response that has the provided criteria, or create a new Propstat instance with the provided information if no propstat already exists. |
List<Propstat> |
getPropstat()
Gets the value of the propstat property. |
Propstat |
getPropstat(int status,
String description,
Error error)
Get a Propstat instance contained within this response that has the provided criteria. |
String |
getResponsedescription()
Gets the value of the responsedescription property. |
String |
getStatus()
Gets the value of the status property. |
void |
setError(Error value)
Sets the value of the error property. |
void |
setProperty(Object property,
int status)
Add the provided property to the correct propstat element with the specified Http status. |
void |
setProperty(Object property,
int status,
String description,
Error error)
Sets the provided property to the correct propstat element. |
void |
setPropertyNotFound(Object property)
Add the provided property to the correct propstat element with an Http status of NOT FOUND. |
void |
setPropertyOk(Object property)
Add the provided property to the correct propstat element with an Http status of OK. |
void |
setResponsedescription(String value)
Sets the value of the responsedescription property. |
void |
setStatus(String value)
Sets the value of the status property. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected List<String> href
protected String status
protected List<Propstat> propstat
protected Error error
protected String responsedescription
Constructor Detail |
---|
public Response()
public Response(String href)
Method Detail |
---|
public List<String> getHref()
This accessor method returns a reference to the live list, not a
snapshot. Therefore any modification you make to the returned list will
be present inside the JAXB object. This is why there is not a
set
method for the href property.
For example, to add a new item, do as follows:
getHref().add(newItem);
Objects of the following type(s) are allowed in the list String
public String getStatus()
String
public void setStatus(String value)
value
- allowed object is String
public List<Propstat> getPropstat()
This accessor method returns a reference to the live list, not a
snapshot. Therefore any modification you make to the returned list will
be present inside the JAXB object. This is why there is not a
set
method for the propstat property.
For example, to add a new item, do as follows:
getPropstat().add(newItem);
Objects of the following type(s) are allowed in the list Propstat
public Propstat getPropstat(int status, String description, Error error)
status
- the Http status code of the propstat to retrievedescription
- the description of the propstat to retrieveerror
- the error of the propstat to retrieve. Note that when
searching for a matching propstat, errors are considered the
same only if both errors are null.
public Propstat getOrCreatePropstat(int status, String description, Error error)
status
- the Http status code of the propstat to retrievedescription
- the description of the propstat to retrieveerror
- the error of the propstat to retrieve. Note that when
searching for a matching propstat, errors are considered the
same only if both errors are null.
public Error getError()
Error
public void setError(Error value)
value
- allowed object is Error
public String getResponsedescription()
String
public void setResponsedescription(String value)
value
- allowed object is String
public void setPropertyOk(Object property)
#setProperty(Object, int, String, Error)}
public void setPropertyNotFound(Object property)
#setProperty(Object, int, String, Error)}
public void setProperty(Object property, int status)
#setProperty(Object, int, String, Error)}
public void setProperty(Object property, int status, String description, Error error)
The following table details the possible Java types of every property
(note that the DAV
namespace depicts the WebDAV namespace
"DAV:")
DAV:creationdate | org.apache.wink.webdav.model.Creationdate |
DAV:displayname | org.apache.wink.webdav.model.Displayname |
DAV:getcontentlanguage | org.apache.wink.webdav.model.Getcontentlanguage |
DAV:getcontentlength | org.apache.wink.webdav.model.Getcontentlength |
DAV:getcontenttype | org.apache.wink.webdav.model.Getcontenttype |
DAV:getetag | org.apache.wink.webdav.model.Getetag |
DAV:getlastmodified | org.apache.wink.webdav.model.Getlastmodified |
DAV:lockdiscovery | org.apache.wink.webdav.model.Lockdiscovery |
DAV:resourcetype | org.apache.wink.webdav.model.Resourcetype |
DAV:supportedlock | org.apache.wink.webdav.model.Supportedlock |
any other | org.w3c.dom.Element |
for example, if the property to set is
DAV:getcontentlanguage
then the property should be an
instance of org.apache.wink.webdav.model.Getcontentlanguage.
if the property is K:myprop
then the property should be an
instance of org.w3c.dom.Element
property
- the property to addstatus
- the status of the property to adddescription
- the description of the propertyerror
- the error of the property
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |