Package net.shibboleth.idp.authn

# Class SubjectCanonicalizationFlowDescriptor

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.authn.SubjectCanonicalizationFlowDescriptor

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

Direct Known Subclasses:
  `AbstractSubjectCanonicalizer`, `NameIDCanonicalizationFlowDescriptor`

public class SubjectCanonicalizationFlowDescriptor extends AbstractIdentifiableInitializableComponent implements FlowDescriptor, Predicate<ProfileRequestContext>
A descriptor for a subject canonicalization flow or `SubjectCanonicalizer` implementation.

A flow models a sequence of profile actions that performs canonicalization of a `Subject` into a string-form principal name. Flows can do essentially anything, including interact with the subject, but must include an activation predicate to indicate their suitability based on the content of the context tree, particularly the required `SubjectCanonicalizationContext` child context.

Since 5.2, a more common alternative to a flow is to implement the functional `SubjectCanonicalizer` interface, which allows a procedural implementation when there is no particular reason to leverage a web flow.

## Field Summary

Fields
Modifier and Type
Field
Description
`private Predicate<ProfileRequestContext>`
`activationCondition`
Predicate that must be true for this flow to be usable for a given request.
`private String`
`flowId`
Optional flow ID that may differ from component ID.

## Constructor Summary

Constructors
Constructor
Description
`SubjectCanonicalizationFlowDescriptor()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doInitialize()`
`boolean`
`equals(Object obj)`
`String`
`getFlowId()`
Gets the flow ID for this descriptor (inclusive of the c14n/ prefix).
`int`
`hashCode()`
`void`
`setActivationCondition(Predicate<ProfileRequestContext> condition)`
Set the activation condition in the form of a `Predicate` such that iff the condition evaluates to true should the corresponding flow be allowed/possible.
`void`
`setFlowId(String id)`
Sets the webflow ID for this descriptor.
`boolean`
`test(ProfileRequestContext input)`
`String`
`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 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

### flowId

@NonnullAfterInit private String flowId
Optional flow ID that may differ from component ID.

### activationCondition

@Nonnull private Predicate<ProfileRequestContext> activationCondition
Predicate that must be true for this flow to be usable for a given request.

## Constructor Details

### SubjectCanonicalizationFlowDescriptor

public SubjectCanonicalizationFlowDescriptor()
Constructor.

## Method Details

### getFlowId

@Nullable public String getFlowId()
Gets the flow ID for this descriptor (inclusive of the c14n/ prefix).

Returns:
  flow ID

### setFlowId

public void setFlowId(@Nullable String id)
Sets the webflow ID for this descriptor.

This defaults to the component ID, but can be overridden to allow multiple components to be defined for a given webflow.

Parameters:
  `id` - webflow ID
Since:
  5.2.0

### setActivationCondition

public void setActivationCondition(@Nonnull Predicate<ProfileRequestContext> condition)
Set the activation condition in the form of a `Predicate` such that iff the condition evaluates to true should the corresponding flow be allowed/possible.

Parameters:
  `condition` - predicate that controls activation of the flow

### doInitialize

protected void doInitialize() throws ComponentInitializationException

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

### test

public boolean test(ProfileRequestContext input)

Specified by:
  `test` in interface `Predicate<ProfileRequestContext>`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### equals

public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

### toString

public String toString()

Overrides:
  `toString` in class `Object`