Project Wonder 5.0

er.rest.routes
Class ERXRouteResults

java.lang.Object
  extended by er.rest.routes.ERXRouteResults
All Implemented Interfaces:
com.webobjects.appserver.WOActionResults

public class ERXRouteResults
extends java.lang.Object
implements com.webobjects.appserver.WOActionResults

ERXRouteResults encapsulates the data necessary to produce a RESTful response. This object exists to defer the generation of the response (so you can chain together rest responders).

Author:
mschrag

Constructor Summary
ERXRouteResults(com.webobjects.appserver.WOContext context, ERXRestFormat format, ERXRestRequestNode responseNode)
          Constructs an ERXRouteResults.
 
Method Summary
 ERXRestFormat format()
          Returns the intended format of this response.
 com.webobjects.appserver.WOResponse generateResponse()
          Generates a WOResponse out of this ERXRouteResults.
 ERXRestRequestNode responseNode()
          Returns the ERXRestRequestNode to render.
 void setHeaderForKey(java.lang.String header, java.lang.String key)
          Adds a header for the resulting WOResponse.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ERXRouteResults

public ERXRouteResults(com.webobjects.appserver.WOContext context,
                       ERXRestFormat format,
                       ERXRestRequestNode responseNode)
Constructs an ERXRouteResults.

Parameters:
context - the current context
format - the intended format of this response
responseNode - the ERXRestRequestNode to render
Method Detail

setHeaderForKey

public void setHeaderForKey(java.lang.String header,
                            java.lang.String key)
Adds a header for the resulting WOResponse.

Parameters:
header - the header to add
key - the key to add

format

public ERXRestFormat format()
Returns the intended format of this response.

Returns:
the intended format of this response

responseNode

public ERXRestRequestNode responseNode()
Returns the ERXRestRequestNode to render.

Returns:
the ERXRestRequestNode to render

generateResponse

public com.webobjects.appserver.WOResponse generateResponse()
Generates a WOResponse out of this ERXRouteResults.

Specified by:
generateResponse in interface com.webobjects.appserver.WOActionResults
Returns:
a generated WOResponse

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.