Package net.shibboleth.idp.attribute.resolver.ad.impl

# Class PrincipalNameAttributeDefinition

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.attribute.resolver.AbstractResolverPlugin<IdPAttribute>
net.shibboleth.idp.attribute.resolver.AbstractAttributeDefinition
net.shibboleth.idp.attribute.resolver.ad.impl.PrincipalNameAttributeDefinition

All Implemented Interfaces:
  `AttributeDefinition`, `ResolverPlugin<IdPAttribute>`, `Component`, `DestructableComponent`, `IdentifiableComponent`, `IdentifiedComponent`, `InitializableComponent`, `UnmodifiableComponent`, `DisposableBean`

public class PrincipalNameAttributeDefinition extends AbstractAttributeDefinition
An attribute definition which returns an attribute with a single value - the principal.

## Constructor Summary

Constructors
Constructor
Description
`PrincipalNameAttributeDefinition()`

## Method Summary

Modifier and Type
Method
Description
`protected IdPAttribute`
`doAttributeDefinitionResolve(AttributeResolutionContext resolutionContext, AttributeResolverWorkContext workContext)`
Creates and populates the values for the resolved attribute.

### Methods inherited from class net.shibboleth.idp.attribute.resolver.AbstractAttributeDefinition

`doInitialize, doResolve, getLogPrefix, isDependencyOnly, isPreRequested, setDependencyOnly, setPreRequested`

### Methods inherited from class net.shibboleth.idp.attribute.resolver.AbstractResolverPlugin

`doDestroy, equals, getActivationCondition, getAttributeDependencies, getDataConnectorDependencies, hashCode, isPropagateResolutionExceptions, resolve, setActivationCondition, setAttributeDependencies, setDataConnectorDependencies, setPropagateResolutionExceptions`

### 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, initialize, isDestroyed, isInitialized`

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

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

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

`destroy, isDestroyed`

### Methods inherited from interface org.springframework.beans.factory.DisposableBean

`destroy`

### 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 net.shibboleth.idp.attribute.resolver.ResolverPlugin

`getActivationCondition, getAttributeDependencies, getDataConnectorDependencies, isPropagateResolutionExceptions, resolve`

## Constructor Details

### PrincipalNameAttributeDefinition

public PrincipalNameAttributeDefinition()

## Method Details

### doAttributeDefinitionResolve

@Nullable protected IdPAttribute doAttributeDefinitionResolve(@Nonnull AttributeResolutionContext resolutionContext, @Nonnull AttributeResolverWorkContext workContext) throws ResolutionException
Description copied from class: `AbstractAttributeDefinition`
Creates and populates the values for the resolved attribute. Implementations should not set, or otherwise manage, the resolved attribute's display name, description or encoders. Nor should the resultant attribute be recorded in the given resolution context.

Specified by:
  `doAttributeDefinitionResolve` in class `AbstractAttributeDefinition`
Parameters:
  `resolutionContext` - current attribute resolution context
  `workContext` - current resolver work context
Returns:
  resolved attribute or null if nothing to resolve.
Throws:
  `ResolutionException` - thrown if there is a problem resolving and creating the attribute