geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject cvs commit: incubator-geronimo/modules/security/src/java/org/apache/geronimo/security/jacc EJBModuleConfiguration.java WebModuleConfiguration.java
Date Sun, 30 May 2004 01:26:23 GMT
adc         2004/05/29 18:26:23

  Modified:    modules/security/src/java/org/apache/geronimo/security/jacc
                        EJBModuleConfiguration.java
                        WebModuleConfiguration.java
  Log:
  Changed schema name space.
  
  Revision  Changes    Path
  1.5       +24 -26    incubator-geronimo/modules/security/src/java/org/apache/geronimo/security/jacc/EJBModuleConfiguration.java
  
  Index: EJBModuleConfiguration.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/security/src/java/org/apache/geronimo/security/jacc/EJBModuleConfiguration.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- EJBModuleConfiguration.java	10 Mar 2004 09:59:25 -0000	1.4
  +++ EJBModuleConfiguration.java	30 May 2004 01:26:23 -0000	1.5
  @@ -17,33 +17,30 @@
   
   package org.apache.geronimo.security.jacc;
   
  +import javax.security.jacc.PolicyConfiguration;
   import java.lang.reflect.Constructor;
   import java.lang.reflect.InvocationTargetException;
   import java.util.HashSet;
   
  -import javax.security.jacc.PolicyConfiguration;
  +import noNamespace.PrincipalType;
  +import noNamespace.RealmType;
  +import noNamespace.RoleMappingsType;
  +import noNamespace.RoleType;
  +import noNamespace.SecurityType;
   
   import org.apache.geronimo.gbean.GAttributeInfo;
   import org.apache.geronimo.gbean.GBeanInfo;
   import org.apache.geronimo.gbean.GBeanInfoFactory;
   import org.apache.geronimo.gbean.GConstructorInfo;
  -import org.apache.geronimo.security.util.ConfigurationUtil;
  -import org.apache.geronimo.security.jacc.AbstractModuleConfiguration;
   import org.apache.geronimo.security.GeronimoSecurityException;
   import org.apache.geronimo.security.RealmPrincipal;
  -import org.apache.geronimo.xbeans.j2ee.EjbJarType;
  +import org.apache.geronimo.security.util.ConfigurationUtil;
   import org.apache.geronimo.xbeans.j2ee.AssemblyDescriptorType;
  +import org.apache.geronimo.xbeans.j2ee.EjbJarType;
   import org.apache.geronimo.xbeans.j2ee.SecurityRoleType;
  -import org.apache.geronimo.xbeans.geronimo.security.GerSecurityType;
  -import org.apache.geronimo.xbeans.geronimo.security.GerRoleMappingsType;
  -import org.apache.geronimo.xbeans.geronimo.security.GerRoleType;
  -import org.apache.geronimo.xbeans.geronimo.security.GerRealmType;
  -import org.apache.geronimo.xbeans.geronimo.security.GerPrincipalType;
   
   
   /**
  - *
  - *
    * @version $Revision$ $Date$
    */
   public class EJBModuleConfiguration extends AbstractModuleConfiguration {
  @@ -51,9 +48,9 @@
       private static final GBeanInfo GBEAN_INFO;
   
       private EjbJarType ejbJar;
  -    private GerSecurityType security;
  +    private SecurityType security;
   
  -    public EJBModuleConfiguration(String contextId, EjbJarType ejbJar, GerSecurityType
security) throws GeronimoSecurityException {
  +    public EJBModuleConfiguration(String contextId, EjbJarType ejbJar, SecurityType security)
throws GeronimoSecurityException {
           super(contextId);
           this.ejbJar = ejbJar;
           this.security = security;
  @@ -63,8 +60,10 @@
        * Translate the EJB deployment descriptors into equivalent security
        * permissions.  These permissions are placed into the appropriate
        * <code>PolicyConfiguration</code> object as defined in the JAAC spec.
  -     * @throws org.apache.geronimo.security.GeronimoSecurityException if there is any violation
of the semantics of
  -     * the security descriptor or the state of the module configuration.
  +     *
  +     * @throws org.apache.geronimo.security.GeronimoSecurityException
  +     *          if there is any violation of the semantics of
  +     *          the security descriptor or the state of the module configuration.
        * @see javax.security.jacc.PolicyConfiguration
        * @see "Java Authorization Contract for Containers", section 3.1.3
        */
  @@ -83,18 +82,18 @@
   
           //TODO not clear if schema allows/should allow security == null
           if (security != null) {
  -            GerRoleMappingsType roleMappings = security.getRoleMappings();
  +            RoleMappingsType roleMappings = security.getRoleMappings();
               if (roleMappings != null) {
  -                GerRoleType[] roles = roleMappings.getRoleArray();
  +                RoleType[] roles = roleMappings.getRoleArray();
                   for (int i = 0; i < roles.length; i++) {
  -                    GerRoleType role = roles[i];
  -                    GerRealmType[] realms = role.getRealmArray();
  +                    RoleType role = roles[i];
  +                    RealmType[] realms = role.getRealmArray();
                       for (int j = 0; j < realms.length; j++) {
  -                        GerRealmType realm = realms[j];
  -                        GerPrincipalType[] principals = realm.getPrincipalArray();
  +                        RealmType realm = realms[j];
  +                        PrincipalType[] principals = realm.getPrincipalArray();
                           HashSet set = new HashSet();
                           for (int k = 0; k < principals.length; k++) {
  -                            GerPrincipalType principal = principals[k];
  +                            PrincipalType principal = principals[k];
                               java.security.Principal p = null;
                               try {
                                   Class clazz = Class.forName(principal.getClass1());
  @@ -125,9 +124,8 @@
           //TODO make sure this attribute not backed by a getter or setter works.
           infoFactory.addAttribute(new GAttributeInfo("EJBJar", true));
           infoFactory.addAttribute(new GAttributeInfo("Security", true));
  -        infoFactory.setConstructor(new GConstructorInfo(
  -                new String[] {"ContextID", "EJBJar", "Security"},
  -                new Class[] {String.class, EjbJarType.class, GerSecurityType.class}));
  +        infoFactory.setConstructor(new GConstructorInfo(new String[]{"ContextID", "EJBJar",
"Security"},
  +                                                        new Class[]{String.class, EjbJarType.class,
SecurityType.class}));
           GBEAN_INFO = infoFactory.getBeanInfo();
       }
   
  
  
  
  1.5       +26 -25    incubator-geronimo/modules/security/src/java/org/apache/geronimo/security/jacc/WebModuleConfiguration.java
  
  Index: WebModuleConfiguration.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/security/src/java/org/apache/geronimo/security/jacc/WebModuleConfiguration.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- WebModuleConfiguration.java	10 Mar 2004 09:59:25 -0000	1.4
  +++ WebModuleConfiguration.java	30 May 2004 01:26:23 -0000	1.5
  @@ -17,26 +17,25 @@
   
   package org.apache.geronimo.security.jacc;
   
  +import javax.security.jacc.PolicyConfiguration;
   import java.lang.reflect.Constructor;
   import java.lang.reflect.InvocationTargetException;
   import java.util.HashSet;
   
  -import javax.security.jacc.PolicyConfiguration;
  +import noNamespace.PrincipalType;
  +import noNamespace.RealmType;
  +import noNamespace.RoleMappingsType;
  +import noNamespace.RoleType;
  +import noNamespace.SecurityType;
   
   import org.apache.geronimo.gbean.GAttributeInfo;
   import org.apache.geronimo.gbean.GBeanInfo;
   import org.apache.geronimo.gbean.GBeanInfoFactory;
   import org.apache.geronimo.gbean.GConstructorInfo;
  -import org.apache.geronimo.security.util.ConfigurationUtil;
  -import org.apache.geronimo.security.jacc.AbstractModuleConfiguration;
  -import org.apache.geronimo.security.RealmPrincipal;
   import org.apache.geronimo.security.GeronimoSecurityException;
  +import org.apache.geronimo.security.RealmPrincipal;
  +import org.apache.geronimo.security.util.ConfigurationUtil;
   import org.apache.geronimo.xbeans.j2ee.WebAppType;
  -import org.apache.geronimo.xbeans.geronimo.security.GerSecurityType;
  -import org.apache.geronimo.xbeans.geronimo.security.GerRoleMappingsType;
  -import org.apache.geronimo.xbeans.geronimo.security.GerRoleType;
  -import org.apache.geronimo.xbeans.geronimo.security.GerRealmType;
  -import org.apache.geronimo.xbeans.geronimo.security.GerPrincipalType;
   
   
   /**
  @@ -45,10 +44,11 @@
    * into equivalent security permissions.  These permissions are placed into
    * the appropriate <code>PolicyConfiguration</code> object as defined in the
    * JAAC spec.
  - *
  + * <p/>
    * <p>It is expected that deployment tools will configure modules through
    * these utility MBeans and not directly access the
    * <code>PolicyConfiguration</code> objects.
  + *
    * @version $Revision$ $Date$
    * @see javax.security.jacc.PolicyConfiguration
    * @see "Java Authorization Contract for Containers", section 3.1.3
  @@ -58,9 +58,9 @@
       private static final GBeanInfo GBEAN_INFO;
   
       private WebAppType webApp;
  -    private GerSecurityType security;
  +    private SecurityType security;
   
  -    public WebModuleConfiguration(String contextId, WebAppType webApp, GerSecurityType
security) {
  +    public WebModuleConfiguration(String contextId, WebAppType webApp, SecurityType security)
{
           super(contextId);
           this.webApp = webApp;
           this.security = security;
  @@ -70,8 +70,10 @@
        * Translate the web deployment descriptors into equivalent security
        * permissions.  These permissions are placed into the appropriate
        * <code>PolicyConfiguration</code> object as defined in the JAAC spec.
  -     * @throws org.apache.geronimo.security.GeronimoSecurityException if there is any violation
of the semantics of
  -     * the security descriptor or the state of the module configuration.
  +     *
  +     * @throws org.apache.geronimo.security.GeronimoSecurityException
  +     *          if there is any violation of the semantics of
  +     *          the security descriptor or the state of the module configuration.
        * @see javax.security.jacc.PolicyConfiguration
        * @see "Java Authorization Contract for Containers", section 3.1.3
        */
  @@ -84,18 +86,18 @@
   
           //TODO not clear if schema allows/should allow security == null
           if (security != null) {
  -            GerRoleMappingsType roleMappings = security.getRoleMappings();
  +            RoleMappingsType roleMappings = security.getRoleMappings();
               if (roleMappings != null) {
  -                GerRoleType[] roles = roleMappings.getRoleArray();
  +                RoleType[] roles = roleMappings.getRoleArray();
                   for (int i = 0; i < roles.length; i++) {
  -                    GerRoleType role = roles[i];
  -                    GerRealmType[] realms = role.getRealmArray();
  +                    RoleType role = roles[i];
  +                    RealmType[] realms = role.getRealmArray();
                       for (int j = 0; j < realms.length; j++) {
  -                        GerRealmType realm = realms[j];
  -                        GerPrincipalType[] principals = realm.getPrincipalArray();
  +                        RealmType realm = realms[j];
  +                        PrincipalType[] principals = realm.getPrincipalArray();
                           HashSet set = new HashSet();
                           for (int k = 0; k < principals.length; k++) {
  -                            GerPrincipalType principal = principals[k];
  +                            PrincipalType principal = principals[k];
                               java.security.Principal p = null;
                               try {
                                   Class clazz = Class.forName(principal.getClass1());
  @@ -126,9 +128,8 @@
           //TODO make sure this attribute not backed by a getter or setter works.
           infoFactory.addAttribute(new GAttributeInfo("WebApp", true));
           infoFactory.addAttribute(new GAttributeInfo("Security", true));
  -        infoFactory.setConstructor(new GConstructorInfo(
  -                new String[] {"ContextID", "WebApp", "Security"},
  -                new Class[] {String.class, WebAppType.class, GerSecurityType.class}));
  +        infoFactory.setConstructor(new GConstructorInfo(new String[]{"ContextID", "WebApp",
"Security"},
  +                                                        new Class[]{String.class, WebAppType.class,
SecurityType.class}));
           GBEAN_INFO = infoFactory.getBeanInfo();
       }
   
  
  
  

Mime
View raw message