1 package org.kuali.rice.krms.builder;
2
3 import org.kuali.rice.krms.dto.PropositionEditor;
4
5 import java.util.HashMap;
6 import java.util.List;
7 import java.util.Map;
8
9
10
11
12
13
14
15
16 public class SimpleTextComponentBuilder implements ComponentBuilder<PropositionEditor>{
17
18 private static final String TEXT_KEY = "kuali.term.parameter.type.free.text";
19
20 @Override
21 public List<String> getComponentIds() {
22 return null;
23 }
24
25 @Override
26 public void resolveTermParameters(PropositionEditor propositionEditor, Map<String, String> termParameters) {
27 String text = termParameters.get(TEXT_KEY);
28 propositionEditor.setTermParameter(text);
29 }
30
31 @Override
32 public Map<String, String> buildTermParameters(PropositionEditor propositionEditor) {
33 Map<String, String> termParameters = new HashMap<String, String>();
34 termParameters.put(TEXT_KEY, propositionEditor.getTermParameter());
35 return termParameters;
36 }
37 }