| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jaffa.security.SecurityManager
Security Manager is the main interface to the BusinessFunction and Component Security Architecture. It provide a mechanism for setting the security context for a thread of execution, and then provide a guard for securing code in that thread. The access to the guarded code is derived from a role based security policy file.
| Constructor Summary | |
| SecurityManager() | |
| Method Summary | |
| static boolean | checkComponentAccess(String componentName)See if the current thread has access to the named component. | 
| static boolean | checkFunctionAccess(String functionName)See if the current thread has access to the named business function. | 
| static Principal | getPrincipal()Get the Security Prinipal Object for the Current User. | 
| static Object | runFunction(String functionName,
                       PrivilegedAction action)Run the guarded business function, only if the current thread has access | 
| static Object | runFunction(String functionName,
                       PrivilegedExceptionAction action)Run the guarded business function, only if the current thread has access. | 
| static Object | runWithContext(EJBContext ctx,
                             Object obj,
                             Method method,
                             Object[] args)Bind a security context to a thread and contine executing the thread by running the supplied method against the specified object with the supplied paramters. | 
| static Object | runWithContext(EJBContext ctx,
                             Object obj,
                             String method,
                             Object[] args)Bind a security context to a thread and contine executing the thread by running the supplied method against the specified object with the supplied paramters. | 
| static Object | runWithContext(EJBContext ctx,
                             Object obj,
                             String method,
                             Object[] args,
                             Class[] sig)Bind a security context to a thread and contine executing the thread by running the supplied method against the specified object with the supplied paramters. | 
| static Object | runWithContext(HttpServletRequest ctx,
                             Object obj,
                             Method method,
                             Object[] args)Bind a security context to a thread and contine executing the thread by running the supplied method against the specified object with the supplied paramters. | 
| static Object | runWithContext(HttpServletRequest ctx,
                             Object obj,
                             String method,
                             Object[] args)Bind a security context to a thread and contine executing the thread by running the supplied method against the specified object with the supplied paramters. | 
| static Object | runWithContext(HttpServletRequest ctx,
                             Object obj,
                             String method,
                             Object[] args,
                             Class[] sig)Bind a security context to a thread and contine executing the thread by running the supplied method against the specified object with the supplied paramters. | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public SecurityManager()
| Method Detail | 
public static Object runWithContext(HttpServletRequest ctx,
                                    Object obj,
                                    String method,
                                    Object[] args)
                             throws Exception
ctx - Web Server Request Context to useobj - The object contains the method to execute under the thread security contextmethod - The name of the method to execute in the specified objectargs - An Object array of argument to pass to the method. If there are no parameters for the method null can be passed
Exception - Returns any Exception that the method being invoked may return
public static Object runWithContext(HttpServletRequest ctx,
                                    Object obj,
                                    String method,
                                    Object[] args,
                                    Class[] sig)
                             throws Exception
sig - This is an array of classes that represent the signature to the supplied method. This will be used for introspection for
 the supplied method on the given objectctx - Web Server Request Context to useobj - The object contains the method to execute under the thread security contextmethod - The name of the method to execute in the specified objectargs - An Object array of argument to pass to the method. If there are no parameters for the method null can be passed
Exception - Returns any Exception that the method being invoked may return
public static Object runWithContext(HttpServletRequest ctx,
                                    Object obj,
                                    Method method,
                                    Object[] args)
                             throws Exception
ctx - Web Server Request Context to useobj - The object contains the method to execute under the thread security contextmethod - The name of the method to execute in the specified objectargs - An Object array of argument to pass to the method. If there are no parameters for the method null can be passed
Exception - Returns any Exception that the method being invoked may return
public static Object runWithContext(EJBContext ctx,
                                    Object obj,
                                    String method,
                                    Object[] args)
                             throws Exception
ctx - Web Server Request Context to useobj - The object contains the method to execute under the thread security contextmethod - The name of the method to execute in the specified objectargs - An Object array of argument to pass to the method. If there are no parameters for the method null can be passed
Exception - Returns any Exception that the method being invoked may return
public static Object runWithContext(EJBContext ctx,
                                    Object obj,
                                    String method,
                                    Object[] args,
                                    Class[] sig)
                             throws Exception
sig - This is an array of classes that represent the signature to the supplied method. This will be used for introspection for
 the supplied method on the given objectctx - Web Server Request Context to useobj - The object contains the method to execute under the thread security contextmethod - The name of the method to execute in the specified objectargs - An Object array of argument to pass to the method. If there are no parameters for the method null can be passed
Exception - Returns any Exception that the method being invoked may return
public static Object runWithContext(EJBContext ctx,
                                    Object obj,
                                    Method method,
                                    Object[] args)
                             throws Exception
ctx - Web Server Request Context to useobj - The object contains the method to execute under the thread security contextmethod - The name of the method to execute in the specified objectargs - An Object array of argument to pass to the method. If there are no parameters for the method null can be passed
Exception - Returns any Exception that the method being invoked may return
public static Object runFunction(String functionName,
                                 PrivilegedAction action)
                          throws AccessControlException
functionName - Name of the business function being guardedaction - An action object which will be executed, this should contain the guarded code
AccessControlException - This is thrown if the user doesn't have authorization for this function
public static Object runFunction(String functionName,
                                 PrivilegedExceptionAction action)
                          throws PrivilegedActionException,
                                 AccessControlException
functionName - Name of the business function being guardedaction - An action object which will be executed, this should contain the guarded code
PrivilegedActionException - This is the wrapped exception the the guarded code threw
AccessControlException - This is thrown if the user doesn't have authorization for this functionpublic static boolean checkComponentAccess(String componentName)
componentName - Name of component to check
public static boolean checkFunctionAccess(String functionName)
functionName - Name of business function to check
public static Principal getPrincipal()
 In a typical web environment SecurityManager.getPrincipal().getName()
 will return you the username used to log on.
 
| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||