|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jasig.portal.services.persondir.support.MultivaluedPersonAttributeUtils
public final class MultivaluedPersonAttributeUtils
Constructor Summary | |
---|---|
private |
MultivaluedPersonAttributeUtils()
This class is not meant to be instantiated. |
Method Summary | |
---|---|
(package private) static void |
addResult(java.util.Map results,
java.lang.Object key,
java.lang.Object value)
Adds a key/value pair to the specified Map , creating multi-valued
values when appropriate. |
(package private) static java.util.Collection |
flattenCollection(java.util.Collection source)
Takes a Collection and creates a flattened Collection out
of it. |
(package private) static java.util.Map |
parseAttributeToAttributeMapping(java.util.Map mapping)
Translate from a more flexible Attribute to Attribute mapping format to a Map from String to Set of Strings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
private MultivaluedPersonAttributeUtils()
Method Detail |
---|
static java.util.Map parseAttributeToAttributeMapping(java.util.Map mapping)
Map
that must have keys of
type String
and values of type String
or Set
of
String
s. The argument must not be null and must have no null
keys or null values. It must contain no keys other than Strings and no
values other than Strings or Sets of Strings. This method will throw
IllegalArgumentException if the method argument doesn't meet these
requirements.
This method returns a Map equivalent to its argument except whereever there
was a String value in the Map there will instead be an immutable Set containing
the String value. That is, the return value is normalized to be a Map from
String to Set (of String).
mapping
- Map
from String names of attributes in the underlying store
to uP attribute names or Sets of such names.
java.lang.IllegalArgumentException
- If the Map
doesn't follow the rules stated above.static void addResult(java.util.Map results, java.lang.Object key, java.lang.Object value)
Map
, creating multi-valued
values when appropriate.
List
, passing in a List
of any type will
cause its contents to be added to the results
Map
directly under the specified key
results
- The Map
to modify.key
- The key to add the value for.value
- The value to add for the key.
java.lang.IllegalArgumentException
- if any argument is nullstatic java.util.Collection flattenCollection(java.util.Collection source)
Collection
and creates a flattened Collection
out
of it.
source
- The Collection
to flatten.
Collection
that contains all entries from all levels of source
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |