Class FirewallingSecurityManager
- java.lang.Object
-
- java.lang.SecurityManager
-
- org.pentaho.reporting.designer.core.util.firewall.FirewallingSecurityManager
-
public class FirewallingSecurityManager extends SecurityManager
Todo: Document me! Date: 12.11.2009 Time: 17:33:12- Author:
- Thomas Morgner.
-
-
Constructor Summary
Constructors Constructor Description FirewallingSecurityManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkPermission(Permission perm)
Throws aSecurityException
if the requested access, specified by the given permission, is not permitted based on the security policy currently in effect.void
checkPermission(Permission perm, Object context)
Throws aSecurityException
if the specified security context is denied access to the resource specified by the given permission.-
Methods inherited from class java.lang.SecurityManager
checkAccept, checkAccess, checkAccess, checkConnect, checkConnect, checkCreateClassLoader, checkDelete, checkExec, checkExit, checkLink, checkListen, checkMulticast, checkMulticast, checkPackageAccess, checkPackageDefinition, checkPrintJobAccess, checkPropertiesAccess, checkPropertyAccess, checkRead, checkRead, checkRead, checkSecurityAccess, checkSetFactory, checkWrite, checkWrite, getClassContext, getSecurityContext, getThreadGroup
-
-
-
-
Method Detail
-
checkPermission
public void checkPermission(Permission perm)
Throws aSecurityException
if the requested access, specified by the given permission, is not permitted based on the security policy currently in effect. This method callsAccessController.checkPermission
with the given permission.- Overrides:
checkPermission
in classSecurityManager
- Parameters:
perm
- the requested permission.- Throws:
SecurityException
- if access is not permitted based on the current security policy.NullPointerException
- if the permission argument isnull
.- Since:
- 1.2
-
checkPermission
public void checkPermission(Permission perm, Object context)
Throws aSecurityException
if the specified security context is denied access to the resource specified by the given permission. The context must be a security context returned by a previous call togetSecurityContext
and the access control decision is based upon the configured security policy for that security context. Ifcontext
is an instance ofAccessControlContext
then theAccessControlContext.checkPermission
method is invoked with the specified permission. Ifcontext
is not an instance ofAccessControlContext
then aSecurityException
is thrown.- Overrides:
checkPermission
in classSecurityManager
- Parameters:
perm
- the specified permissioncontext
- a system-dependent security context.- Throws:
SecurityException
- if the specified security context is not an instance ofAccessControlContext
(e.g., isnull
), or is denied access to the resource specified by the given permission.NullPointerException
- if the permission argument isnull
.- Since:
- 1.2
- See Also:
SecurityManager.getSecurityContext()
,AccessControlContext.checkPermission(java.security.Permission)
-
-