Package net.shibboleth.profile.config

# Class AbstractProfileConfiguration

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

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

Direct Known Subclasses:
  `AbstractConditionalProfileConfiguration`

public abstract class AbstractProfileConfiguration extends AbstractIdentifiableInitializableComponent implements ProfileConfiguration
Base class for `ProfileConfiguration` implementations.

## Field Summary

Fields
Modifier and Type
Field
Description
`private Function<ProfileRequestContext,Integer>`
`disallowedFeaturesLookupStrategy`
Lookup function to return a bitmask of request features to disallow.
`private Function<ProfileRequestContext,SecurityConfiguration>`
`securityConfigurationLookupStrategy`
Lookup function to supply securityConfiguration property.

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

`DEFAULT_DISALLOWED_FEATURES`

## Constructor Summary

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

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object obj)`
`int`
`getDisallowedFeatures(ProfileRequestContext profileRequestContext)`
Get a bitmask of disallowed features to block.
`SecurityConfiguration`
`getSecurityConfiguration(ProfileRequestContext profileRequestContext)`
Get the `SecurityConfiguration` to use with this profile.
`int`
`hashCode()`
`boolean`
`isFeatureDisallowed(ProfileRequestContext profileRequestContext, int feature)`
Return true iff the input feature constant is disallowed.
`void`
`setDisallowedFeatures(int mask)`
Set a bitmask of disallowed features to block.
`void`
`setDisallowedFeaturesLookupStrategy(Function<ProfileRequestContext,Integer> strategy)`
Set a lookup strategy for the bitmask of disallowed features to block.
`void`
`setSecurityConfiguration(SecurityConfiguration configuration)`
Sets the security configuration for this profile.
`void`
`setSecurityConfigurationLookupStrategy(Function<ProfileRequestContext,SecurityConfiguration> strategy)`
Set a lookup strategy for the security configuration.

### 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`

## Field Details

### securityConfigurationLookupStrategy

@Nonnull private Function<ProfileRequestContext,SecurityConfiguration> securityConfigurationLookupStrategy
Lookup function to supply securityConfiguration property.

### disallowedFeaturesLookupStrategy

@Nonnull private Function<ProfileRequestContext,Integer> disallowedFeaturesLookupStrategy
Lookup function to return a bitmask of request features to disallow.

## Constructor Details

### AbstractProfileConfiguration

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

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

## Method Details

### getSecurityConfiguration

@Nullable public SecurityConfiguration getSecurityConfiguration(@Nullable ProfileRequestContext profileRequestContext)
Get the `SecurityConfiguration` to use with this profile.

Specified by:
  `getSecurityConfiguration` in interface `ProfileConfiguration`
Parameters:
  `profileRequestContext` - current profile request context
Returns:
  security configuration to use with this profile

### setSecurityConfiguration

public void setSecurityConfiguration(@Nullable SecurityConfiguration configuration)
Sets the security configuration for this profile.

Parameters:
  `configuration` - security configuration for this profile

### setSecurityConfigurationLookupStrategy

public void setSecurityConfigurationLookupStrategy(@Nonnull Function<ProfileRequestContext,SecurityConfiguration> strategy)
Set a lookup strategy for the security configuration.

Parameters:
  `strategy` - lookup strategy
Since:
  3.3.0

### isFeatureDisallowed

public boolean isFeatureDisallowed(@Nullable ProfileRequestContext profileRequestContext, int feature)
Return true iff the input feature constant is disallowed.

Specified by:
  `isFeatureDisallowed` in interface `ProfileConfiguration`
Parameters:
  `profileRequestContext` - current profile request context
  `feature` - a bit constant
Returns:
  true iff the input feature constant is disallowed

### getDisallowedFeatures

public int getDisallowedFeatures(@Nullable ProfileRequestContext profileRequestContext)
Get a bitmask of disallowed features to block.

Individual profiles define their own feature constants.

Specified by:
  `getDisallowedFeatures` in interface `ProfileConfiguration`
Parameters:
  `profileRequestContext` - current profile request context
Returns:
  bitmask of features to block

### setDisallowedFeatures

public void setDisallowedFeatures(int mask)
Set a bitmask of disallowed features to block.

Parameters:
  `mask` - a bitmask of features to block
Since:
  3.3.0

### setDisallowedFeaturesLookupStrategy

public void setDisallowedFeaturesLookupStrategy(@Nonnull Function<ProfileRequestContext,Integer> strategy)
Set a lookup strategy for the bitmask of disallowed features to block.

Parameters:
  `strategy` - lookup strategy
Since:
  3.3.0

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### equals

public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`