public class SecurityDialogs
extends java.lang.Object
This contains all the public methods that classes outside this package should
use instead of using SecurityDialog
directly.
All of these methods post a message to the
SecurityDialogMessageHandler
and block waiting for a response.
Modifier and Type | Class and Description |
---|---|
static class |
SecurityDialogs.AccessType
The types of access which may need user permission.
|
static class |
SecurityDialogs.DialogType
Types of dialogs we can create
|
Constructor and Description |
---|
SecurityDialogs() |
Modifier and Type | Method and Description |
---|---|
static boolean |
showAccessWarningDialog(SecurityDialogs.AccessType accessType,
JNLPFile file)
Shows a warning dialog for different types of system access (i.e.
|
static boolean |
showAccessWarningDialog(SecurityDialogs.AccessType accessType,
JNLPFile file,
java.lang.Object[] extras)
Shows a warning dialog for different types of system access (i.e.
|
static int |
showAppletWarning()
FIXME This is unused.
|
static java.lang.Object[] |
showAuthenicationPrompt(java.lang.String host,
int port,
java.lang.String prompt,
java.lang.String type)
Present a dialog to the user asking them for authentication information,
and returns the user's response.
|
static boolean |
showCertWarningDialog(SecurityDialogs.AccessType accessType,
JNLPFile file,
CertVerifier certVerifier)
Shows a security warning dialog according to the specified type of
access.
|
static boolean |
showNotAllSignedWarningDialog(JNLPFile file)
Shows a warning dialog for when the main application jars are signed,
but extensions aren't
|
static UnsignedAppletTrustWarningPanel.UnsignedWarningAction |
showUnsignedWarningDialog(JNLPFile file)
Shows a warning dialog for when a plugin applet is unsigned.
|
public static boolean showAccessWarningDialog(SecurityDialogs.AccessType accessType, JNLPFile file)
accessType
- the type of system access requested.file
- the jnlp file associated with the requesting application.public static boolean showAccessWarningDialog(SecurityDialogs.AccessType accessType, JNLPFile file, java.lang.Object[] extras)
accessType
- the type of system access requested.file
- the jnlp file associated with the requesting application.extras
- an optional array of Strings (typically) that gets
passed to the dialog labels.public static boolean showNotAllSignedWarningDialog(JNLPFile file)
public static UnsignedAppletTrustWarningPanel.UnsignedWarningAction showUnsignedWarningDialog(JNLPFile file)
public static boolean showCertWarningDialog(SecurityDialogs.AccessType accessType, JNLPFile file, CertVerifier certVerifier)
type
is one of AccessType.VERIFIED or
AccessType.UNVERIFIED, extra details will be available with regards
to code signing and signing certificates.accessType
- the type of warning dialog to showfile
- the JNLPFile associated with this warningcertVerifier
- the JarCertVerifier used to verify this applicationpublic static java.lang.Object[] showAuthenicationPrompt(java.lang.String host, int port, java.lang.String prompt, java.lang.String type)
host
- The host for with authentication is neededport
- The port being accessedprompt
- The prompt (realm) as presented by the servertype
- The type of server (proxy/web)java.lang.SecurityException
- if the caller does not have the appropriate permissions.public static int showAppletWarning()