Package org.opensaml.xmlsec.keyinfo.impl

# Class KeyInfoResolutionContext

java.lang.Object
org.opensaml.xmlsec.keyinfo.impl.KeyInfoResolutionContext

public class KeyInfoResolutionContext extends Object
Resolution context class that is used to supply state information to, and to share information amongst, `KeyInfoProvider`s.

The extensible properties map available from `getProperties()` may for example used to communicate state between two or more providers, or between a provider and custom logic in a particular implementation of `KeyInfoCredentialResolver`. It is recommended that providers and/or resolvers define and use property names in such a way as to avoid collisions with those used by other providers and resolvers, and to also clearly define the data type stored for each propery name.

## Field Summary

Fields
Modifier and Type
Field
Description
`private Key`
`key`
Get the key currently known to be represented by the KeyInfo.
`private KeyInfo`
`keyInfo`
The KeyInfo being processed.
`private final Set<String>`
`keyNames`
Key names which are known to be associated with the KeyInfo being processed.
`private final Map<String,Object>`
`properties`
Extensible map of properties used to share state amongst providers and/or resolver logic.
`private final Collection<Credential>`
`resolvedCredentials`
This list provides KeyInfo resolvers and providers in a particular processing environment access to credentials that may have already been previously resolved.

## Constructor Summary

Constructors
Constructor
Description
`KeyInfoResolutionContext(Collection<Credential> credentials)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`Key`
`getKey()`
Get the key currently known to be represented by the KeyInfo.
`KeyInfo`
`getKeyInfo()`
Gets the KeyInfo being processed.
`Set<String>`
`getKeyNames()`
The key names which are currently known.
`Map<String,Object>`
`getProperties()`
Get the extensible properties map.
`Collection<Credential>`
`getResolvedCredentials()`
Get the set of credentials previously resolved.
`void`
`setKey(Key newKey)`
Set the key currently known to be represented by the KeyInfo.
`void`
`setKeyInfo(KeyInfo newKeyInfo)`
Sets the KeyInfo being processed.

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

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

## Field Details

### keyInfo

@Nullable private KeyInfo keyInfo
The KeyInfo being processed.

### keyNames

@Nonnull @Live private final Set<String> keyNames
Key names which are known to be associated with the KeyInfo being processed. These may have for example been extracted from KeyName elements present, or may have been inferred from the context in which the KeyInfo exists or is being used.

### key

@Nullable private Key key
Get the key currently known to be represented by the KeyInfo.

### resolvedCredentials

@Nonnull private final Collection<Credential> resolvedCredentials
This list provides KeyInfo resolvers and providers in a particular processing environment access to credentials that may have already been previously resolved.

### properties

@Nonnull @Live private final Map<String,Object> properties
Extensible map of properties used to share state amongst providers and/or resolver logic.

## Constructor Details

### KeyInfoResolutionContext

public KeyInfoResolutionContext(@Nonnull @ParameterName(name="credentials") Collection<Credential> credentials)
Constructor.

Parameters:
  `credentials` - a reference to the collection in which credentials previously resolved in a processing flow are being stored

## Method Details

### getKeyInfo

@Nullable public KeyInfo getKeyInfo()
Gets the KeyInfo being processed.

Returns:
  Returns the keyInfo.

### setKeyInfo

public void setKeyInfo(@Nullable KeyInfo newKeyInfo)
Sets the KeyInfo being processed.

Parameters:
  `newKeyInfo` - The keyInfo to set.

### getKeyNames

@Nonnull @Live public Set<String> getKeyNames()
The key names which are currently known. These key names should be those which are known to be associated with the key represented by the KeyInfo being processed. These may have for example been directly extracted from KeyName elements present, or may have been inferred from the context in which the KeyInfo exists or is being used.

Returns:
  the set of key names

### getKey

@Nullable public Key getKey()
Get the key currently known to be represented by the KeyInfo.

Returns:
  the key currently known to be represented by the KeyInfo or null if not currently known

### setKey

public void setKey(@Nullable Key newKey)
Set the key currently known to be represented by the KeyInfo.

Parameters:
  `newKey` - the new Key

### getResolvedCredentials

@Nonnull @Unmodifiable @NotLive public Collection<Credential> getResolvedCredentials()
Get the set of credentials previously resolved.

Returns:
  Returns the keyValueCredential.

### getProperties

@Nonnull @Live public Map<String,Object> getProperties()
Get the extensible properties map.

Returns:
  Returns the properties.