Package net.shibboleth.idp.attribute.resolver.spring.ad.impl

# Class SubjectDerivedAttributeDefinitionParser

java.lang.Object
org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
net.shibboleth.shared.spring.custom.AbstractCustomBeanDefinitionParser
net.shibboleth.idp.attribute.resolver.spring.BaseResolverPluginParser
net.shibboleth.idp.attribute.resolver.spring.ad.BaseAttributeDefinitionParser
net.shibboleth.idp.attribute.resolver.spring.ad.impl.SubjectDerivedAttributeDefinitionParser

All Implemented Interfaces:
  `BeanDefinitionParser`

public class SubjectDerivedAttributeDefinitionParser extends BaseAttributeDefinitionParser
Spring Bean Definition Parser for attribute definitions derived from the Principal.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final org.slf4j.Logger`
`log`
Class logger.
`private Class<? extends Function<?,?>>`
`principalDerivedClass`
Class for sourcing values from Principal(s).
`private Class<? extends Function<?,?>>`
`subjectDerivedClass`
Class for sourcing values from Subject(s).
`static final QName`
`TYPE_NAME`
Schema type name.

### Fields inherited from class net.shibboleth.idp.attribute.resolver.spring.ad.BaseAttributeDefinitionParser

`ATTRIBUTE_ENCODER_ELEMENT_NAME, ELEMENT_NAME`

### Fields inherited from class net.shibboleth.shared.spring.custom.AbstractCustomBeanDefinitionParser

`CUSTOM_PARSER_PROPERTIES_LOCATION`

### Fields inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser

`ID_ATTRIBUTE, NAME_ATTRIBUTE`

## Constructor Summary

Constructors
Constructor
Description
`SubjectDerivedAttributeDefinitionParser()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doParse(Element config, ParserContext parserContext, BeanDefinitionBuilder builder)`
.
`protected boolean`
`failOnDependencies()`
Controls parsing of Dependencies.
`protected Class<ContextDerivedAttributeDefinition>`
`getBeanClass(Element element)`

### Methods inherited from class net.shibboleth.idp.attribute.resolver.spring.ad.BaseAttributeDefinitionParser

`getLogPrefix`

### Methods inherited from class net.shibboleth.idp.attribute.resolver.spring.BaseResolverPluginParser

`getActivationCondition, getDefinitionId, warnOnDependencies`

### Methods inherited from class net.shibboleth.shared.spring.custom.AbstractCustomBeanDefinitionParser

`getCustomProperty, registerBeanDefinition`

### Methods inherited from class org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser

`doParse, getBeanClassName, getParentName, parseInternal`

### Methods inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser

`parse, postProcessComponentDefinition, resolveId, shouldFireEvents, shouldGenerateId, shouldGenerateIdAsFallback, shouldParseNameAsAliases`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### TYPE_NAME

@Nonnull public static final QName TYPE_NAME
Schema type name.

### subjectDerivedClass

@Nullable private Class<? extends Function<?,?>> subjectDerivedClass
Class for sourcing values from Subject(s).

### principalDerivedClass

@Nullable private Class<? extends Function<?,?>> principalDerivedClass
Class for sourcing values from Principal(s).

### log

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

## Constructor Details

### SubjectDerivedAttributeDefinitionParser

public SubjectDerivedAttributeDefinitionParser()
Constructor.

## Method Details

### getBeanClass

@Nullable protected Class<ContextDerivedAttributeDefinition> getBeanClass(@Nonnull Element element)

Overrides:
  `getBeanClass` in class `AbstractSingleBeanDefinitionParser`

### doParse

protected void doParse(@Nonnull Element config, @Nonnull ParserContext parserContext, @Nonnull BeanDefinitionBuilder builder)
. We inject an inferred function to derive the attributes from the Subject.

If 'principalAttributeName' we also inject an inferred function to derive the attributes from a Principal. If 'attributeValueFunctionRef' the user has provided the function. `ContextDerivedAttributeDefinitionParser` handles the case when the user injects the top level function.

Overrides:
  `doParse` in class `BaseAttributeDefinitionParser`

### failOnDependencies

protected boolean failOnDependencies()
Controls parsing of Dependencies. If it is considered an invalid configuration for this resolver to have Dependency statements, return true. The surrounding logic will fail the parse.

Overrides:
  `failOnDependencies` in class `BaseResolverPluginParser`
Returns:
  false - by default.