# Interface IArtifactUIServices

public interface IArtifactUIServices
An interface optionally implemented by `UIServices` to provide richer information for the users. In particular, the users often wish to know which artifacts are signed by which certificates or which keys when they are `prompted` whether to trust such certificates or keys.

Since:
  2.6
See Also:
  - `UIServices.getTrustInfo(Certificate[][], Collection, String[])`

## Method Summary

Modifier and Type
Method
Description
`UIServices.TrustInfo`
`getTrustInfo(Map<List<Certificate>, Set<IArtifactKey>> untrustedCertificateChains, Map<org.bouncycastle.openpgp.PGPPublicKey, Set<IArtifactKey>> untrustedPGPKeys, Set<IArtifactKey> unsignedArtifacts, Map<IArtifactKey, File> artifactFiles)`
Opens a UI prompt to capture information about trusted content.
`static UIServices.TrustInfo`
`getTrustInfo(UIServices uiServices, Map<List<Certificate>, Set<IArtifactKey>> untrustedCertificateChains, Map<org.bouncycastle.openpgp.PGPPublicKey, Set<IArtifactKey>> untrustedPGPKeys, Set<IArtifactKey> unsignedArtifacts, Map<IArtifactKey, File> artifactFiles)`
Opens a UI prompt to capture information about trusted content.

## Method Details

### getTrustInfo

UIServices.TrustInfo getTrustInfo(Map<List<Certificate>, Set<IArtifactKey>> untrustedCertificateChains, Map<org.bouncycastle.openpgp.PGPPublicKey, Set<IArtifactKey>> untrustedPGPKeys, Set<IArtifactKey> unsignedArtifacts, Map<IArtifactKey, File> artifactFiles)
Opens a UI prompt to capture information about trusted content.

Parameters:
  `untrustedCertificateChains` - a map from untrusted certificate chains to the set of keys of the artifacts signed by that chain.
  `untrustedPGPKeys` - a map of untrusted PGP public keys to the set of keys of the artifacts signed by that key.
  `unsignedArtifacts` - a set of keys of the artifacts that are not signed.
  `artifactFiles` - a map from artifact keys to the file associated with that artifact key.
Returns:
  the TrustInfo that describes the user's choices for trusting certificates, keys, and unsigned content.
See Also:
  - `getTrustInfo(UIServices, Map, Map, Set, Map)`
  - `UIServices`

### getTrustInfo

static UIServices.TrustInfo getTrustInfo(UIServices uiServices, Map<List<Certificate>, Set<IArtifactKey>> untrustedCertificateChains, Map<org.bouncycastle.openpgp.PGPPublicKey, Set<IArtifactKey>> untrustedPGPKeys, Set<IArtifactKey> unsignedArtifacts, Map<IArtifactKey, File> artifactFiles)
Opens a UI prompt to capture information about trusted content. This implementation is useful for delegating to an old-style `UIServices implementation` that does not support the IArtifactUIServices interface.

Parameters:
  `uiServices` - the delegate UI services.
  `untrustedCertificateChains` - a map from untrusted certificate chains to the set of keys of the artifacts signed by that chain.
  `untrustedPGPKeys` - a map of untrusted PGP public keys to the set of keys of the artifacts signed by that key.
  `unsignedArtifacts` - a set of keys of the artifacts that are not signed.
  `artifactFiles` - a map from artifact keys to the file associated with that artifact key.
Returns:
  the TrustInfo that describes the user's choices for trusting certificates, keys, and unsigned content.
See Also:
  - `getTrustInfo(Map, Map, Set, Map)`
  - `UIServices.getTrustInfo(Certificate[][], Collection, String[])`