ca.bc.gov.webade.security
Class SecurityUtils

java.lang.Object
  extended byca.bc.gov.webade.security.SecurityUtils

public final class SecurityUtils
extends java.lang.Object

Author:
jross

Constructor Summary
SecurityUtils()
           
 
Method Summary
static boolean checkStackCallAccess(java.lang.StackTraceElement[] stack, java.lang.Class[] acceptedClasses)
          Checks the given stack trace to make sure the calling class is an instance of one of the permitted classes.
static boolean checkStackCallAccess(java.lang.StackTraceElement[] stack, java.lang.String[] acceptedClassNames)
          Checks the given stack trace to make sure the calling class is an instance of one of the permitted classes.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityUtils

public SecurityUtils()
Method Detail

checkStackCallAccess

public static final boolean checkStackCallAccess(java.lang.StackTraceElement[] stack,
                                                 java.lang.String[] acceptedClassNames)
Checks the given stack trace to make sure the calling class is an instance of one of the permitted classes.

Parameters:
stack - The stack trace to analyze.
acceptedClassNames - The array of acceptable calling classes.
Returns:
True if the calling class is one of the accepted set.

checkStackCallAccess

public static final boolean checkStackCallAccess(java.lang.StackTraceElement[] stack,
                                                 java.lang.Class[] acceptedClasses)
Checks the given stack trace to make sure the calling class is an instance of one of the permitted classes.

Parameters:
stack - The stack trace to analyze.
acceptedClasses - The array of acceptable calling classes.
Returns:
True if the calling class is one of the accepted set.