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/core/src/java/org/apache/geronimo/xml/deployment AbstractWebAppLoader.java EjbJarLoader.java J2EELoader.java
Date Wed, 01 Oct 2003 03:22:48 GMT
adc         2003/09/30 20:22:48

  Modified:    modules/core/src/java/org/apache/geronimo/xml/deployment
                        AbstractWebAppLoader.java EjbJarLoader.java
                        J2EELoader.java
  Log:
  Changed the cardinality of role names.
  
  Revision  Changes    Path
  1.5       +2 -13     incubator-geronimo/modules/core/src/java/org/apache/geronimo/xml/deployment/AbstractWebAppLoader.java
  
  Index: AbstractWebAppLoader.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/xml/deployment/AbstractWebAppLoader.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AbstractWebAppLoader.java	29 Sep 2003 12:38:13 -0000	1.4
  +++ AbstractWebAppLoader.java	1 Oct 2003 03:22:48 -0000	1.5
  @@ -488,21 +488,10 @@
               AuthConstraint constraint = new AuthConstraint();
   
               J2EELoader.loadDescribable(element, constraint);
  -            loadRoleNames(constraint, element);
  +            constraint.setRoleName(J2EELoader.loadRoleNames(element));
   
               securityConstraint.setAuthConstraint(constraint);
           }
  -    }
  -
  -    private void loadRoleNames(AuthConstraint constraint, Element root) {
  -        Element[] elements = LoaderUtil.getChildren(root, "role-name");
  -        String[] names = new String[elements.length];
  -
  -        for (int i=0; i<elements.length; i++) {
  -            Element e = elements[i];
  -            names[i] = LoaderUtil.getContent(e);
  -        }
  -        constraint.setRoleName(names);
       }
   
       private void loadUserDataConstraint(SecurityConstraint securityConstraint, Element
root) {
  
  
  
  1.9       +2 -2      incubator-geronimo/modules/core/src/java/org/apache/geronimo/xml/deployment/EjbJarLoader.java
  
  Index: EjbJarLoader.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/xml/deployment/EjbJarLoader.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- EjbJarLoader.java	29 Sep 2003 16:00:13 -0000	1.8
  +++ EjbJarLoader.java	1 Oct 2003 03:22:48 -0000	1.9
  @@ -149,7 +149,7 @@
               perms[i] = new MethodPermission();
               J2EELoader.loadDescribable(root, perms[i]);
               perms[i].setUnchecked(LoaderUtil.getChild(root, "unchecked") != null);
  -            perms[i].setRoleName(LoaderUtil.getChildContent(root, "role-name"));
  +            perms[i].setRoleName(J2EELoader.loadRoleNames(root));
               perms[i].setMethod(loadMethods(root));
           }
           return perms;
  
  
  
  1.8       +12 -1     incubator-geronimo/modules/core/src/java/org/apache/geronimo/xml/deployment/J2EELoader.java
  
  Index: J2EELoader.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/xml/deployment/J2EELoader.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- J2EELoader.java	29 Sep 2003 14:17:23 -0000	1.7
  +++ J2EELoader.java	1 Oct 2003 03:22:48 -0000	1.8
  @@ -170,6 +170,17 @@
           return roles;
       }
   
  +    public static String[] loadRoleNames(Element parent) {
  +        Element[] elements = LoaderUtil.getChildren(parent, "role-name");
  +        String[] names = new String[elements.length];
  +
  +        for (int i=0; i<elements.length; i++) {
  +            Element e = elements[i];
  +            names[i] = LoaderUtil.getContent(e);
  +        }
  +        return names;
  +    }
  +
       public static ServiceRef[] loadServiceRefs(Element parent) {
           NodeList nodes = parent.getElementsByTagName("service-ref");
           int length = nodes.getLength();
  
  
  

Mime
View raw message