Class AbstractAttributeDefinition

    • Field Detail

      • log

        @Nonnull
        private final org.slf4j.Logger log
        Class logger.
      • dependencyOnly

        private boolean dependencyOnly
        Whether this attribute definition is only a dependency and thus its values should never be released.
      • preRequested

        private boolean preRequested
        Whether this attribute definition is to be pre-resolved.
      • logPrefix

        @Nullable
        private String logPrefix
        cache for the log prefix - to save multiple recalculations.
    • Constructor Detail

      • AbstractAttributeDefinition

        public AbstractAttributeDefinition()
    • Method Detail

      • isDependencyOnly

        public boolean isDependencyOnly()
        Gets whether this attribute definition is only a dependency and thus its values should never be released outside the resolver.
        Specified by:
        isDependencyOnly in interface AttributeDefinition
        Returns:
        true if this attribute is only used as a dependency, false otherwise
      • setDependencyOnly

        public void setDependencyOnly​(boolean isDependencyOnly)
        Sets whether this attribute definition is only a dependency and thus its values should never be released outside the resolver.
        Parameters:
        isDependencyOnly - whether this attribute definition is only a dependency
      • isPreRequested

        public boolean isPreRequested()
        Gets whether this attribute definition has to be resolved prior in a first pass (in order to prime contexts which can be used in the "main pass").
        Specified by:
        isPreRequested in interface AttributeDefinition
        Returns:
        true if this is a definition to be done "first"
      • setPreRequested

        public void setPreRequested​(boolean value)
        Sets whether this definition (and its dependencies) are to be pre-resolved.
        Parameters:
        value - what to set
      • doAttributeDefinitionResolve

        @Nullable
        protected abstract IdPAttribute doAttributeDefinitionResolve​(@Nonnull
                                                                     AttributeResolutionContext resolutionContext,
                                                                     @Nonnull
                                                                     AttributeResolverWorkContext workContext)
                                                              throws ResolutionException
        Creates and populates the values for the resolved attribute. Implementations should not set, or otherwise manage, the resolved attribute's display name, description or encoders. Nor should the resultant attribute be recorded in the given resolution context.
        Parameters:
        resolutionContext - current attribute resolution context
        workContext - current resolver work context
        Returns:
        resolved attribute or null if nothing to resolve.
        Throws:
        ResolutionException - thrown if there is a problem resolving and creating the attribute