org.kuali.rice.krms.impl.repository.language
Class ContextRegistry<T extends Context>

java.lang.Object
  extended by org.kuali.rice.krms.impl.repository.language.ContextRegistry<T>

public class ContextRegistry<T extends Context>
extends Object

This class is a registry of template contexts which the requirement component translator uses to generate natural language.


Constructor Summary
ContextRegistry()
          Constructor.
ContextRegistry(Map<String,List<T>> registry)
          Constructor.
 
Method Summary
 void add(String key, T context)
          Adds a context to the registry.
 boolean containsKey(String key)
          Returns true if a context exists for key; otherwise false.
 List<T> get(String key)
          Gets a context from the registry.
 List<T> remove(String key)
          Remove a context from the registry.
 int size()
          Returns the number of keys of the registry.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContextRegistry

public ContextRegistry()
Constructor.


ContextRegistry

public ContextRegistry(Map<String,List<T>> registry)
Constructor. Adds a context registry as a map.

Parameters:
registry - Context registry
Method Detail

add

public void add(String key,
                T context)
Adds a context to the registry. Key is usually a TermParameterType key.

Parameters:
key - Context key
context - Context

get

public List<T> get(String key)
Gets a context from the registry. Key is usually a TermParameterType key.

Parameters:
key - Context key
Returns:
A context

containsKey

public boolean containsKey(String key)
Returns true if a context exists for key; otherwise false.

Parameters:
key - Context key
Returns:
True if a context exists otherwise false

remove

public List<T> remove(String key)
Remove a context from the registry. Key is usually a

Parameters:
key -
Returns:

size

public int size()
Returns the number of keys of the registry.

Returns:
Number of keys in the registry

toString

public String toString()
Overrides:
toString in class Object


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