1 16 package org.apache.cocoon.components.flow.apples; 17 18 import java.util.List ; 19 import java.util.Map ; 20 import java.util.Set ; 21 22 import org.apache.cocoon.environment.Request; 23 24 29 public class DefaultAppleRequest implements AppleRequest { 30 31 private final Map params; 32 private final Request cocoonRequest; 33 34 39 public DefaultAppleRequest(List params, Request request) { 40 this.params = AppleHelper.makeMapFromArguments(params); 41 this.cocoonRequest = request; 42 } 43 44 45 public Request getCocoonRequest() { 46 return cocoonRequest; 47 } 48 49 50 public Set getSitemapParameterNames() { 51 return this.params.keySet(); 52 } 53 54 55 public String getSitemapParameter(String key, String defaultValue) { 56 String value = getSitemapParameter(key); 57 if (value == null) { 58 value = defaultValue; 59 } 60 return value; 61 } 62 63 64 public String getSitemapParameter(String key) { 65 return (String )this.params.get(key); 66 } 67 68 69 } 70 | Popular Tags |