FileDocCategorySizeDatePackage
SecurityActions.javaAPI DocJBoss 4.2.116884Fri Jul 13 21:02:28 BST 2007org.jboss.aspects.security

SecurityActions

public class SecurityActions extends Object
A collection of privileged actions for this package
author
Scott.Stark@jboss.org
author
Alexey Loubyansky
version
$Revison: $

Fields Summary
private static final Logger
log
Constructors Summary
Methods Summary
static java.security.PrincipalgetCallerPrincipal()

      if (System.getSecurityManager() == null)
      {
         return PrincipalInfoAction.NON_PRIVILEGED.getCallerPrincipal();
      }
      else
      {
         return PrincipalInfoAction.PRIVILEGED.getCallerPrincipal();
      }
   
static java.lang.ClassLoadergetContextClassLoader()


       
          
   
   
     
   
      return TCLAction.UTIL.getContextClassLoader();
   
static java.lang.ExceptiongetContextException()

      if(System.getSecurityManager() == null)
      {
         return ContextInfoActions.NON_PRIVILEGED.getContextException();
      }
      else
      {
         return ContextInfoActions.PRIVILEGED.getContextException();
      }
   
static javax.security.auth.SubjectgetContextSubject()

      if(System.getSecurityManager() == null)
      {
         return PolicyContextActions.NON_PRIVILEGED.getContextSubject();
      }
      else
      {
         return PolicyContextActions.PRIVILEGED.getContextSubject();
      }      
   
static java.lang.ObjectgetCredential()

      if (System.getSecurityManager() == null)
      {
         return PrincipalInfoAction.NON_PRIVILEGED.getCredential();
      }
      else
      {
         return PrincipalInfoAction.PRIVILEGED.getCredential();
      }
   
static java.security.PrincipalgetPrincipal()

      if (System.getSecurityManager() == null)
      {
         return PrincipalInfoAction.NON_PRIVILEGED.getPrincipal();
      }
      else
      {
         return PrincipalInfoAction.PRIVILEGED.getPrincipal();
      }
   
static org.jboss.security.RunAsIdentitypeekRunAsIdentity()

      if(System.getSecurityManager() == null)
      {
         return RunAsIdentityActions.NON_PRIVILEGED.peek();
      }
      else
      {
         return RunAsIdentityActions.PRIVILEGED.peek();
      }
   
static org.jboss.security.RunAsIdentitypopRunAsIdentity()

      if(System.getSecurityManager() == null)
      {
         return RunAsIdentityActions.NON_PRIVILEGED.pop();
      }
      else
      {
         return RunAsIdentityActions.PRIVILEGED.pop();
      }
   
static voidpopSubjectContext()

      if(System.getSecurityManager() == null)
      {
         PrincipalInfoAction.NON_PRIVILEGED.pop();
      }
      else
      {
         PrincipalInfoAction.PRIVILEGED.pop();
      }
   
static voidpushRunAsIdentity(org.jboss.security.RunAsIdentity principal)

     
      if(System.getSecurityManager() == null)
      {
         RunAsIdentityActions.NON_PRIVILEGED.push(principal);
      }
      else
      {
         RunAsIdentityActions.PRIVILEGED.push(principal);
      }
   
static voidpushSubjectContext(java.security.Principal principal, java.lang.Object credential, javax.security.auth.Subject subject)

      if(System.getSecurityManager() == null)
      {
         PrincipalInfoAction.NON_PRIVILEGED.push(principal, credential, subject);
      }
      else
      {
         PrincipalInfoAction.PRIVILEGED.push(principal, credential, subject);
      }
   
static voidsetContextClassLoader(java.lang.ClassLoader loader)

      TCLAction.UTIL.setContextClassLoader(loader);
   
static voidsetCredential(java.lang.Object credential)

      if (System.getSecurityManager() == null)
      {
         PrincipalInfoAction.NON_PRIVILEGED.setCredential(credential);
      }
      else
      {
         PrincipalInfoAction.PRIVILEGED.setCredential(credential);
      }
   
static voidsetPrincipal(java.security.Principal principal)

      if (System.getSecurityManager() == null)
      {
         PrincipalInfoAction.NON_PRIVILEGED.setPrincipal(principal);
      }
      else
      {
         PrincipalInfoAction.PRIVILEGED.setPrincipal(principal);
      }