org.apache.cocoon.components.flow.apples
Class DefaultAppleRequest

java.lang.Object
  extended by org.apache.cocoon.components.flow.apples.DefaultAppleRequest
All Implemented Interfaces:
AppleRequest

public class DefaultAppleRequest
extends Object
implements AppleRequest

DefaultAppleRequest wraps the nested <map:paramater> 's and the active Cocoon Environment Request to implement the service of the AppleRequest interface.


Constructor Summary
DefaultAppleRequest(List params, Request request)
          Constructs DefaultAppleRequest
 
Method Summary
 Request getCocoonRequest()
           
 String getSitemapParameter(String key)
          Finds a named parameter in the request.
 String getSitemapParameter(String key, String defaultValue)
          Finds a named parameter in the request using the overloaded method AppleRequest.getSitemapParameter(String) but lets the returned value default to the second argument in case the delegation resulted into null
 Set getSitemapParameterNames()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAppleRequest

public DefaultAppleRequest(List params,
                           Request request)
Constructs DefaultAppleRequest

Parameters:
params - the nested <map:parameter>'s from the sitemap
request - the active cocoon request
Method Detail

getCocoonRequest

public Request getCocoonRequest()
Specified by:
getCocoonRequest in interface AppleRequest
Returns:
the wrapped cocoon environment Request

getSitemapParameterNames

public Set getSitemapParameterNames()
Specified by:
getSitemapParameterNames in interface AppleRequest
Returns:
Set of String's listing all available sitemap-parameters passed.

getSitemapParameter

public String getSitemapParameter(String key,
                                  String defaultValue)
Description copied from interface: AppleRequest
Finds a named parameter in the request using the overloaded method AppleRequest.getSitemapParameter(String) but lets the returned value default to the second argument in case the delegation resulted into null

Specified by:
getSitemapParameter in interface AppleRequest
Parameters:
key - of parameter to lookup
defaultValue - return-value in case the lookup returned null
Returns:
the parameter-value or if that was null: the defaultValue passed.

getSitemapParameter

public String getSitemapParameter(String key)
Description copied from interface: AppleRequest
Finds a named parameter in the request.

Specified by:
getSitemapParameter in interface AppleRequest
Parameters:
key - of parameter to lookup
Returns:
the parameter-value


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.