Class SecurityDesc

java.lang.Object
net.sourceforge.jnlp.SecurityDesc

public class SecurityDesc extends Object
The security element.
  • Field Details

    • ALL_PERMISSIONS

      public static final Object ALL_PERMISSIONS
      All permissions.
    • SANDBOX_PERMISSIONS

      public static final Object SANDBOX_PERMISSIONS
      Applet permissions.
    • J2EE_PERMISSIONS

      public static final Object J2EE_PERMISSIONS
      J2EE permissions.
  • Constructor Details

    • SecurityDesc

      public SecurityDesc(JNLPFile file, SecurityDesc.RequestedPermissionLevel requestedPermissionLevel, Object type, URL downloadHost)
      Create a security descriptor.
      Parameters:
      file - the JNLP file
      requestedPermissionLevel - the permission level specified in the JNLP
      type - the type of security
      downloadHost - the download host (can always connect to)
    • SecurityDesc

      public SecurityDesc(JNLPFile file, Object type, URL downloadHost)
      Create a security descriptor.
      Parameters:
      file - the JNLP file
      type - the type of security
      downloadHost - the download host (can always connect to)
  • Method Details

    • getSecurityType

      public Object getSecurityType()
      Returns:
      the permissions type, one of: ALL_PERMISSIONS, SANDBOX_PERMISSIONS, J2EE_PERMISSIONS.
    • getPermissions

      public PermissionCollection getPermissions(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 PermissionCollection getSandBoxPermissions()
      Returns:
      a PermissionCollection containing the sandbox permissions
    • getJnlpRIAPermissions

      public static String[] getJnlpRIAPermissions()
      Returns:
      all the names of the basic JNLP system properties accessible by RIAs