Package net.shibboleth.profile.config

# Class AbstractConditionalProfileConfiguration

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.profile.config.AbstractProfileConfiguration
net.shibboleth.profile.config.AbstractConditionalProfileConfiguration

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

Direct Known Subclasses:
  `MockProfileConfiguration`

public abstract class AbstractConditionalProfileConfiguration extends AbstractProfileConfiguration implements ConditionalProfileConfiguration
Base class for `ConditionalProfileConfiguration` implementations.

Since:
  3.4.0

## Field Summary

Fields
Modifier and Type
Field
Description
`private Predicate<ProfileRequestContext>`
`activationCondition`
Activation condition.

### Fields inherited from interface net.shibboleth.profile.config.ProfileConfiguration

`DEFAULT_DISALLOWED_FEATURES`

## Constructor Summary

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

## Method Summary

Modifier and Type
Method
Description
`Predicate<ProfileRequestContext>`
`getActivationCondition()`
Get the condition controlling enablement of this profile.
`void`
`setActivationCondition(Predicate<ProfileRequestContext> condition)`
Set an activation condition to control this profile.

### Methods inherited from class net.shibboleth.profile.config.AbstractProfileConfiguration

`equals, getDisallowedFeatures, getSecurityConfiguration, hashCode, isFeatureDisallowed, setDisallowedFeatures, setDisallowedFeaturesLookupStrategy, setSecurityConfiguration, setSecurityConfigurationLookupStrategy`

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

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

`getId`

### Methods inherited from interface net.shibboleth.profile.config.ProfileConfiguration

`getDisallowedFeatures, getSecurityConfiguration, isFeatureDisallowed`

## Field Details

### activationCondition

@Nonnull private Predicate<ProfileRequestContext> activationCondition
Activation condition.

## Constructor Details

### AbstractConditionalProfileConfiguration

public AbstractConditionalProfileConfiguration(@Nonnull @NotEmpty @ParameterName(name="id") String id)
Constructor.

Parameters:
  `id` - ID of the communication profile, never null or empty

## Method Details

### getActivationCondition

@Nonnull public Predicate<ProfileRequestContext> getActivationCondition()
Get the condition controlling enablement of this profile.

Specified by:
  `getActivationCondition` in interface `ConditionalProfileConfiguration`
Returns:
  condition controlling enablement of this profile

### setActivationCondition

public void setActivationCondition(@Nonnull Predicate<ProfileRequestContext> condition)
Set an activation condition to control this profile.

Parameters:
  `condition` - condition to apply