01: /*
02: * Created on 16 Jul 2007
03: */
04: package uk.org.ponder.rsf.swf.support;
05:
06: import java.util.Map;
07:
08: import uk.org.ponder.rsf.request.EarlyRequestParser;
09: import uk.org.ponder.rsf.swf.beans.SWFBindingBean;
10:
11: public class ParameterMapInterpreter {
12: private String requestType;
13: private Map requestparams;
14: private SWFBindingBean bindingBean;
15:
16: public void setRequestType(String requestType) {
17: this .requestType = requestType;
18: }
19:
20: public void setRequestParameterMap(Map requestparams) {
21: this .requestparams = requestparams;
22: }
23:
24: public void setBindingBean(SWFBindingBean bindingBean) {
25: this .bindingBean = bindingBean;
26: }
27:
28: public Map getParameterMap() {
29: if (requestType.equals(EarlyRequestParser.ACTION_REQUEST)) {
30: return bindingBean.getEquivalentMap();
31: } else {
32: // Some flows (e.g. Phonebook) make direct reference to GET parameter
33: // maps using format like <mapping source="requestParameters.id" target="id" from="string" to="long" />
34: return requestparams;
35: }
36: }
37:
38: }
|