[jboss-cvs] jboss-seam/src/main/org/jboss/seam/security/config ...

Shane Bryzak Shane_Bryzak at symantec.com
Thu Jan 25 11:47:23 EST 2007


  User: sbryzak2
  Date: 07/01/25 11:47:23

  Modified:    src/main/org/jboss/seam/security/config     
                        SecurityConfiguration.java
  Removed:     src/main/org/jboss/seam/security/config     
                        AuthConstraint.java AuthMethod.java
                        SecurityConstraint.java WebResourceCollection.java
  Log:
  redundant config classes
  
  Revision  Changes    Path
  1.16      +0 -75     jboss-seam/src/main/org/jboss/seam/security/config/SecurityConfiguration.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: SecurityConfiguration.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/security/config/SecurityConfiguration.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -b -r1.15 -r1.16
  --- SecurityConfiguration.java	25 Jan 2007 13:21:44 -0000	1.15
  +++ SecurityConfiguration.java	25 Jan 2007 16:47:23 -0000	1.16
  @@ -52,14 +52,6 @@
      private static final LogProvider log = Logging
            .getLogProvider(SecurityConfiguration.class);
   
  -   // <security-constraint>
  -   private static final String SECURITY_CONSTRAINT = "security-constraint";
  -   private static final String WEB_RESOURCE_COLLECTION = "web-resource-collection";
  -   private static final String URL_PATTERN = "url-pattern";
  -   private static final String HTTP_METHOD = "http-method";
  -   private static final String AUTH_CONSTRAINT = "auth-constraint";
  -   private static final String ROLE_NAME = "role-name";
  -
      // roles
      private static final String SECURITY_ROLES = "roles";
      private static final String SECURITY_ROLE = "role";
  @@ -83,8 +75,6 @@
      private static final String LM_FLAG_SUFFICIENT = "SUFFICIENT";
      private static final String LM_FLAG_REQUISITE = "REQUISITE";
   
  -   private Set<SecurityConstraint> securityConstraints = new HashSet<SecurityConstraint>();
  -   
      public final class Role
      {
         private String name;
  @@ -195,9 +185,6 @@
            Document doc = xmlReader.read(config);
            Element env = doc.getRootElement();
   
  -         if (env.elements(SECURITY_CONSTRAINT) != null)
  -            loadSecurityConstraints(env.elements(SECURITY_CONSTRAINT));
  -         
            if (env.element(SECURITY_ROLES) != null)
               loadSecurityRoles(env.element(SECURITY_ROLES));
            
  @@ -215,16 +202,6 @@
      }
   
      /**
  -    * Returns the configured security constraints
  -    * 
  -    * @return Set
  -    */
  -   public Set<SecurityConstraint> getSecurityConstraints()
  -   {
  -      return securityConstraints;
  -   }
  -   
  -   /**
       * Returns the login module configuration
       * 
       */
  @@ -234,58 +211,6 @@
      }
   
      /**
  -    * Load security constraints
  -    * 
  -    * @param elements List
  -    * @throws SecurityConfigException
  -    */
  -   @SuppressWarnings("unchecked")
  -   protected void loadSecurityConstraints(List elements)
  -         throws SecurityConfigException
  -   {
  -      try
  -      {
  -         for (Element element : (List<Element>) elements)
  -         {
  -            SecurityConstraint securityConstraint = new SecurityConstraint();
  -            securityConstraints.add(securityConstraint);
  -
  -            for (Element wrcElement : (List<Element>) element
  -                  .elements(WEB_RESOURCE_COLLECTION))
  -            {
  -               WebResourceCollection wrc = new WebResourceCollection();
  -               securityConstraint.getResourceCollections().add(wrc);
  -
  -               for (Element urlPatternElement : (List<Element>) wrcElement
  -                     .elements(URL_PATTERN))
  -               {
  -                  wrc.getUrlPatterns().add(urlPatternElement.getTextTrim());
  -               }
  -
  -               for (Element httpMethodElement : (List<Element>) wrcElement
  -                     .elements(HTTP_METHOD))
  -               {
  -                  wrc.getHttpMethods().add(httpMethodElement.getTextTrim());
  -               }
  -            }
  -
  -            securityConstraint.setAuthConstraint(new AuthConstraint());
  -            for (Element roleNameElement : (List<Element>) element.element(
  -                  AUTH_CONSTRAINT).elements(ROLE_NAME))
  -            {
  -               securityConstraint.getAuthConstraint().getRoles().add(
  -                     roleNameElement.getTextTrim());
  -            }
  -         }
  -      }
  -      catch (Exception ex)
  -      {
  -         throw new SecurityConfigException(
  -               "Error loading security constraints", ex);
  -      }
  -   }
  -   
  -   /**
       * Load the security roles
       * 
       * @param securityRoleElement Element
  
  
  



More information about the jboss-cvs-commits mailing list