Package org.opensaml.xmlsec.impl

# Class BasicAlgorithmPolicyConfiguration

java.lang.Object
org.opensaml.xmlsec.impl.BasicAlgorithmPolicyConfiguration

All Implemented Interfaces:
  `AlgorithmPolicyConfiguration`

Direct Known Subclasses:
  `BasicDecryptionConfiguration`, `BasicEncryptionConfiguration`, `BasicSignatureSigningConfiguration`, `BasicSignatureValidationConfiguration`

public class BasicAlgorithmPolicyConfiguration extends Object implements AlgorithmPolicyConfiguration
Basic implementation of `AlgorithmPolicyConfiguration`.

The value returned by `getIncludeExcludePrecedence()` defaults to `AlgorithmPolicyConfiguration.Precedence.INCLUDE`.

## Nested Class Summary

## Nested classes/interfaces inherited from interface org.opensaml.xmlsec.AlgorithmPolicyConfiguration

`AlgorithmPolicyConfiguration.Precedence`

## Field Summary

Fields
Modifier and Type
Field
Description
`static final AlgorithmPolicyConfiguration.Precedence`
`DEFAULT_PRECEDENCE`
Default precedence.
`private boolean`
`excludeMerge`
Exclude merge flag.
`private Collection<String>`
`excludes`
Excluded algorithm URIs.
`private boolean`
`includeMerge`
Include merge flag.
`private Collection<String>`
`includes`
Included algorithm URIs.
`private AlgorithmPolicyConfiguration.Precedence`
`precedence`
Precedence flag.

## Constructor Summary

Constructors
Constructor
Description
`BasicAlgorithmPolicyConfiguration()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`Collection<String>`
`getExcludedAlgorithms()`
Get the collection of excluded algorithm URIs.
`Collection<String>`
`getIncludedAlgorithms()`
Get the collection of included algorithm URIs.
`AlgorithmPolicyConfiguration.Precedence`
`getIncludeExcludePrecedence()`
Get preference value indicating which should take precedence when both include and exclude collections are non-empty.
`boolean`
`isExcludeMerge()`
Flag indicating whether to merge this configuration's excludes with one of a lower order of precedence, or to treat this exclude collection as authoritative.
`boolean`
`isIncludeMerge()`
Flag indicating whether to merge this configuration's includes with one of a lower order of precedence, or to treat this include collection as authoritative.
`void`
`setExcludedAlgorithms(Collection<String> uris)`
Set the list of excluded algorithm URIs.
`void`
`setExcludeMerge(boolean flag)`
Set the flag indicating whether to merge this configuration's excludes with one of a lower order of precedence, or to treat these excludes as authoritative.
`void`
`setIncludedAlgorithms(Collection<String> uris)`
Set the list of included algorithm URIs.
`void`
`setIncludeExcludePrecedence(AlgorithmPolicyConfiguration.Precedence value)`
Set preference value indicating which should take precedence when both includes and excludes are non-empty.
`void`
`setIncludeMerge(boolean flag)`
Set the flag indicating whether to merge this configuration's includes with one of a lower order of precedence, or to treat these includes as authoritative.

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

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

## Field Details

### DEFAULT_PRECEDENCE

@Nonnull public static final AlgorithmPolicyConfiguration.Precedence DEFAULT_PRECEDENCE
Default precedence.

### includes

@Nonnull private Collection<String> includes
Included algorithm URIs.

### includeMerge

private boolean includeMerge
Include merge flag.

### excludes

@Nonnull private Collection<String> excludes
Excluded algorithm URIs.

### excludeMerge

private boolean excludeMerge
Exclude merge flag.

### precedence

@Nonnull private AlgorithmPolicyConfiguration.Precedence precedence
Precedence flag.

## Constructor Details

### BasicAlgorithmPolicyConfiguration

public BasicAlgorithmPolicyConfiguration()
Constructor.

## Method Details

### getIncludedAlgorithms

@Nonnull @NotLive @Unmodifiable public Collection<String> getIncludedAlgorithms()
Get the collection of included algorithm URIs.

Specified by:
  `getIncludedAlgorithms` in interface `AlgorithmPolicyConfiguration`
Returns:
  the collection of algorithms

### setIncludedAlgorithms

public void setIncludedAlgorithms(@Nullable Collection<String> uris)
Set the list of included algorithm URIs.

Parameters:
  `uris` - the list of algorithms

### isIncludeMerge

public boolean isIncludeMerge()
Flag indicating whether to merge this configuration's includes with one of a lower order of precedence, or to treat this include collection as authoritative.

Defaults to: `false`.

Specified by:
  `isIncludeMerge` in interface `AlgorithmPolicyConfiguration`
Returns:
  true if should merge, false otherwise

### setIncludeMerge

public void setIncludeMerge(boolean flag)
Set the flag indicating whether to merge this configuration's includes with one of a lower order of precedence, or to treat these includes as authoritative.

Defaults to: `false`

Parameters:
  `flag` - true if should merge, false otherwise

### getExcludedAlgorithms

@Nonnull @NotLive @Unmodifiable public Collection<String> getExcludedAlgorithms()
Get the collection of excluded algorithm URIs.

Specified by:
  `getExcludedAlgorithms` in interface `AlgorithmPolicyConfiguration`
Returns:
  the collection of algorithms

### setExcludedAlgorithms

public void setExcludedAlgorithms(@Nullable Collection<String> uris)
Set the list of excluded algorithm URIs.

Parameters:
  `uris` - the list of algorithms

### isExcludeMerge

public boolean isExcludeMerge()
Flag indicating whether to merge this configuration's excludes with one of a lower order of precedence, or to treat this exclude collection as authoritative.

Defaults to: `true`.

Specified by:
  `isExcludeMerge` in interface `AlgorithmPolicyConfiguration`
Returns:
  true if should merge, false otherwise

### setExcludeMerge

public void setExcludeMerge(boolean flag)
Set the flag indicating whether to merge this configuration's excludes with one of a lower order of precedence, or to treat these excludes as authoritative.

Defaults to: `true`

Parameters:
  `flag` - true if should merge, false otherwise

### getIncludeExcludePrecedence

@Nonnull public AlgorithmPolicyConfiguration.Precedence getIncludeExcludePrecedence()
Get preference value indicating which should take precedence when both include and exclude collections are non-empty.

Specified by:
  `getIncludeExcludePrecedence` in interface `AlgorithmPolicyConfiguration`
Returns:
  the configured precedence value.

### setIncludeExcludePrecedence

public void setIncludeExcludePrecedence(@Nonnull AlgorithmPolicyConfiguration.Precedence value)
Set preference value indicating which should take precedence when both includes and excludes are non-empty.

Parameters:
  `value` - the precedence value