org.abstracthorizon.danube.webdav.xml.dav.response
Class Response

java.lang.Object
  extended by org.abstracthorizon.danube.webdav.xml.dav.response.Response
All Implemented Interfaces:
XMLRenderer

public class Response
extends Object
implements XMLRenderer

This class models WebDAV response tag. Response tag exist only as a part of multistatus tag but values from it can be used to create partial response or header response only.

Author:
Daniel Sendula

Field Summary
protected  List<HRef> additionalHRefs
          List of additional hrefs.
protected  HRef href
          Response's href
protected  MultiStatus multiStatus
          Multistatus response belongs to
protected  List<Propstat> propstats
          List of propstats.
protected  String responseDescription
          Response description
protected  Status status
          Status of the response.
static String STATUS_TAG_NAME
          Status tag's name
static String TAG_NAME
          Tag name
 
Constructor Summary
Response(MultiStatus multiStatus, HRef href)
          Constructor
 
Method Summary
 void addHRef(HRef href)
          Adds additional href.
 List<HRef> getAdditionalHRefs()
          Returns additional hrefs.
 HRef getHRef()
          Returns response's href
 List<Propstat> getPropStats()
          Returns list of propstats.
 String getResponseDescription()
          Returns response description
 Status getStatus()
          Returns response's status.
 boolean isDefined()
          Returns defined only if there are propstats in this response
 void render(PrintWriter writer, NamespacesProvider provider)
          Renders the tag
 void renderStatus(PrintWriter writer, NamespacesProvider provider, Status status)
          Renders status
 void setAdditionalHRefs(List<HRef> additionalHRefs)
          Sets list of additional hrefs
 void setResponseDescription(String responseDescription)
          Sets resoinse description.
 void setStatus(Status status)
          Sets status
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TAG_NAME

public static final String TAG_NAME
Tag name

See Also:
Constant Field Values

STATUS_TAG_NAME

public static final String STATUS_TAG_NAME
Status tag's name

See Also:
Constant Field Values

multiStatus

protected MultiStatus multiStatus
Multistatus response belongs to


status

protected Status status
Status of the response. May be null.


href

protected HRef href
Response's href


additionalHRefs

protected List<HRef> additionalHRefs
List of additional hrefs. May be null.


propstats

protected List<Propstat> propstats
List of propstats. May be null.


responseDescription

protected String responseDescription
Response description

Constructor Detail

Response

public Response(MultiStatus multiStatus,
                HRef href)
Constructor

Parameters:
multiStatus - parent multistatus
href - href
Method Detail

isDefined

public boolean isDefined()
Returns defined only if there are propstats in this response

Returns:
defined only if there are propstats in this response

getStatus

public Status getStatus()
Returns response's status. May be null.

Returns:
status

setStatus

public void setStatus(Status status)
Sets status

Parameters:
status - status

getHRef

public HRef getHRef()
Returns response's href

Returns:
response's href

getAdditionalHRefs

public List<HRef> getAdditionalHRefs()
Returns additional hrefs. May be null.

Returns:
additional hrefs

setAdditionalHRefs

public void setAdditionalHRefs(List<HRef> additionalHRefs)
Sets list of additional hrefs

Parameters:
additionalHRefs - list of additional hrefs

addHRef

public void addHRef(HRef href)
Adds additional href.

Parameters:
href - additional href

getResponseDescription

public String getResponseDescription()
Returns response description

Returns:
response description

setResponseDescription

public void setResponseDescription(String responseDescription)
Sets resoinse description.

Parameters:
responseDescription - response description

getPropStats

public List<Propstat> getPropStats()
Returns list of propstats. It will always return the list - won't be null.

Returns:
list of propstats.

toString

public String toString()
Overrides:
toString in class Object

render

public void render(PrintWriter writer,
                   NamespacesProvider provider)
Renders the tag

Specified by:
render in interface XMLRenderer
Parameters:
writer - writer
provider - namespace provider

renderStatus

public void renderStatus(PrintWriter writer,
                         NamespacesProvider provider,
                         Status status)
Renders status

Parameters:
writer - writer
provider - provider
status - status


Copyright © 2005-2009 Abstract Horizon. All Rights Reserved.