public class SecurityDialogs
extends java.lang.Object
A factory for showing many possible types of security warning to the user.
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.AppletAction |
static class |
SecurityDialogs.DialogType
Types of dialogs we can create
|
Constructor and Description |
---|
SecurityDialogs() |
Modifier and Type | Method and Description |
---|---|
static SecurityDialogs.AppletAction |
getIntegerResponseAsAppletAction(java.lang.Object ref) |
static boolean |
getIntegerResponseAsBoolean(java.lang.Object ref)
Returns true iff the given Object reference can be cast to Integer and that Integer's
intValue is 0.
|
static java.lang.Object |
showAccessWarningDialog(SecurityDialogs.AccessType accessType,
JNLPFile file,
java.lang.Object[] extras)
unlike showAccessWarningDialogB this is returning raw int code
|
static boolean |
showAccessWarningDialogB(SecurityDialogs.AccessType accessType,
JNLPFile file)
Shows a warning dialog for different types of system access (i.e.
|
static boolean |
showAccessWarningDialogB(SecurityDialogs.AccessType accessType,
JNLPFile file,
java.lang.Object[] extras) |
static net.sourceforge.jnlp.security.dialogs.AccessWarningPaneComplexReturn |
showAccessWarningDialogComplexReturn(SecurityDialogs.AccessType accessType,
JNLPFile file) |
static int |
showAccessWarningDialogI(SecurityDialogs.AccessType accessType,
JNLPFile file)
unlike showAccessWarningDialogB this is returning raw int code
|
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 SecurityDialogs.AppletAction |
showCertWarningDialog(SecurityDialogs.AccessType accessType,
JNLPFile file,
CertVerifier certVerifier,
JNLPClassLoader.SecurityDelegate securityDelegate)
Shows a security warning dialog according to the specified type of
access.
|
static boolean |
showMatchingALACAttributePanel(JNLPFile file,
java.net.URL codeBase,
java.util.Set<java.net.URL> remoteUrls) |
static boolean |
showMissingALACAttributePanel(java.lang.String title,
java.net.URL codeBase,
java.util.Set<java.net.URL> remoteUrls) |
static boolean |
showMissingPermissionsAttributeDialogue(java.lang.String title,
java.lang.String codeBase) |
static net.sourceforge.jnlp.security.dialogs.apptrustwarningpanel.AppTrustWarningPanel.AppSigningWarningAction |
showPartiallySignedWarningDialog(JNLPFile file,
CertVerifier certVerifier,
JNLPClassLoader.SecurityDelegate securityDelegate)
Shows a warning dialog for when an applet or application is partially signed.
|
static net.sourceforge.jnlp.security.dialogs.apptrustwarningpanel.AppTrustWarningPanel.AppSigningWarningAction |
showUnsignedWarningDialog(JNLPFile file)
Shows a warning dialog for when a plugin applet is unsigned.
|
public static boolean showAccessWarningDialogB(SecurityDialogs.AccessType accessType, JNLPFile file)
accessType
- the type of system access requested.file
- the jnlp file associated with the requesting application.public static boolean showAccessWarningDialogB(SecurityDialogs.AccessType accessType, JNLPFile file, java.lang.Object[] extras)
public static int showAccessWarningDialogI(SecurityDialogs.AccessType accessType, JNLPFile file)
accessType
- type of dialoguefile
- file for which thsi dialogue is built forpublic static net.sourceforge.jnlp.security.dialogs.AccessWarningPaneComplexReturn showAccessWarningDialogComplexReturn(SecurityDialogs.AccessType accessType, JNLPFile file)
public static java.lang.Object showAccessWarningDialog(SecurityDialogs.AccessType accessType, JNLPFile file, java.lang.Object[] extras)
accessType
- type of dialoguefile
- file for which thsi dialogue is built forextras
- aditional parameters to dialoguepublic static net.sourceforge.jnlp.security.dialogs.apptrustwarningpanel.AppTrustWarningPanel.AppSigningWarningAction showUnsignedWarningDialog(JNLPFile file)
file
- the file to be base as information source for this dialoguepublic static SecurityDialogs.AppletAction showCertWarningDialog(SecurityDialogs.AccessType accessType, JNLPFile file, CertVerifier certVerifier, JNLPClassLoader.SecurityDelegate securityDelegate)
accessType
is one of SecurityDialogs.AccessType.VERIFIED
or
SecurityDialogs.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 applicationsecurityDelegate
- the delegate for security atts.public static net.sourceforge.jnlp.security.dialogs.apptrustwarningpanel.AppTrustWarningPanel.AppSigningWarningAction showPartiallySignedWarningDialog(JNLPFile file, CertVerifier certVerifier, JNLPClassLoader.SecurityDelegate securityDelegate)
file
- the JNLPFile associated with this warningcertVerifier
- the JarCertVerifier used to verify this applicationsecurityDelegate
- the delegate for security atts.public 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 boolean showMissingALACAttributePanel(java.lang.String title, java.net.URL codeBase, java.util.Set<java.net.URL> remoteUrls)
public static boolean showMatchingALACAttributePanel(JNLPFile file, java.net.URL codeBase, java.util.Set<java.net.URL> remoteUrls)
public static int showAppletWarning()
public static boolean showMissingPermissionsAttributeDialogue(java.lang.String title, java.lang.String codeBase)
public static boolean getIntegerResponseAsBoolean(java.lang.Object ref)
ref
- the Integer (hopefully) referencepublic static SecurityDialogs.AppletAction getIntegerResponseAsAppletAction(java.lang.Object ref)