Package net.shibboleth.idp.saml.nameid.impl

# Class BaseTransformingDecoder

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.saml.nameid.impl.BaseTransformingDecoder

All Implemented Interfaces:
  `Component`, `DestructableComponent`, `IdentifiableComponent`, `IdentifiedComponent`, `InitializableComponent`

Direct Known Subclasses:
  `TransformingNameIDDecoder`, `TransformingNameIdentifierDecoder`

public abstract class BaseTransformingDecoder extends AbstractIdentifiableInitializableComponent
Regular expression, etc. transform of an identifier.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final org.slf4j.Logger`
`log`
Class logger.
`private boolean`
`lowercase`
Convert to lowercase prior to transforms?
`private List<Pair<Pattern,String>>`
`transforms`
Match patterns and replacement strings to apply.
`private boolean`
`uppercase`
Convert to uppercase prior to transforms?

## Constructor Summary

Constructors
Constructor
Description
`BaseTransformingDecoder()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected String`
`decode(String id)`
Apply configured transforms to input identifier.
`void`
`setLowercase(boolean flag)`
Controls conversion to lowercase prior to applying any transforms.
`void`
`setTransforms(Collection<Pair<String,String>> newTransforms)`
A collection of regular expression and replacement pairs.
`void`
`setUppercase(boolean flag)`
Controls conversion to uppercase prior to applying any transforms.

### Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent

`setId`

### Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent

`doInitialize, ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException`

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, initialize, isDestroyed, isInitialized`

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

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

### Methods inherited from interface net.shibboleth.shared.component.IdentifiedComponent

`getId`

## Field Details

### log

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

### transforms

@Nonnull private List<Pair<Pattern,String>> transforms
Match patterns and replacement strings to apply.

### uppercase

private boolean uppercase
Convert to uppercase prior to transforms?

### lowercase

private boolean lowercase
Convert to lowercase prior to transforms?

## Constructor Details

### BaseTransformingDecoder

public BaseTransformingDecoder()
Constructor.

## Method Details

### setUppercase

public void setUppercase(boolean flag)
Controls conversion to uppercase prior to applying any transforms.

Parameters:
  `flag` - uppercase flag
Since:
  4.1.0

### setLowercase

public void setLowercase(boolean flag)
Controls conversion to lowercase prior to applying any transforms.

Parameters:
  `flag` - lowercase flag
Since:
  4.1.0

### setTransforms

public void setTransforms(@Nullable Collection<Pair<String,String>> newTransforms)
A collection of regular expression and replacement pairs.

Parameters:
  `newTransforms` - collection of replacement transforms

### decode

@Nullable protected String decode(@Nonnull @NotEmpty String id)
Apply configured transforms to input identifier.

Parameters:
  `id` - the identifier to transform
Returns:
  transformed value