Package net.sourceforge.jnlp
Class SecurityDesc
- java.lang.Object
-
- net.sourceforge.jnlp.SecurityDesc
-
public class SecurityDesc extends java.lang.ObjectThe security element.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSecurityDesc.RequestedPermissionLevelRepresents the security level requested by an applet/application, as specified in its JNLP or HTML.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.ObjectALL_PERMISSIONSAll permissions.static java.lang.ObjectJ2EE_PERMISSIONSJ2EE permissions.static java.lang.ObjectSANDBOX_PERMISSIONSApplet permissions.
-
Constructor Summary
Constructors Constructor Description SecurityDesc(JNLPFile file, java.lang.Object type, java.net.URL downloadHost)Create a security descriptor.SecurityDesc(JNLPFile file, SecurityDesc.RequestedPermissionLevel requestedPermissionLevel, java.lang.Object type, java.net.URL downloadHost)Create a security descriptor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.String[]getJnlpRIAPermissions()java.security.PermissionCollectiongetPermissions(java.security.CodeSource cs)SecurityDesc.RequestedPermissionLevelgetRequestedPermissionLevel()java.security.PermissionCollectiongetSandBoxPermissions()java.lang.ObjectgetSecurityType()
-
-
-
Constructor Detail
-
SecurityDesc
public SecurityDesc(JNLPFile file, SecurityDesc.RequestedPermissionLevel requestedPermissionLevel, java.lang.Object type, java.net.URL downloadHost)
Create a security descriptor.- Parameters:
file- the JNLP filerequestedPermissionLevel- the permission level specified in the JNLPtype- the type of securitydownloadHost- the download host (can always connect to)
-
SecurityDesc
public SecurityDesc(JNLPFile file, java.lang.Object type, java.net.URL downloadHost)
Create a security descriptor.- Parameters:
file- the JNLP filetype- the type of securitydownloadHost- the download host (can always connect to)
-
-
Method Detail
-
getSecurityType
public java.lang.Object getSecurityType()
- Returns:
- the permissions type, one of: ALL_PERMISSIONS, SANDBOX_PERMISSIONS, J2EE_PERMISSIONS.
-
getPermissions
public java.security.PermissionCollection getPermissions(java.security.CodeSource cs)
- Parameters:
cs- the CodeSource to get permissions for- Returns:
- a PermissionCollection containing the basic permissions granted depending on the security type.
-
getRequestedPermissionLevel
public SecurityDesc.RequestedPermissionLevel getRequestedPermissionLevel()
- Returns:
- the permission level requested in the JNLP
-
getSandBoxPermissions
public java.security.PermissionCollection getSandBoxPermissions()
- Returns:
- a PermissionCollection containing the sandbox permissions
-
getJnlpRIAPermissions
public static java.lang.String[] getJnlpRIAPermissions()
- Returns:
- all the names of the basic JNLP system properties accessible by RIAs
-
-