1 23 24 package com.sun.enterprise.tools.guiframework.event.handlers; 25 26 import com.iplanet.jato.RequestContext; 27 28 import com.sun.enterprise.tools.guiframework.view.HandlerContext; 29 30 import java.util.Map ; 31 32 33 36 public class RequestParameterHandlers { 37 38 49 public void getRequestParameter(RequestContext reqCtx, HandlerContext handlerCtx) { 50 Object key = handlerCtx.getInputValue(KEY); 51 if (key == null) { 52 throw new IllegalArgumentException ( 53 "The parameter map did not contain a key!"); 54 } 55 handlerCtx.setOutputValue( 56 VALUE, reqCtx.getRequest().getParameter(key.toString())); 57 } 58 59 60 69 public void getRequestParameters(RequestContext reqCtx, HandlerContext handlerCtx) { 70 Object key = handlerCtx.getInputValue(KEY); 71 if (key == null) { 72 throw new IllegalArgumentException ( 73 "The parameter map did not contain a key!"); 74 } 75 handlerCtx.setOutputValue( 76 VALUE, reqCtx.getRequest().getParameterValues(key.toString())); 77 } 78 79 80 83 public static final String VALUE = "value"; 84 85 88 public static final String KEY = "key"; 89 } 90 | Popular Tags |