01: /*
02: * Copyright 2006-2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.kuali.module.gl.web.optionfinder;
17:
18: import java.util.ArrayList;
19: import java.util.List;
20:
21: import org.kuali.core.lookup.keyvalues.KeyValuesBase;
22: import org.kuali.core.lookup.valueFinder.ValueFinder;
23: import org.kuali.core.web.ui.KeyLabelPair;
24: import org.kuali.module.gl.web.Constant;
25:
26: /**
27: * An implementation of ValueFinder that allows balance inquiries to choose between consolidated results or detailed results
28: */
29: public class GLConsolidationOptionFinder extends KeyValuesBase
30: implements ValueFinder {
31:
32: /**
33: * Returns a list of key value pairs to allow inquirers to choose between consolidated results or detailed results
34: *
35: * @return a List of key value pairs to poplulate radio buttons
36: * @see org.kuali.core.lookup.keyvalues.KeyValuesFinder#getKeyValues()
37: */
38: public List getKeyValues() {
39: List labels = new ArrayList();
40: labels.add(new KeyLabelPair(Constant.CONSOLIDATION,
41: Constant.CONSOLIDATION));
42: labels.add(new KeyLabelPair(Constant.DETAIL, Constant.DETAIL));
43:
44: return labels;
45: }
46:
47: /**
48: * Gets the default value for this ValueFinder, in this case CONSOLIDATED
49: * @return a String with the default value for this ValueFinder
50: * @see org.kuali.core.lookup.valueFinder.ValueFinder#getValue()
51: */
52: public String getValue() {
53: return Constant.CONSOLIDATION;
54: }
55: }
|