1 16 17 package de.schlichtherle.key.passwd.console; 18 19 import de.schlichtherle.key.*; 20 21 import java.awt.*; 22 import java.io.Console ; 23 24 47 public class PromptingKeyManager extends de.schlichtherle.key.PromptingKeyManager { 48 49 68 public PromptingKeyManager() { 69 mapPromptingKeyProviderUIType( 70 "PromptingKeyProvider", 71 PromptingKeyProviderUI.class); 72 mapPromptingKeyProviderUIType( 73 "PromptingAesKeyProvider", 74 PromptingAesKeyProviderUI.class); 75 } 76 77 81 protected boolean isPromptingImpl() { 82 return super.isPromptingImpl() && System.console() != null; 83 } 84 85 89 protected void ensurePromptingImpl() 90 throws KeyPromptingDisabledException { 91 if (System.console() == null) 92 throw new KeyPromptingDisabledException(); 93 super.ensurePromptingImpl(); 94 } 95 } 96 | Popular Tags |