org.kuali.rice.krad.keyvalues
Class MapValuesFinder

java.lang.Object
  extended by org.kuali.rice.krad.keyvalues.MapValuesFinder
All Implemented Interfaces:
KeyValuesFinder

public class MapValuesFinder
extends Object
implements KeyValuesFinder

a simple values finder that uses a map as the key/value source.


Constructor Summary
MapValuesFinder(Map<String,String> keyValues)
           
 
Method Summary
 void clearInternalCache()
          Clears any internal cache that is being maintained by the value finder
 String getKeyLabel(String key)
          Returns the label for the associated key.
 Map<String,String> getKeyLabelMap()
          Returns a map with the key as the key of the map and the label as the value.
 List<KeyValue> getKeyValues()
          Builds a list of key values representations for valid value selections.
 List<KeyValue> getKeyValues(boolean includeActiveOnly)
          Builds a list of key values representations for valid value selections.
 void setKeyValues(Map<String,String> keyValues)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapValuesFinder

public MapValuesFinder(Map<String,String> keyValues)
Method Detail

setKeyValues

public void setKeyValues(Map<String,String> keyValues)

getKeyValues

public List<KeyValue> getKeyValues()
Description copied from interface: KeyValuesFinder
Builds a list of key values representations for valid value selections.

Specified by:
getKeyValues in interface KeyValuesFinder
Returns:
List of KeyValue objects

getKeyValues

public List<KeyValue> getKeyValues(boolean includeActiveOnly)
Description copied from interface: KeyValuesFinder
Builds a list of key values representations for valid value selections.

Specified by:
getKeyValues in interface KeyValuesFinder
Parameters:
includeActiveOnly - whether to only include active values in the list
Returns:
List of KeyValue objects.

getKeyLabelMap

public Map<String,String> getKeyLabelMap()
Description copied from interface: KeyValuesFinder
Returns a map with the key as the key of the map and the label as the value. Used to render the label instead of the code in the jsp when the field is readonly.

Specified by:
getKeyLabelMap in interface KeyValuesFinder
Returns:

getKeyLabel

public String getKeyLabel(String key)
Description copied from interface: KeyValuesFinder
Returns the label for the associated key.

Specified by:
getKeyLabel in interface KeyValuesFinder
Returns:

clearInternalCache

public void clearInternalCache()
Description copied from interface: KeyValuesFinder
Clears any internal cache that is being maintained by the value finder

Specified by:
clearInternalCache in interface KeyValuesFinder


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.