net.sf.tacos.ajax.contrib
Class PrototypeResponseContributorImpl

java.lang.Object
  extended by net.sf.tacos.ajax.contrib.PrototypeResponseContributorImpl
All Implemented Interfaces:
ResponseContributor

public class PrototypeResponseContributorImpl
extends Object
implements ResponseContributor

Implementation of the prototype library contributor.

Determines if incoming request is a valid prototype request via the existence of an http header named "X-Prototype-Version", having a value of "1.4.0"

Author:
jkuhnert

Field Summary
static String PROTOTYPE_VERSION
          Currently supported rico version
static String PROTOTYPE_VERSION_HEADER
          Key in Http header for Prototype library version
 
Constructor Summary
PrototypeResponseContributorImpl()
           
 
Method Summary
 ResponseBuilder createBuilder(org.apache.tapestry.IRequestCycle cycle, org.apache.tapestry.web.WebRequest request)
          Creates the appropriate ResponseBuilder instance to handle the incoming ajax request.
 boolean handlesResponse(org.apache.tapestry.IRequestCycle cycle, org.apache.tapestry.web.WebRequest request)
          Determines if the incoming ajax request is capable of being handled by the ResponseBuilder this contributor manages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROTOTYPE_VERSION_HEADER

public static final String PROTOTYPE_VERSION_HEADER
Key in Http header for Prototype library version

See Also:
Constant Field Values

PROTOTYPE_VERSION

public static final String PROTOTYPE_VERSION
Currently supported rico version

See Also:
Constant Field Values
Constructor Detail

PrototypeResponseContributorImpl

public PrototypeResponseContributorImpl()
Method Detail

createBuilder

public ResponseBuilder createBuilder(org.apache.tapestry.IRequestCycle cycle,
                                     org.apache.tapestry.web.WebRequest request)
Creates the appropriate ResponseBuilder instance to handle the incoming ajax request.

Specified by:
createBuilder in interface ResponseContributor
Returns:

handlesResponse

public boolean handlesResponse(org.apache.tapestry.IRequestCycle cycle,
                               org.apache.tapestry.web.WebRequest request)
Determines if the incoming ajax request is capable of being handled by the ResponseBuilder this contributor manages.

Specified by:
handlesResponse in interface ResponseContributor
Parameters:
cycle - Main request cycle
request - HttpRequest associated with request
Returns:
True if can handle request, false otherwise.