Class ResolveAttributes

    • Constructor Detail

      • ResolveAttributes

        public ResolveAttributes​(@Nonnull
                                 ReloadableService<AttributeResolver> resolverService)
        Constructor.
        Parameters:
        resolverService - resolver used to fetch attributes
    • Method Detail

      • setTranscoderRegistry

        public void setTranscoderRegistry​(@Nullable
                                          ReloadableService<AttributeTranscoderRegistry> registry)
        Sets the registry of transcoding rules to apply to supply attribute display metadata.
        Parameters:
        registry - registry service interface
      • setIssuerLookupStrategy

        public void setIssuerLookupStrategy​(@Nullable
                                            Function<ProfileRequestContext,​String> strategy)
        Set the strategy used to lookup the issuer for this attribute resolution.
        Parameters:
        strategy - lookup strategy
      • setRecipientLookupStrategy

        public void setRecipientLookupStrategy​(@Nullable
                                               Function<ProfileRequestContext,​String> strategy)
        Set the strategy used to lookup the recipient for this attribute resolution.
        Parameters:
        strategy - lookup strategy
      • setPrincipalNameLookupStrategy

        public void setPrincipalNameLookupStrategy​(@Nullable
                                                   Function<ProfileRequestContext,​String> strategy)
        Set the strategy used to locate the principal name for this attribute resolution.
        Parameters:
        strategy - lookup strategy
      • setAttributesLookupStrategy

        public void setAttributesLookupStrategy​(@Nonnull
                                                Function<ProfileRequestContext,​Collection<String>> strategy)
        Set a strategy to use to obtain the names of the attributes to resolve.
        Parameters:
        strategy - lookup strategy
      • setAttributesToResolve

        public void setAttributesToResolve​(@Nonnull @NonnullElements
                                           Collection<String> attributeIds)
        Set the attribute IDs to pass into the resolver.
        Parameters:
        attributeIds - attribute ID collection
      • setResolutionContextDecorator

        public void setResolutionContextDecorator​(@Nullable
                                                  Consumer<AttributeResolutionContext> decorator)
        Set optional hook for decorating or adding to resolution context.
        Parameters:
        decorator - decorator hook
        Since:
        4.2.0
      • setMaskFailures

        public void setMaskFailures​(boolean flag)
        Set whether to treat resolution failure as equivalent to resolving no attributes.

        This matches the behavior of V2.

        Parameters:
        flag - flag to set
      • setResolutionLabel

        public void setResolutionLabel​(@Nullable
                                       String label)
        Set the optional "contextual" label associated with this attribute resolution.
        Parameters:
        label - label to set
        Since:
        3.4.0
      • setCreateResolutionContext

        public void setCreateResolutionContext​(boolean flag)
        Set whether to create the AttributeResolutionContext internally.

        Defaults to 'true', disable to allow external creation of the context.

        Parameters:
        flag - flag to set
      • populateResolutionContext

        private void populateResolutionContext​(@Nonnull
                                               ProfileRequestContext profileRequestContext,
                                               @Nonnull
                                               AttributeResolutionContext resolutionContext)
        Fill in the resolution context data.
        Parameters:
        profileRequestContext - current profile request context
        resolutionContext - context to populate