Class PluginDependencySupport
java.lang.Object
net.shibboleth.idp.attribute.resolver.PluginDependencySupport
Support class for working with dependencies both
ResolverAttributeDefinitionDependency
and ResolverDataConnectorDependency
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
addAttribute
(IdPAttribute source, Map<String, List<IdPAttributeValue>> target) Adds the values of the given attribute to the target collection of attribute values.static Map<String,
List<IdPAttributeValue>> getAllAttributeValues
(AttributeResolverWorkContext workContext, Collection<ResolverAttributeDefinitionDependency> attributeDependencies, Collection<ResolverDataConnectorDependency> dataConnectorDependencies) Gets the values from all dependencies.static List<IdPAttributeValue>
getMergedAttributeValues
(AttributeResolverWorkContext workContext, Collection<ResolverAttributeDefinitionDependency> attributeDependencies, Collection<ResolverDataConnectorDependency> dataConnectorDependencies, String attributeDefinitionId) Gets the values, as a single list, from all dependencies.private static void
mergeAttributeValues
(IdPAttribute source, List<IdPAttributeValue> target) Adds the values of the given attribute to the set of attribute values.
-
Field Details
-
LOG
private static final org.slf4j.Logger LOGLog.
-
-
Constructor Details
-
PluginDependencySupport
private PluginDependencySupport()Constructor.
-
-
Method Details
-
getMergedAttributeValues
@Nonnull @NonnullElements public static List<IdPAttributeValue> getMergedAttributeValues(@Nonnull AttributeResolverWorkContext workContext, @Nonnull @NonnullElements Collection<ResolverAttributeDefinitionDependency> attributeDependencies, @Nonnull @NonnullElements Collection<ResolverDataConnectorDependency> dataConnectorDependencies, @Nonnull String attributeDefinitionId) Gets the values, as a single list, from all dependencies. It is therefore used inside Attribute Definitions which only process a single attribute as input.NOTE, this method does *not* actually trigger any attribute definition or data connector resolution, it only looks for the cached results of previously resolved plugins within the current work context.
- Parameters:
workContext
- current attribute resolver work contextattributeDependencies
- set of dependencies on attribute definitionsdataConnectorDependencies
- set of dependencies on data connector definitionsattributeDefinitionId
- the attributeID that these values will be associated with.- Returns:
- the merged value set. Returns an empty set if we were given a DataConnector as a dependency, but not attribute name
-
getAllAttributeValues
public static Map<String,List<IdPAttributeValue>> getAllAttributeValues(@Nonnull AttributeResolverWorkContext workContext, @Nonnull Collection<ResolverAttributeDefinitionDependency> attributeDependencies, @Nonnull @NonnullElements Collection<ResolverDataConnectorDependency> dataConnectorDependencies) Gets the values from all dependencies. Attributes, with the same identifier but from different resolver plugins, will have their values merged into a single list within this method's returned map. This method is the equivalent of callinggetMergedAttributeValues(AttributeResolverWorkContext, Collection, Collection, String)
for all attributes resolved by all the given dependencies. This is therefore used when an attribute definition may have multiple input attributes (for instance scripted or templated definitions).NOTE, this method does *not* actually trigger any attribute definition or data connector resolution, it only looks for the cached results of previously resolved plugins within the current work context.
- Parameters:
workContext
- current attribute resolver work contextdataConnectorDependencies
- set of dependencies on data connector definitionsattributeDependencies
- set of dependencies- Returns:
- the merged value set
-
addAttribute
@Nonnull private static void addAttribute(@Nullable IdPAttribute source, @Nullable Map<String, List<IdPAttributeValue>> target) Adds the values of the given attribute to the target collection of attribute values.- Parameters:
source
- the source attributetarget
- current set attribute values
-
mergeAttributeValues
@Nonnull private static void mergeAttributeValues(@Nullable IdPAttribute source, @Nonnull List<IdPAttributeValue> target) Adds the values of the given attribute to the set of attribute values.- Parameters:
source
- the source attributetarget
- current set attribute values
-