com.sage.orion.sdata.servlet
Class ResourceResponseImpl

java.lang.Object
  extended by com.sage.orion.sdata.servlet.ResourceResponseImpl
All Implemented Interfaces:
ResourceResponse

public class ResourceResponseImpl
extends java.lang.Object
implements ResourceResponse

the normal SDataResponse object


Constructor Summary
ResourceResponseImpl(int responseCode)
          constructs the SDataResponse with the provided response code
ResourceResponseImpl(SDataResponseEntry entry, int responseCode)
          constructs the SDataResponse with the provided entry and response code
ResourceResponseImpl(SDataResponseFeed feed, int responseCode)
          constructs the SDataResponse with the provided feed and response code
 
Method Summary
 void addToResponse(javax.servlet.http.HttpServletResponse response, java.lang.String resourcesURL, java.lang.String fullURL, SDataDiagnoses sdataDiagnoses)
           
 java.lang.String getCacheControl()
          Gets the caching control information to place in the response header for the "Cache-Control" (e.g.
 SDataResponseEntry getEntry()
          Gets the SDataResponseEntry.
 SDataResponseFeed getFeed()
          Gets the SDataResponseFeed.
 int getResponseCode()
           
 void setResponseCode(int responseCode)
          Sets the HTTP response code.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResourceResponseImpl

public ResourceResponseImpl(SDataResponseEntry entry,
                            int responseCode)
constructs the SDataResponse with the provided entry and response code

Parameters:
entry - An Atom Entry in an SData response
responseCode - servlet responseCode

ResourceResponseImpl

public ResourceResponseImpl(SDataResponseFeed feed,
                            int responseCode)
constructs the SDataResponse with the provided feed and response code

Parameters:
feed - An Atom Feed in an SData response
responseCode - servlet responseCode

ResourceResponseImpl

public ResourceResponseImpl(int responseCode)
constructs the SDataResponse with the provided response code

Parameters:
responseCode - servlet responseCode
Method Detail

getResponseCode

public int getResponseCode()
Specified by:
getResponseCode in interface ResourceResponse

setResponseCode

public void setResponseCode(int responseCode)
Sets the HTTP response code.

Parameters:
responseCode - HttpServletResponse code

addToResponse

public void addToResponse(javax.servlet.http.HttpServletResponse response,
                          java.lang.String resourcesURL,
                          java.lang.String fullURL,
                          SDataDiagnoses sdataDiagnoses)
Specified by:
addToResponse in interface ResourceResponse

getEntry

public SDataResponseEntry getEntry()
Description copied from interface: ResourceResponse
Gets the SDataResponseEntry.

Specified by:
getEntry in interface ResourceResponse

getFeed

public SDataResponseFeed getFeed()
Description copied from interface: ResourceResponse
Gets the SDataResponseFeed.

Specified by:
getFeed in interface ResourceResponse

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getCacheControl

public java.lang.String getCacheControl()
Description copied from interface: ResourceResponse
Gets the caching control information to place in the response header for the "Cache-Control" (e.g. "no-cache" to specify not to have the browser cache this response)

Specified by:
getCacheControl in interface ResourceResponse
Returns:
the caching control information to place in the response header for the "Cache-Control" (e.g. "no-cache" to specify not to have the browser cache this response)


Copyright © 2011 Sage Software, Inc. All rights reserved.