public abstract class BaseAdditiveAttributeMerger extends Object implements IAttributeMerger
mergePersonAttributes(Map, Map) method on the
attributes of IPersons that exist in both sets. The mergeAvailableQueryAttributes(Set, Set) and mergePossibleUserAttributeNames(Set, Set)
methods do a simple addative merge of the sets. These can be overriden by subclasses.| Constructor and Description |
|---|
BaseAdditiveAttributeMerger() |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,List<Object>> |
buildMutableAttributeMap(Map<String,List<Object>> attributes)
Do a deep clone of an attribute Map to ensure it is completley mutable.
|
protected Map<String,List<Object>> |
createMutableAttributeMap(int size)
Create the Map used when merging attributes
|
Map<String,List<Object>> |
mergeAttributes(Map<String,List<Object>> toModify,
Map<String,List<Object>> toConsider)
Modify the "toModify" argument in consideration of the "toConsider"
argument.
|
Set<String> |
mergeAvailableQueryAttributes(Set<String> toModify,
Set<String> toConsider)
Modify the "toModify" argument in consideration of the "toConsider" argument.
|
protected abstract Map<String,List<Object>> |
mergePersonAttributes(Map<String,List<Object>> toModify,
Map<String,List<Object>> toConsider)
Modify the "toModify" argument in consideration of the "toConsider" argument.
|
Set<String> |
mergePossibleUserAttributeNames(Set<String> toModify,
Set<String> toConsider)
Modify the "toModify" argument in consideration of the "toConsider" argument.
|
Set<IPersonAttributes> |
mergeResults(Set<IPersonAttributes> toModify,
Set<IPersonAttributes> toConsider)
Merge the results of a Set of
IPersonAttributes and a compiled results map. |
public Set<String> mergeAvailableQueryAttributes(Set<String> toModify, Set<String> toConsider)
IAttributeMergermergeAvailableQueryAttributes in interface IAttributeMergertoModify - Modify this settoConsider - In consideration of this setpublic Set<String> mergePossibleUserAttributeNames(Set<String> toModify, Set<String> toConsider)
IAttributeMergermergePossibleUserAttributeNames in interface IAttributeMergertoModify - Modify this settoConsider - In consideration of this setpublic final Set<IPersonAttributes> mergeResults(Set<IPersonAttributes> toModify, Set<IPersonAttributes> toConsider)
IAttributeMergerIPersonAttributes and a compiled results map.mergeResults in interface IAttributeMergertoModify - The compiled results map, this will be modified based on the values in toConsider.toConsider - The query results map, this will not be modified.IPersonAttributesprotected Map<String,List<Object>> buildMutableAttributeMap(Map<String,List<Object>> attributes)
attributes - Attribute mapprotected Map<String,List<Object>> createMutableAttributeMap(int size)
size - Size of the map to createprotected abstract Map<String,List<Object>> mergePersonAttributes(Map<String,List<Object>> toModify, Map<String,List<Object>> toConsider)
toModify - - modify this maptoConsider - - in consideration of this mapIllegalArgumentException - if either toModify or toConsider is nullpublic Map<String,List<Object>> mergeAttributes(Map<String,List<Object>> toModify, Map<String,List<Object>> toConsider)
IAttributeMergermergeAttributes in interface IAttributeMergertoModify - - modify this maptoConsider - - in consideration of this mapCopyright © 2015 Jasig. All Rights Reserved.