org.apache.wink.webdav.model
Class Multistatus

java.lang.Object
  extended by org.apache.wink.webdav.model.Multistatus

public class Multistatus
extends java.lang.Object

The multistatus XML element per the WebDAV specification [RFC 4918]

    Name:       multistatus
    Namespace:  DAV:
    Purpose:    Contains multiple response messages.
    Description: The responsedescription at the top level is used to
    provide a general message describing the overarching nature of the
    response.  If this value is available an application may use it
    instead of presenting the individual response descriptions contained
    within the responses.
 
    <!ELEMENT multistatus (response+, responsedescription?) >
 


Field Summary
protected  java.util.List<Response> response
           
protected  java.lang.String responsedescription
           
 
Constructor Summary
Multistatus()
           
 
Method Summary
 java.util.List<Response> getResponse()
          Gets the value of the response property.
 Response getResponseByHref(java.lang.String href)
          Get a the first response available that matches the provided href
 java.lang.String getResponsedescription()
          Gets the value of the responsedescription property.
 java.util.Map<java.lang.String,Response> getResponsesAsMapByHref()
          Get a map of responses where the key is the response href
static void marshal(Multistatus instance, java.io.OutputStream os)
          Marshal a Multistatus object to the provided output stream
static void marshal(Multistatus instance, java.io.Writer writer)
          Marshal a Multistatus object to the provided writer
 void setResponsedescription(java.lang.String value)
          Sets the value of the responsedescription property.
static Multistatus unmarshal(java.io.InputStream is)
          Unmarshal a Multistatus object from the provided input stream
static Multistatus unmarshal(java.io.Reader reader)
          Unmarshal a Multistatus object from the provided reader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

response

protected java.util.List<Response> response

responsedescription

protected java.lang.String responsedescription
Constructor Detail

Multistatus

public Multistatus()
Method Detail

getResponse

public java.util.List<Response> getResponse()
Gets the value of the response property.

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 response property.

For example, to add a new item, do as follows:

 getResponse().add(newItem);
 

Objects of the following type(s) are allowed in the list Response


getResponsesAsMapByHref

public java.util.Map<java.lang.String,Response> getResponsesAsMapByHref()
Get a map of responses where the key is the response href

Returns:
a map of responses

getResponseByHref

public Response getResponseByHref(java.lang.String href)
Get a the first response available that matches the provided href

Parameters:
href - the href of the response to get
Returns:
thr first response that has the provided href

getResponsedescription

public java.lang.String getResponsedescription()
Gets the value of the responsedescription property.

Returns:
possible object is String

setResponsedescription

public void setResponsedescription(java.lang.String value)
Sets the value of the responsedescription property.

Parameters:
value - allowed object is String

unmarshal

public static Multistatus unmarshal(java.io.InputStream is)
                             throws java.io.IOException
Unmarshal a Multistatus object from the provided input stream

Parameters:
is - the input stream
Returns:
an instance of a Multistatus object
Throws:
java.io.IOException

marshal

public static void marshal(Multistatus instance,
                           java.io.OutputStream os)
                    throws java.io.IOException
Marshal a Multistatus object to the provided output stream

Parameters:
instance - the Multistatus instance to marshal
os - the output stream
Throws:
java.io.IOException

unmarshal

public static Multistatus unmarshal(java.io.Reader reader)
                             throws java.io.IOException
Unmarshal a Multistatus object from the provided reader

Parameters:
reader - the input reader
Returns:
an instance of a Multistatus object
Throws:
java.io.IOException

marshal

public static void marshal(Multistatus instance,
                           java.io.Writer writer)
                    throws java.io.IOException
Marshal a Multistatus object to the provided writer

Parameters:
instance - the Multistatus instance to marshal
writer - the output writer
Throws:
java.io.IOException


Copyright © 2009 The Apache Software Foundation. All Rights Reserved.