Class MappedAttributeDefinition

    • Field Detail

      • log

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

        private boolean passThru
        Whether the definition passes thru unmatched values.
    • Constructor Detail

      • MappedAttributeDefinition

        public MappedAttributeDefinition()
    • Method Detail

      • setValueMaps

        public void setValueMaps​(@Nullable @NonnullElements
                                 Collection<ValueMap> mappings)
        Sets the functions used to map an input value to an output value.
        Parameters:
        mappings - functions used to map an input value to an output value
      • getDefaultAttributeValue

        @Nullable
        public StringAttributeValue getDefaultAttributeValue()
        Gets the default return value.
        Returns:
        the default return value.
      • getDefaultValue

        @Nullable
        public String getDefaultValue()
        Gets the default return value.
        Returns:
        the default return value.
      • setDefaultValue

        public void setDefaultValue​(@Nullable
                                    String newDefaultValue)
        Sets the default return value.
        Parameters:
        newDefaultValue - the default return value
      • isPassThru

        public boolean isPassThru()
        Gets whether the definition passes unmatched values through.
        Returns:
        whether the definition passes unmatched values unchanged or suppresses them.
      • setPassThru

        public void setPassThru​(boolean newPassThru)
        Sets whether the definition passes unmatched values through.
        Parameters:
        newPassThru - whether the definition passes unmatched values unchanged or suppresses them.
      • mapValue

        protected List<StringAttributeValue> mapValue​(@Nullable
                                                      String value)
        Maps the value from a dependency in to the value(s) for this attribute.
        Parameters:
        value - the value from the dependency
        Returns:
        the set of attribute values that the given dependency value maps in to
      • doAttributeDefinitionResolve

        @Nullable
        protected 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.
        Specified by:
        doAttributeDefinitionResolve in class AbstractAttributeDefinition
        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