@ThreadSafe @DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class) public static class PromptingKeyProvider.Controller<K extends SafeKey<K>> extends Object
PromptingKeyProvider.View implementations.| Modifier and Type | Field and Description |
|---|---|
private PromptingKeyProvider<K> |
provider |
private PromptingKeyProvider.State |
state |
| Modifier | Constructor and Description |
|---|---|
private |
PromptingKeyProvider.Controller(PromptingKeyProvider<K> provider,
PromptingKeyProvider.State state) |
| Modifier and Type | Method and Description |
|---|---|
K |
getKey()
Returns the protected resource's key.
|
URI |
getResource()
Returns the unique resource identifier (resource ID) of the
protected resource for which this controller is used.
|
private void |
invalidate() |
void |
setChangeRequested(boolean changeRequested)
Requests to prompt the user for a new key upon the next call to
SafeKeyProvider.getWriteKey(), provided that the key is
set by then. |
void |
setKey(K key)
Sets the protected resource's key to a clone of the given key.
|
private final PromptingKeyProvider<K extends SafeKey<K>> provider
@CheckForNull private PromptingKeyProvider.State state
private PromptingKeyProvider.Controller(PromptingKeyProvider<K> provider, PromptingKeyProvider.State state)
public URI getResource()
IllegalStateException - if getting this property is not legal
in the current state.@CheckForNull public K getKey()
IllegalStateException - if getting key is not legal in the
current state.public void setKey(@CheckForNull
K key)
key - The key to clone to use for the protected resource.IllegalStateException - if setting key is not legal in the
current state.public void setChangeRequested(boolean changeRequested)
SafeKeyProvider.getWriteKey(), provided that the key is
set by then.changeRequested - whether or not the user shall get prompted
for a new key upon the next call to SafeKeyProvider.getWriteKey(),
provided that the key is set then.IllegalStateException - if setting this property is not legal
in the current state.private void invalidate()
Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.