@ThreadSafe public abstract class ConsoleSafePbeParametersView<S extends KeyStrength,P extends SafePbeParameters<S,P>> extends SafePbeParametersView<P>
| Constructor and Description |
|---|
ConsoleSafePbeParametersView() |
| Modifier and Type | Method and Description |
|---|---|
void |
promptReadKey(PromptingKeyProvider.Controller<P> controller,
boolean invalid)
Prompts the user for the key for reading the contents of an
existing protected resource.
|
void |
promptWriteKey(PromptingKeyProvider.Controller<P> controller)
Prompts the user for the key for (over)writing the contents of a
new or existing protected resource.
|
newPbeParameterspublic void promptReadKey(PromptingKeyProvider.Controller<P> controller, boolean invalid) throws KeyPromptingDisabledException
PromptingKeyProvider.Viewkey property of the given
controller.
If the implementation has called PromptingKeyProvider.Controller.setKey(K) with a
non-null parameter, then a clone of this object will be
used as the key.
Otherwise, if the implementation has called PromptingKeyProvider.Controller.setKey(K)
with a null parameter or throws a
KeyPromptingCancelledException, then prompting for the key
is permanently disabled and each subsequent call to
SafeKeyProvider.getWriteKey() or SafeKeyProvider.getReadKey(boolean) results in a
KeyPromptingCancelledException until
PromptingKeyProvider.resetCancelledKey() or PromptingKeyProvider.resetUnconditionally() gets
called.
Otherwise, the state of the key provider is not changed and this method gets called again.
controller - The key controller for storing the result.invalid - true iff a previous call to this method
resulted in an invalid key.KeyPromptingDisabledExceptionpublic final void promptWriteKey(PromptingKeyProvider.Controller<P> controller) throws KeyPromptingDisabledException
PromptingKeyProvider.Viewkey property of the given
controller.
If the implementation has called PromptingKeyProvider.Controller.setKey(K) with a
non-null parameter, then a clone of this object will be
used as the key.
Otherwise, prompting for a key is permanently disabled and each
subsequent call to SafeKeyProvider.getWriteKey() or SafeKeyProvider.getReadKey(boolean)
results in a KeyPromptingCancelledException until
PromptingKeyProvider.resetCancelledKey() or PromptingKeyProvider.resetUnconditionally() gets
called.
controller - The key controller for storing the result.KeyPromptingDisabledExceptionCopyright © 2005-2013 Schlichtherle IT Services. All Rights Reserved.