[jboss-cvs] JBossAS SVN: r91892 - in projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml: factories and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Jul 31 14:44:16 EDT 2009


Author: anil.saldhana at jboss.com
Date: 2009-07-31 14:44:16 -0400 (Fri, 31 Jul 2009)
New Revision: 91892

Added:
   projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/factories/SecurityActions.java
   projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/util/SecurityActions.java
Modified:
   projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/core/SecurityActions.java
   projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/factories/PolicyFactory.java
Log:
add SecurityActions

Modified: projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/core/SecurityActions.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/core/SecurityActions.java	2009-07-31 18:38:08 UTC (rev 91891)
+++ projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/core/SecurityActions.java	2009-07-31 18:44:16 UTC (rev 91892)
@@ -31,13 +31,13 @@
  *  @since  Jul 10, 2007 
  *  @version $Revision$
  */
-public class SecurityActions
+class SecurityActions
 {
    /**
     * Obtain the Thread Context ClassLoader
     * @return
     */
-   public static ClassLoader getContextClassLoader()
+   static ClassLoader getContextClassLoader()
    {
       return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
       {
@@ -47,5 +47,15 @@
          }
       });
    }
-
-}
+   
+   static String getSystemProperty(final String key)
+   {
+      return AccessController.doPrivileged(new PrivilegedAction<String>()
+      {
+         public String run()
+         {
+            return System.getProperty(key);
+         }
+      });
+   }
+}
\ No newline at end of file

Modified: projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/factories/PolicyFactory.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/factories/PolicyFactory.java	2009-07-31 18:38:08 UTC (rev 91891)
+++ projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/factories/PolicyFactory.java	2009-07-31 18:44:16 UTC (rev 91892)
@@ -30,8 +30,7 @@
 import javax.xml.bind.JAXBElement;
 
 import org.jboss.security.xacml.bridge.JBossPolicyFinder;
-import org.jboss.security.xacml.core.JBossXACMLPolicy;
-import org.jboss.security.xacml.core.SecurityActions;
+import org.jboss.security.xacml.core.JBossXACMLPolicy; 
 import org.jboss.security.xacml.core.model.policy.ObjectFactory;
 import org.jboss.security.xacml.core.model.policy.PolicyType;
 import org.jboss.security.xacml.interfaces.XACMLPolicy;

Added: projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/factories/SecurityActions.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/factories/SecurityActions.java	                        (rev 0)
+++ projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/factories/SecurityActions.java	2009-07-31 18:44:16 UTC (rev 91892)
@@ -0,0 +1,51 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2007, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.security.xacml.factories;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+ 
+
+/**
+ *  Privileged Blocks
+ *  @author Anil.Saldhana at redhat.com
+ *  @since  Jul 10, 2007 
+ *  @version $Revision$
+ */
+class SecurityActions
+{
+   /**
+    * Obtain the Thread Context ClassLoader
+    * @return
+    */
+   public static ClassLoader getContextClassLoader()
+   {
+      return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+      {
+         public ClassLoader run()
+         {
+            return Thread.currentThread().getContextClassLoader();
+         }
+      });
+   }
+
+}

Added: projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/util/SecurityActions.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/util/SecurityActions.java	                        (rev 0)
+++ projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/util/SecurityActions.java	2009-07-31 18:44:16 UTC (rev 91892)
@@ -0,0 +1,51 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2007, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.security.xacml.util;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+ 
+
+/**
+ *  Privileged Blocks
+ *  @author Anil.Saldhana at redhat.com
+ *  @since  Jul 10, 2007 
+ *  @version $Revision$
+ */
+class SecurityActions
+{
+   /**
+    * Obtain the Thread Context ClassLoader
+    * @return
+    */
+   public static ClassLoader getContextClassLoader()
+   {
+      return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+      {
+         public ClassLoader run()
+         {
+            return Thread.currentThread().getContextClassLoader();
+         }
+      });
+   }
+
+}




More information about the jboss-cvs-commits mailing list