Package net.shibboleth.idp.saml.attribute.impl

# Class AttributeMappingNodeProcessor

java.lang.Object
net.shibboleth.idp.saml.attribute.impl.AttributeMappingNodeProcessor

All Implemented Interfaces:
  `MetadataNodeProcessor`

@NotThreadSafe public class AttributeMappingNodeProcessor extends Object implements MetadataNodeProcessor
An implementation of `MetadataNodeProcessor` which extracts `IdPRequestedAttribute`s from any `AttributeConsumingService` we find and `IdPAttribute`s from any `EntityDescriptor` that we find.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final AttributeTranscoder<Attribute>`
`defaultTranscoder`
Fallback for URI-named entity tags.
`private final org.slf4j.Logger`
`log`
Class logger.
`private final ReloadableService<AttributeTranscoderRegistry>`
`transcoderRegistry`
Service used to get the registry of decoding rules.

## Constructor Summary

Constructors
Constructor
Description
`AttributeMappingNodeProcessor(ReloadableService<AttributeTranscoderRegistry> registry)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`private <T> void`
`decodeAttribute(Collection<TranscodingRule> rules, T input, Multimap<String,IdPAttribute> results)`
Access the registry of transcoding rules to decode the input object.
`private void`
`handleAttributeConsumingService(AttributeTranscoderRegistry registry, AttributeConsumingService acs)`
Look inside the `AttributeConsumingService` for any `RequestedAttribute`s and map them.
`private void`
`handleEntityAttributes(AttributeTranscoderRegistry registry, Extensions extensions)`
Look inside the `Extensions` for `EntityAttributes` and map them.
`void`
`process(XMLObject metadataNode)`

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

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

## Field Details

### log

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

### transcoderRegistry

@Nonnull private final ReloadableService<AttributeTranscoderRegistry> transcoderRegistry
Service used to get the registry of decoding rules.

### defaultTranscoder

@Nonnull private final AttributeTranscoder<Attribute> defaultTranscoder
Fallback for URI-named entity tags.

## Constructor Details

### AttributeMappingNodeProcessor

public AttributeMappingNodeProcessor(@Nonnull ReloadableService<AttributeTranscoderRegistry> registry)
Constructor.

Parameters:
  `registry` - the service for the decoding rules

## Method Details

### process

public void process(@Nonnull XMLObject metadataNode) throws FilterException

Specified by:
  `process` in interface `MetadataNodeProcessor`
Throws:
  `FilterException`

### handleAttributeConsumingService

private void handleAttributeConsumingService(@Nonnull AttributeTranscoderRegistry registry, @Nonnull AttributeConsumingService acs)
Look inside the `AttributeConsumingService` for any `RequestedAttribute`s and map them.

Parameters:
  `registry` - the registry service
  `acs` - the `AttributeConsumingService` to look at

### handleEntityAttributes

private void handleEntityAttributes(@Nonnull AttributeTranscoderRegistry registry, @Nullable Extensions extensions)
Look inside the `Extensions` for `EntityAttributes` and map them.

Parameters:
  `registry` - the registry service
  `extensions` - the extensions block

### decodeAttribute

private <T> void decodeAttribute(@Nonnull Collection<TranscodingRule> rules, @Nonnull T input, @Nonnull Multimap<String,IdPAttribute> results) throws AttributeDecodingException
Access the registry of transcoding rules to decode the input object.

Type Parameters:
  `T` - input type
Parameters:
  `rules` - transcoding rules
  `input` - input object
  `results` - collection to add results to
Throws:
  `AttributeDecodingException` - if an error occurs or no results were obtained