The checkCallersPermission method of the PolicyEngine Class contains the following signatures:
checkCallersPermission(PermissionID pid,Class[] skipset)
checkCallersPermission(String pname,Class[] skipset)
checkCallersPermission(PermissionID pid,Object sreq, Class[] skipset)
checkCallersPermission(String pname,Object sreq, Class[] skipset)
checkCallersPermission(ISecurityRequest sreq, Class[] skipset)
Performs a simple (non-parameterized) security check for a specific type of permission. This check is shallow. Only the first stack frame found outside the specified skip set will be checked.
public static void checkCallersPermission(PermissionID pid,Class[] skipset);
Note Permission assertions and denials are recognized within the skip set frames, and could cause the stack crawl to terminate early.
pid | The type of permission to check for. |
skipset | The set of classes to ignore on the call stack. |
SecurityException if the security check fails.
Performs a simple (non-parameterized) security check for a specific type of permission. This check is shallow. Only the first stack frame found outside the specified skip set will be checked. A permission name is used to specify the permission type (instead of a PermissionID).
public static void checkCallersPermission(String pname,Class[] skipset);
Note Permission assertions and denials are recognized within the skip set frames, and could cause the stack crawl to terminate early.
pname | The name of the permission to check for. |
skipset | The set of classes to ignore on the call stack. |
SecurityException if the security check fails.
Performs a parameterized security check for a specific type of permission. The check is shallow. Only the first stack frame found outside the specified skip set will be checked.
public static void checkCallersPermission(PermissionID pid,Object sreq, Class[] skipset);
Note Permission assertions and denials are recognized within the skip set frames, and might cause the stack crawl to terminate early.
pid | The type of permission to check for. |
sreq | The security request object that indicates the specific resource to check for within the realm of the permission type. The type of the object depends on the type of the permission being checked. |
skipset | The set of classes to ignore on the call stack. |
SecurityException if the security check fails.
Performs a parameterized security check for a specific type of permission. The check is shallow. Only the first stack frame found outside the specified skip set will be checked. A permission name is used to specify the permission type (instead of a PermissionID).
public static void checkCallersPermission(String pname,Object sreq, Class[] skipset);
Note Permission assertions and denials are recognized within the skip set frames, and might cause the stack crawl to terminate early.
pname | The name of the permission to check for. |
sreq | The security request object. |
skipset | The set of classes to ignore on the call stack. |
SecurityException if the security check fails.
Performs a parameterized security check for a specific type of permission. The check is shallow. Only the first stack frame found outside the specified skip set will be checked.
This method is a variation on the checkCallersPermission(PermissionID,Object,Class[]) method, where the sreq parameter indicates the permission type, and it also represents the security request object.
public static void checkCallersPermission(ISecurityRequest sreq, Class[] skipset);
sreq | The object that indicates the type of permission to check for and represents the security request object. |
skipset | The set of classes to ignore on the call stack. |
SecurityException if the security check fails.