|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.AbstractMap | +--java.util.HashMap | +--com.bea.security.HashMapContext
The HashMapContext
class is a simple implementation of an
application context based on a java hashmap.
Applications may choose to use this class as a basis for their application context,
or implement their own.
Constructor Summary | |
HashMapContext()
|
Method Summary | |
void |
addElement(AppContextElement elem)
Adds an AppContextElement into this context. |
void |
bulkAdd(AppContext ctx)
Does a bulk add of elements from another context into this context. |
AppContextElement |
getElement(java.lang.String name)
Gets an AppContextElement from this context by name. |
AppContextElement[] |
getElements(java.lang.String[] names)
Gets an array of AppContextElements from this context given an array of
names. |
java.lang.String[] |
getNames()
Gets the names of the elements available in this context. |
void |
removeElement(java.lang.String name)
Removes an AppContextElement from this context by name. |
int |
size()
Gets the number of AppContextElements in this context. |
Methods inherited from class java.util.HashMap |
clear,
clone,
containsKey,
containsValue,
entrySet,
get,
isEmpty,
keySet,
put,
putAll,
remove,
values |
Methods inherited from class java.util.AbstractMap |
equals,
hashCode,
toString |
Methods inherited from class java.lang.Object |
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public HashMapContext()
Method Detail |
public java.lang.String[] getNames()
Strings
that are the names of the
elements in this context.public AppContextElement getElement(java.lang.String name)
AppContextElement
from this context by name.
name
- a String
that is the name of the element to retrieve
from this context.AppContextElement
with the name requested. If the name requested
is not in the context, a null
is returned.public AppContextElement[] getElements(java.lang.String[] names)
AppContextElements
from this context given an array of
names.
names
- an array of Strings
that are the names of the elements being
requested.AppContextElements
that were requested by name and
available in the context. If no requested elements are available, then an empty
array is returned.public int size()
AppContextElements
in this context.
int
of the number of elements in this context.public void addElement(AppContextElement elem)
AppContextElement
into this context.
elem
- an AppContextElement
to add to this context. If an element of this name
already exists, then this new element will replace it.public void removeElement(java.lang.String name)
AppContextElement
from this context by name.
name
- a String
that is the name of the element to be removed.public void bulkAdd(AppContext ctx)
ctx
- an AppContext
object whose values need to be cloned and added.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |