org.apache.wink.webdav.model
Class Multistatus

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

public class Multistatus
extends 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  List<Response> response
           
protected  String responsedescription
           
 
Constructor Summary
Multistatus()
           
 
Method Summary
 List<Response> getResponse()
          Gets the value of the response property.
 Response getResponseByHref(String href)
          Get a the first response available that matches the provided href
 String getResponsedescription()
          Gets the value of the responsedescription property.
 Map<String,Response> getResponsesAsMapByHref()
          Get a map of responses where the key is the response href
static void marshal(Multistatus instance, OutputStream os)
          Marshal a Multistatus object to the provided output stream
static void marshal(Multistatus instance, Writer writer)
          Marshal a Multistatus object to the provided writer
 void setResponsedescription(String value)
          Sets the value of the responsedescription property.
static Multistatus unmarshal(InputStream is)
          Unmarshal a Multistatus object from the provided input stream
static Multistatus unmarshal(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 List<Response> response

responsedescription

protected String responsedescription
Constructor Detail

Multistatus

public Multistatus()
Method Detail

getResponse

public 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 Map<String,Response> getResponsesAsMapByHref()
Get a map of responses where the key is the response href

Returns:
a map of responses

getResponseByHref

public Response getResponseByHref(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 String getResponsedescription()
Gets the value of the responsedescription property.

Returns:
possible object is String

setResponsedescription

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

Parameters:
value - allowed object is String

unmarshal

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

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

marshal

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

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

unmarshal

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

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

marshal

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

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


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