Class PluginDependencySupport

    • Field Detail

      • LOG

        private static final org.slf4j.Logger LOG
        Log.
    • Constructor Detail

      • PluginDependencySupport

        private PluginDependencySupport()
        Constructor.
    • Method Detail

      • 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 context
        attributeDependencies - set of dependencies on attribute definitions
        dataConnectorDependencies - set of dependencies on data connector definitions
        attributeDefinitionId - 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 calling getMergedAttributeValues(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 context
        dataConnectorDependencies - set of dependencies on data connector definitions
        attributeDependencies - 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 attribute
        target - 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 attribute
        target - current set attribute values