| |
|
| java.lang.Object com.ibm.webdav.Response com.ibm.webdav.MethodResponse
MethodResponse | public class MethodResponse extends Response (Code) | | A MethodResponse describes the effect of a method on a resource. A
MultiStatus contains a collection of Response instances,
one for each resource effected by the method sent.
author: Jim Amsden <jamsden@us.ibm.com> See Also: com.ibm.webdav.PropertyResponse See Also: com.ibm.webdav.MultiStatus |
Method Summary | |
public void | addResource(String url) Add a URL to a resource that is effected by the method in the
same way as that returned by getResource() . | public Element | asXML() Translate this MethodResponse into an XML response element. | public Enumeration | getResources() | public int | getStatus() Get the status of the URLs in this MethodResponse. | public boolean | isOK() Check to see if this response does not contain an error. | public void | setStatus(int value) Set the status of the URLs in this MethodResponse. | public PropertyResponse | toPropertyResponse() Convert this Response to a PropertyResponse. |
MethodResponse | public MethodResponse(Document document, Element element) throws ServerException(Code) | | Construct a MethodResponse from an XML response element
Parameters: document - the document containing the element Parameters: element - the XML response element that is the sourceof this response |
MethodResponse | public MethodResponse(String url, int status)(Code) | | Construct an empty Response for some resource.
Parameters: url - the URL of the resource this is a response for Parameters: status - the HTTP status code for the response. See Also: com.ibm.webdav.WebDAVStatus |
MethodResponse | public MethodResponse(String url, WebDAVException exc)(Code) | | Construct an empty Response for some resource.
Parameters: url - the URL of the resource this is a response for Parameters: status - the HTTP status code for the response. See Also: com.ibm.webdav.WebDAVStatus |
addResource | public void addResource(String url) throws ServerException(Code) | | Add a URL to a resource that is effected by the method in the
same way as that returned by getResource() . The
URL can only be added once to this Response.
Parameters: url - the resource URL exception: com.ibm.webdav.ServerException - thrown if the URL is already in the response |
asXML | public Element asXML()(Code) | | Translate this MethodResponse into an XML response element.
a DAV:response XML element |
getResources | public Enumeration getResources()(Code) | | Other resources effected by the method that share the
status response in this MethodResponse
an Enumeration of Strings representing URLs of resources thatresponded in the same way to a request. |
getStatus | public int getStatus()(Code) | | Get the status of the URLs in this MethodResponse.
the HTTP status code for this response |
isOK | public boolean isOK()(Code) | | Check to see if this response does not contain an error.
true if all response status code is less that 300, false otherwise. |
setStatus | public void setStatus(int value)(Code) | | Set the status of the URLs in this MethodResponse.
Parameters: value - an HTTP status code See Also: com.ibm.webdav.WebDAVStatus |
toPropertyResponse | public PropertyResponse toPropertyResponse()(Code) | | Convert this Response to a PropertyResponse.
This method is used to convert MethodResponses to PropertyResponses
when an error occurred accessing the properties of some member.
|
|
|
|