Package net.shibboleth.idp.attribute.resolver.dc.storage.impl

# Class SimpleStorageMappingStrategy

java.lang.Object
net.shibboleth.idp.attribute.resolver.dc.storage.impl.SimpleStorageMappingStrategy

All Implemented Interfaces:
  `MappingStrategy<StorageRecord<?>>`, `StorageMappingStrategy`

public class SimpleStorageMappingStrategy extends Object implements StorageMappingStrategy
`MappingStrategy` for pulling data out of `StorageRecord`.

Since:
  4.1.0

## Field Summary

Fields
Modifier and Type
Field
Description
`private final String`
`attributeId`
ID of the attribute to create.

## Constructor Summary

Constructors
Constructor
Description
`SimpleStorageMappingStrategy(String id)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`Map<String,IdPAttribute>`
`map(StorageRecord<?> results)`
Maps the given results to a collection of `IdPAttribute` indexed by the attribute's ID.

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

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

## Field Details

### attributeId

@Nonnull @NotEmpty private final String attributeId
ID of the attribute to create.

## Constructor Details

### SimpleStorageMappingStrategy

public SimpleStorageMappingStrategy(@Nonnull @NotEmpty String id)
Constructor.

Parameters:
  `id` - attribute ID to create

## Method Details

### map

@Nonnull @Unmodifiable @NotLive public Map<String,IdPAttribute> map(@Nonnull StorageRecord<?> results) throws ResolutionException
Maps the given results to a collection of `IdPAttribute` indexed by the attribute's ID.

Specified by:
  `map` in interface `MappingStrategy<StorageRecord<?>>`
Parameters:
  `results` - to map
Returns:
  the mapped attributes or null if none exist
Throws:
  `ResolutionException` - thrown if there is a problem reading data or mapping it