|
|||||||||||
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 java.util.List<java.lang.String> |
href
|
protected java.util.List<Propstat> |
propstat
|
protected java.lang.String |
responsedescription
|
protected java.lang.String |
status
|
Constructor Summary | |
---|---|
Response()
|
|
Response(java.lang.String href)
|
Method Summary | |
---|---|
Error |
getError()
Gets the value of the error property. |
java.util.List<java.lang.String> |
getHref()
Gets the value of the href property. |
Propstat |
getOrCreatePropstat(int status,
java.lang.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. |
java.util.List<Propstat> |
getPropstat()
Gets the value of the propstat property. |
Propstat |
getPropstat(int status,
java.lang.String description,
Error error)
Get a Propstat instance contained within this response that has the provided criteria. |
java.lang.String |
getResponsedescription()
Gets the value of the responsedescription property. |
java.lang.String |
getStatus()
Gets the value of the status property. |
void |
setError(Error value)
Sets the value of the error property. |
void |
setProperty(java.lang.Object property,
int status)
Add the provided property to the correct propstat element with the specified Http status. |
void |
setProperty(java.lang.Object property,
int status,
java.lang.String description,
Error error)
Sets the provided property to the correct propstat element. |
void |
setPropertyNotFound(java.lang.Object property)
Add the provided property to the correct propstat element with an Http status of NOT FOUND. |
void |
setPropertyOk(java.lang.Object property)
Add the provided property to the correct propstat element with an Http status of OK. |
void |
setResponsedescription(java.lang.String value)
Sets the value of the responsedescription property. |
void |
setStatus(java.lang.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 java.util.List<java.lang.String> href
protected java.lang.String status
protected java.util.List<Propstat> propstat
protected Error error
protected java.lang.String responsedescription
Constructor Detail |
---|
public Response()
public Response(java.lang.String href)
Method Detail |
---|
public java.util.List<java.lang.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 java.lang.String getStatus()
String
public void setStatus(java.lang.String value)
value
- allowed object is String
public java.util.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, java.lang.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, java.lang.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 java.lang.String getResponsedescription()
String
public void setResponsedescription(java.lang.String value)
value
- allowed object is String
public void setPropertyOk(java.lang.Object property)
#setProperty(Object, int, String, Error)}
public void setPropertyNotFound(java.lang.Object property)
#setProperty(Object, int, String, Error)}
public void setProperty(java.lang.Object property, int status)
#setProperty(Object, int, String, Error)}
public void setProperty(java.lang.Object property, int status, java.lang.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 |