1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krms.builder;
17
18 import org.apache.log4j.Logger;
19 import org.kuali.rice.krms.dto.PropositionEditor;
20
21 import java.util.HashMap;
22 import java.util.List;
23 import java.util.Map;
24
25
26
27
28 public class SimpleTextComponentBuilder implements ComponentBuilder<PropositionEditor>{
29
30 private final static Logger LOG = Logger.getLogger(SimpleTextComponentBuilder.class);
31
32 private static final String TEXT_KEY = "kuali.term.parameter.type.free.text";
33
34 @Override
35 public List<String> getComponentIds() {
36 return null;
37 }
38
39 @Override
40 public void resolveTermParameters(PropositionEditor propositionEditor, Map<String, String> termParameters) {
41 String text = termParameters.get(TEXT_KEY);
42 propositionEditor.setTermParameter(text);
43 }
44
45 @Override
46 public Map<String, String> buildTermParameters(PropositionEditor propositionEditor) {
47 Map<String, String> termParameters = new HashMap<String, String>();
48 termParameters.put(TEXT_KEY, propositionEditor.getTermParameter());
49
50 LOG.info(termParameters);
51
52 return termParameters;
53 }
54
55 @Override
56 public void onSubmit(PropositionEditor propositionEditor) {
57
58 }
59
60 @Override
61 public void validate(PropositionEditor propositionEditor) {
62
63 }
64 }