01: /*
02: * Created on Nov 14, 2005
03: */
04: package uk.org.ponder.rsf.processor;
05:
06: import java.util.HashMap;
07: import java.util.Map;
08:
09: import uk.org.ponder.rsf.request.RenderSystemDecoder;
10: import uk.org.ponder.rsf.request.SubmittedValueEntry;
11:
12: /** This class now disused in favour of PostDecoder **/
13:
14: public class RequestNormalizer {
15: private RenderSystemDecoder rendersystemstatic;
16: private Map requestmap;
17: private Map normalized;
18:
19: public void setRequestMap(Map requestmap) {
20: this .requestmap = requestmap;
21: }
22:
23: public void setRenderSystemStatic(
24: RenderSystemDecoder rendersystemstatic) {
25: this .rendersystemstatic = rendersystemstatic;
26: }
27:
28: // cheaper than an init-method!
29: private void checkInit() {
30: if (normalized == null) {
31: normalized = new HashMap();
32: normalized.putAll(requestmap);
33: rendersystemstatic.normalizeRequestMap(normalized);
34: }
35: }
36:
37: public Map getNormalizedRequestMap() {
38: checkInit();
39: return normalized;
40: }
41:
42: public String getSubmittingControl() {
43: checkInit();
44: return (String) normalized
45: .get(SubmittedValueEntry.SUBMITTING_CONTROL);
46: }
47: }
|