|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.edg.security.authorization.map.DefaultAttributeMap
Default implementation for the AttributeMap interface, that works against a normal Map implemenation.
Field Summary | |
protected java.util.Map |
map
The Map instance to work against |
Constructor Summary | |
DefaultAttributeMap(java.util.Map map)
|
Method Summary | |
void |
addAttribute(java.lang.String key,
java.lang.String value)
Convenience method to add a single attribute to the existing set of attributes associated with a key. |
void |
addAttributes(java.lang.String key,
java.util.List values)
Convenience method to add a set of attributes. |
void |
clear()
|
boolean |
containsKey(java.lang.Object key)
|
boolean |
containsValue(java.lang.Object value)
|
java.util.Set |
entrySet()
|
java.lang.Object |
get(java.lang.Object key)
|
java.util.List |
getAttributes(java.lang.String key)
Convenience method to get the right return type, and to get an empty list in case of no match. |
boolean |
hasMapping(java.lang.String key,
java.lang.String value)
This method has the same semantics as the call getAttributes(key).contains(value)
but may be optimized for the particular Map |
boolean |
isEmpty()
|
java.util.Set |
keySet()
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
|
void |
putAll(java.util.Map t)
|
java.lang.Object |
remove(java.lang.Object key)
|
java.lang.String |
removeAttribute(java.lang.String key,
java.lang.String value)
Removal of a particular attribute in the list of attributes for the given subject. |
int |
size()
|
void |
terminate()
Terminate all Timer objects responsible for refreshing the content of the AttributeMap. |
java.util.Collection |
values()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Map |
equals, hashCode |
Field Detail |
protected java.util.Map map
Constructor Detail |
public DefaultAttributeMap(java.util.Map map)
map
- The map to work againstMethod Detail |
public java.util.List getAttributes(java.lang.String key)
AttributeMap
getAttributes
in interface AttributeMap
AttributeMap.getAttributes(String)
public void addAttributes(java.lang.String key, java.util.List values)
AttributeMap
This is typically implemented as an iteration of
calls to addAttribute(String, String)
,
one call for each value in the List.
This feature may be overriden by a particular Map implementation.
addAttributes
in interface AttributeMap
key
- the keyvalues
- List of String with attributesAttributeMap.addAttributes(String, List)
public void addAttribute(java.lang.String key, java.lang.String value)
AttributeMap
addAttribute
in interface AttributeMap
key
- the keyvalue
- The attribute to addAdds the attribute to the subject only if the association subject-attribute
does not exist.
public boolean hasMapping(java.lang.String key, java.lang.String value)
AttributeMap
getAttributes(key).contains(value)
hasMapping
in interface AttributeMap
key
- the keyvalue
- the value to match against
AttributeMap.hasMapping(String, String)
public java.lang.String removeAttribute(java.lang.String key, java.lang.String value)
AttributeMap
removeAttribute
in interface AttributeMap
key
- the keyvalue
- a single value to remove from the list of values
associated with the keyAttributeMap.removeAttribute(String, String)
public int size()
size
in interface java.util.Map
Map.size()
public boolean isEmpty()
isEmpty
in interface java.util.Map
Map.isEmpty()
public boolean containsKey(java.lang.Object key)
containsKey
in interface java.util.Map
Map.containsKey(Object)
public boolean containsValue(java.lang.Object value)
containsValue
in interface java.util.Map
Map.containsValue(Object)
public java.lang.Object get(java.lang.Object key)
get
in interface java.util.Map
Map.get(Object)
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
put
in interface java.util.Map
Map.put(Object, Object)
public java.lang.Object remove(java.lang.Object key)
remove
in interface java.util.Map
Map.remove(Object)
public void putAll(java.util.Map t)
putAll
in interface java.util.Map
Map.putAll(Map)
public void clear()
clear
in interface java.util.Map
Map.clear()
public java.util.Set keySet()
keySet
in interface java.util.Map
This method can be used to list all subjects
public java.util.Collection values()
values
in interface java.util.Map
Map.values()
public java.util.Set entrySet()
entrySet
in interface java.util.Map
This method can be used to list all subjects with their associated
attributes.
public void terminate()
AttributeMap
terminate
in interface AttributeMap
AttributeMap.terminate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |