Package net.shibboleth.idp.saml.nameid

# Class AbstractNameIDCanonicalizer

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.authn.SubjectCanonicalizationFlowDescriptor
net.shibboleth.idp.saml.nameid.NameIDCanonicalizationFlowDescriptor
net.shibboleth.idp.saml.nameid.AbstractNameIDCanonicalizer

All Implemented Interfaces:
  `Function<SubjectCanonicalizationContext,String>`, `Predicate<ProfileRequestContext>`, `SubjectCanonicalizer`, `FlowDescriptor`, `Component`, `DestructableComponent`, `IdentifiableComponent`, `IdentifiedComponent`, `InitializableComponent`

Direct Known Subclasses:
  `NameIDCanonicalization`, `NameIdentifierCanonicalization`

public abstract class AbstractNameIDCanonicalizer extends NameIDCanonicalizationFlowDescriptor implements SubjectCanonicalizer
Base class for "inline" implementations of SAML c14n flows.

Since:
  5.2.0

## Field Summary

Fields
Modifier and Type
Field
Description
`private final org.slf4j.Logger`
`log`
Class logger.
`private String`
`logPrefix`
Cached log prefix.

## Constructor Summary

Constructors
Constructor
Description
`AbstractNameIDCanonicalizer()`

## Method Summary

Modifier and Type
Method
Description
`String`
`apply(SubjectCanonicalizationContext c14nContext)`
Performs this c14n action's pre-execute step.
`protected abstract String`
`doApply(SubjectCanonicalizationContext c14nContext)`
Performs c14n if possible.
`protected void`
`doInitialize()`
`protected String`
`getLogPrefix()`
Return a prefix for logging messages for this component.

### Methods inherited from class net.shibboleth.idp.saml.nameid.NameIDCanonicalizationFlowDescriptor

`getFormats, setFormats`

### Methods inherited from class net.shibboleth.idp.authn.SubjectCanonicalizationFlowDescriptor

`equals, getFlowId, hashCode, setActivationCondition, setFlowId, test, toString`

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

`setId`

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

`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, finalize, getClass, notify, notifyAll, wait, wait, wait`

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

`destroy, isDestroyed`

### Methods inherited from interface java.util.function.Function

`andThen, compose`

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

`setId`

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

`getId`

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

`initialize, isInitialized`

### Methods inherited from interface java.util.function.Predicate

`and, negate, or`

## Field Details

### log

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

### logPrefix

@NonnullAfterInit private String logPrefix
Cached log prefix.

## Constructor Details

### AbstractNameIDCanonicalizer

public AbstractNameIDCanonicalizer()

## Method Details

### doInitialize

protected void doInitialize() throws ComponentInitializationException

Overrides:
  `doInitialize` in class `SubjectCanonicalizationFlowDescriptor`
Throws:
  `ComponentInitializationException`

### apply

@Nullable public String apply(@Nullable SubjectCanonicalizationContext c14nContext)
Performs this c14n action's pre-execute step. Default implementation just returns true iff a subject is set.

Specified by:
  `apply` in interface `Function<SubjectCanonicalizationContext,String>`
Parameters:
  `c14nContext` - the current subject canonicalization context
Returns:
  event indicating result of function

### doApply

@Nullable protected abstract String doApply(@Nonnull SubjectCanonicalizationContext c14nContext)
Performs c14n if possible.

Parameters:
  `c14nContext` - the current subject canonicalization context
Returns:
  event indicating result of function

### getLogPrefix

@NonnullAfterInit protected String getLogPrefix()
Return a prefix for logging messages for this component.

Returns:
  a string for insertion at the beginning of any log messages