Package org.jboss.security.audit

Examples of org.jboss.security.audit.AuditContext


      this.securityDomain = secDomain;
   }
  
   public AuditContext getAuditContext() throws PrivilegedActionException
   {
      AuditContext ac = (AuditContext)contexts.get(securityDomain);
      if(ac == null)
      {
         ac = new JBossAuditContext(securityDomain);
         ApplicationPolicy ap = SecurityConfiguration.getApplicationPolicy(securityDomain);
         if(ap != null)
         {
            AuditInfo ai = ap.getAuditInfo();
            if(ai != null)
            { 
               AuditProviderEntry[] apeArr = ai.getAuditProviderEntry();
               List<AuditProviderEntry> list = Arrays.asList(apeArr);
               for(AuditProviderEntry ape:list)
               {
                  String pname = ape.getName();
                  try
                  {
                     ac.addProvider((AuditProvider) SecurityActions.loadClass(pname).newInstance());
                  }
                  catch (Exception e)
                  {
                     throw new RuntimeException(e);
                  }
View Full Code Here


      return ac;
   }
  
   public static AuditContext getAuditContext(String securityDomain)
   {
      AuditContext ac = (AuditContext)contexts.get(securityDomain);
      if(ac == null)
         ac = defaultContext;
      return ac;
   }
View Full Code Here

      contexts.put(securityDomain, ac);
   }

   public void audit(AuditEvent ae)
   {
      AuditContext ac = null;
      try
      {
         ac = getAuditContext();
      }
      catch (PrivilegedActionException e)
      {
        throw new RuntimeException(e);
      }
      ac.audit(ae);
      //Provide default JBoss trace logging
      if(ac !=  defaultContext)
      {
         defaultContext.audit(ae);
      }
View Full Code Here

      this.securityDomain = secDomain;
   }
  
   public AuditContext getAuditContext() throws PrivilegedActionException
   {
      AuditContext ac = (AuditContext)contexts.get(securityDomain);
      if(ac == null)
      {
         ac = new JBossAuditContext(securityDomain);
         ApplicationPolicy ap = SecurityConfiguration.getApplicationPolicy(securityDomain);
         if(ap != null)
         {
            AuditInfo ai = ap.getAuditInfo();
            if(ai != null)
            { 
               AuditProviderEntry[] apeArr = ai.getAuditProviderEntry();
               List<AuditProviderEntry> list = Arrays.asList(apeArr);
               for(AuditProviderEntry ape:list)
               {
                  String pname = ape.getName();
                  try
                  {
                     ac.addProvider((AuditProvider) SecurityActions.loadClass(pname).newInstance());
                  }
                  catch (Exception e)
                  {
                     throw new RuntimeException(e);
                  }
View Full Code Here

      return ac;
   }
  
   public static AuditContext getAuditContext(String securityDomain)
   {
      AuditContext ac = (AuditContext)contexts.get(securityDomain);
      if(ac == null)
         ac = defaultContext;
      return ac;
   }
View Full Code Here

      contexts.put(securityDomain, ac);
   }

   public void audit(AuditEvent ae)
   {
      AuditContext ac = null;
      try
      {
         ac = getAuditContext();
      }
      catch (PrivilegedActionException e)
      {
        throw new RuntimeException(e);
      }
      ac.audit(ae);
      //Provide default JBoss trace logging
      if(ac !=  defaultContext)
      {
         defaultContext.audit(ae);
      }
View Full Code Here

      this.securityDomain = secDomain;
   }
  
   public AuditContext getAuditContext() throws PrivilegedActionException
   {
      AuditContext ac = (AuditContext)contexts.get(securityDomain);
      if(ac == null)
      {
         ac = new JBossAuditContext(securityDomain);
         ApplicationPolicy ap = SecurityConfiguration.getApplicationPolicy(securityDomain);
         if(ap != null)
         {
            AuditInfo ai = ap.getAuditInfo();
            if(ai != null)
            { 
               AuditProviderEntry[] apeArr = ai.getAuditProviderEntry();
               List<AuditProviderEntry> list = Arrays.asList(apeArr);
               for(AuditProviderEntry ape:list)
               {
                  String pname = ape.getName();
                  try
                  {
                     ac.addProvider((AuditProvider) SecurityActions.loadClass(pname).newInstance());
                  }
                  catch (Exception e)
                  {
                     throw new RuntimeException(e);
                  }
View Full Code Here

      return ac;
   }
  
   public static AuditContext getAuditContext(String securityDomain)
   {
      AuditContext ac = (AuditContext)contexts.get(securityDomain);
      if(ac == null)
         ac = defaultContext;
      return ac;
   }
View Full Code Here

      contexts.put(securityDomain, ac);
   }

   public void audit(AuditEvent ae)
   {
      AuditContext ac = null;
      try
      {
         ac = getAuditContext();
      }
      catch (PrivilegedActionException e)
      {
        throw new RuntimeException(e);
      }
      ac.audit(ae);
   }
View Full Code Here

      this.securityDomain = secDomain;
   }
  
   public AuditContext getAuditContext() throws PrivilegedActionException
   {
      AuditContext ac = (AuditContext)contexts.get(securityDomain);
      if(ac == null)
      {
         ac = new JBossAuditContext(securityDomain);
         ApplicationPolicy ap = SecurityConfiguration.getApplicationPolicy(securityDomain);
         if(ap != null)
         {
            AuditInfo ai = ap.getAuditInfo();
            if(ai != null)
            {
               ClassLoader cl = SecurityActions.getContextClassLoader();
               List<AuditProviderEntry> list = ai.get();
               for(AuditProviderEntry ape:list)
               {
                  String pname = ape.getName();
                  try
                  {
                     ac.addProvider((AuditProvider) SecurityActions.loadClass(pname).newInstance());
                  }
                  catch (Exception e)
                  {
                     throw new RuntimeException(e);
                  }
View Full Code Here

TOP

Related Classes of org.jboss.security.audit.AuditContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.