K - The type of the keys.@ThreadSafe public final class PromptingKeyManager<K extends SafeKey<K>> extends SafeKeyManager<K,PromptingKeyProvider<K>>
PromptingKeyProvider| Constructor and Description |
|---|
PromptingKeyManager(PromptingKeyProvider.View<K> view)
Constructs a new prompting key manager.
|
| Modifier and Type | Method and Description |
|---|---|
PromptingKeyProvider<K> |
getKeyProvider(URI resource)
Returns the mapped key provider for the given protected resource.
|
PromptingKeyProvider<K> |
getMappedKeyProvider(URI resource)
Returns the key provider which is mapped for the given
resource
or null if no key provider is mapped. |
PromptingKeyProvider<K> |
moveKeyProvider(URI oldResource,
URI newResource)
Moves the mapped key provider from the URI
oldResource to
newResource. |
protected PromptingKeyProvider<K> |
newKeyProvider()
Returns a new prompting key provider.
|
PromptingKeyProvider<K> |
removeKeyProvider(URI resource)
Removes the mapped key provider for the given protected resource.
|
String |
toString()
Returns a string representation of this object for debugging and logging
purposes.
|
getPrioritypublic PromptingKeyManager(PromptingKeyProvider.View<K> view)
view - the view instance for prompting for keys.public PromptingKeyProvider<K> getKeyProvider(URI resource)
KeyManagergetKeyProvider in interface KeyManager<K extends SafeKey<K>>getKeyProvider in class SafeKeyManager<K extends SafeKey<K>,PromptingKeyProvider<K extends SafeKey<K>>>resource - the URI of the protected resource.@Nullable public PromptingKeyProvider<K> getMappedKeyProvider(URI resource)
SafeKeyManagerresource
or null if no key provider is mapped.
TODO: Make this part of the interface KeyManager in the next
major version.
getMappedKeyProvider in class SafeKeyManager<K extends SafeKey<K>,PromptingKeyProvider<K extends SafeKey<K>>>resource - the nullable URI of the protected resource.public PromptingKeyProvider<K> moveKeyProvider(URI oldResource, URI newResource)
KeyManageroldResource to
newResource.moveKeyProvider in interface KeyManager<K extends SafeKey<K>>moveKeyProvider in class SafeKeyManager<K extends SafeKey<K>,PromptingKeyProvider<K extends SafeKey<K>>>oldResource - the old URI of the protected resource.newResource - the new URI of the protected resource.newResource.protected PromptingKeyProvider<K> newKeyProvider()
newKeyProvider in class SafeKeyManager<K extends SafeKey<K>,PromptingKeyProvider<K extends SafeKey<K>>>public PromptingKeyProvider<K> removeKeyProvider(URI resource)
SafeKeyManagerThe returned key provider is invalidated and will behave as if prompting for the secret key had been disabled or cancelled by the user.
removeKeyProvider in interface KeyManager<K extends SafeKey<K>>removeKeyProvider in class SafeKeyManager<K extends SafeKey<K>,PromptingKeyProvider<K extends SafeKey<K>>>resource - the URI of the protected resource.public String toString()
toString in class SafeKeyManager<K extends SafeKey<K>,PromptingKeyProvider<K extends SafeKey<K>>>Copyright © 2005-2013 Schlichtherle IT Services. All Rights Reserved.