[jboss-cvs] JBossAS SVN: r98922 - projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-mc-int/src/main/java/org/jboss/security/microcontainer/beans.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Dec 23 12:58:12 EST 2009


Author: anil.saldhana at jboss.com
Date: 2009-12-23 12:58:11 -0500 (Wed, 23 Dec 2009)
New Revision: 98922

Removed:
   projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-mc-int/src/main/java/org/jboss/security/microcontainer/beans/Util.java
Modified:
   projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-mc-int/src/main/java/org/jboss/security/microcontainer/beans/ACLPolicyBean.java
   projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-mc-int/src/main/java/org/jboss/security/microcontainer/beans/AuthorizationPolicyBean.java
   projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-mc-int/src/main/java/org/jboss/security/microcontainer/beans/IdentityTrustPolicyBean.java
Log:
SECURITY-449: merge in from trunk 98904

Modified: projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-mc-int/src/main/java/org/jboss/security/microcontainer/beans/ACLPolicyBean.java
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-mc-int/src/main/java/org/jboss/security/microcontainer/beans/ACLPolicyBean.java	2009-12-23 17:48:15 UTC (rev 98921)
+++ projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-mc-int/src/main/java/org/jboss/security/microcontainer/beans/ACLPolicyBean.java	2009-12-23 17:58:11 UTC (rev 98922)
@@ -23,6 +23,7 @@
 
 import org.jboss.security.acl.config.ACLProviderEntry;
 import org.jboss.security.config.ACLInfo;
+import org.jboss.security.config.ControlFlag;
 
 /**
  * <p>
@@ -46,7 +47,7 @@
       for (FlaggedPolicyModule module : super.modules)
       {
          ACLProviderEntry entry = new ACLProviderEntry(module.getCode(), module.getOptions());
-         entry.setControlFlag(Util.getControlFlag(module.getFlag()));
+         entry.setControlFlag(ControlFlag.valueOf(module.getFlag()));
          info.add(entry);
       }
       return info;

Modified: projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-mc-int/src/main/java/org/jboss/security/microcontainer/beans/AuthorizationPolicyBean.java
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-mc-int/src/main/java/org/jboss/security/microcontainer/beans/AuthorizationPolicyBean.java	2009-12-23 17:48:15 UTC (rev 98921)
+++ projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-mc-int/src/main/java/org/jboss/security/microcontainer/beans/AuthorizationPolicyBean.java	2009-12-23 17:58:11 UTC (rev 98922)
@@ -23,6 +23,7 @@
 
 import org.jboss.security.authorization.config.AuthorizationModuleEntry;
 import org.jboss.security.config.AuthorizationInfo;
+import org.jboss.security.config.ControlFlag;
 
 /**
  * <p>
@@ -46,7 +47,7 @@
       for (FlaggedPolicyModule module : this.modules)
       {
          AuthorizationModuleEntry entry = new AuthorizationModuleEntry(module.getCode(), module.getOptions());
-         entry.setControlFlag(Util.getControlFlag(module.getFlag()));
+         entry.setControlFlag(ControlFlag.valueOf(module.getFlag()));
          info.add(entry);
       }
 

Modified: projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-mc-int/src/main/java/org/jboss/security/microcontainer/beans/IdentityTrustPolicyBean.java
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-mc-int/src/main/java/org/jboss/security/microcontainer/beans/IdentityTrustPolicyBean.java	2009-12-23 17:48:15 UTC (rev 98921)
+++ projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-mc-int/src/main/java/org/jboss/security/microcontainer/beans/IdentityTrustPolicyBean.java	2009-12-23 17:58:11 UTC (rev 98922)
@@ -21,6 +21,7 @@
  */
 package org.jboss.security.microcontainer.beans;
 
+import org.jboss.security.config.ControlFlag;
 import org.jboss.security.config.IdentityTrustInfo;
 import org.jboss.security.identitytrust.config.IdentityTrustModuleEntry;
 
@@ -46,7 +47,7 @@
       for (FlaggedPolicyModule module : this.modules)
       {
          IdentityTrustModuleEntry entry = new IdentityTrustModuleEntry(module.getCode(), module.getOptions());
-         entry.setControlFlag(Util.getControlFlag(module.getFlag()));
+         entry.setControlFlag(ControlFlag.valueOf(module.getFlag()));
          info.add(entry);
       }
       return info;

Deleted: projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-mc-int/src/main/java/org/jboss/security/microcontainer/beans/Util.java
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-mc-int/src/main/java/org/jboss/security/microcontainer/beans/Util.java	2009-12-23 17:48:15 UTC (rev 98921)
+++ projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx-mc-int/src/main/java/org/jboss/security/microcontainer/beans/Util.java	2009-12-23 17:58:11 UTC (rev 98922)
@@ -1,59 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.microcontainer.beans;
-
-import org.jboss.security.config.ControlFlag;
-
-/**
- * <p>
- * Utility class used by the policies beans.
- * </p>
- * 
- * @author <a href="mailto:sguilhen at redhat.com">Stefan Guilhen</a>
- */
-public class Util
-{
-
-   /**
-    * <p>
-    * Converts the specified flag to one of the existing {@code ControlFlag} objects.
-    * </p>
-    * 
-    * @param flag a {@code String} containing the name of the control flag.
-    * @return the constructed {@code ControlFlag} object.
-    * @throws IllegalArgumentException if the specified flag does not correspond to any {@code ControlFlag}.
-    */
-   public static ControlFlag getControlFlag(String flag)
-   {
-      flag = flag.toUpperCase();
-      if ("REQUIRED".equals(flag))
-         return ControlFlag.REQUIRED;
-      else if ("REQUISITE".equals(flag))
-         return ControlFlag.REQUISITE;
-      else if ("OPTIONAL".equals(flag))
-         return ControlFlag.OPTIONAL;
-      else if ("SUFFICIENT".equals(flag))
-         return ControlFlag.SUFFICIENT;
-      else
-         throw new IllegalArgumentException("Invalid control flag: " + flag);
-   }
-}




More information about the jboss-cvs-commits mailing list