[jboss-cvs] JBossAS SVN: r100704 - in trunk: server/src/etc/conf/default/bootstrap and 3 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Feb 8 11:34:30 EST 2010


Author: alesj
Date: 2010-02-08 11:34:29 -0500 (Mon, 08 Feb 2010)
New Revision: 100704

Removed:
   trunk/server/src/main/java/org/jboss/deployment/DeploymentProvidedDeploymentUnitFilter.java
   trunk/server/src/main/java/org/jboss/deployment/FileNameVirtualFileFilter.java
   trunk/system/src/main/java/org/jboss/system/server/profile/basic/
Modified:
   trunk/server/src/etc/conf/all/bootstrap/profile.xml
   trunk/server/src/etc/conf/default/bootstrap/profile.xml
   trunk/server/src/etc/deployers/metadata-deployer-jboss-beans.xml
Log:
[JBAS-7524]; remove duplicated code.

Modified: trunk/server/src/etc/conf/all/bootstrap/profile.xml
===================================================================
--- trunk/server/src/etc/conf/all/bootstrap/profile.xml	2010-02-08 15:01:02 UTC (rev 100703)
+++ trunk/server/src/etc/conf/all/bootstrap/profile.xml	2010-02-08 16:34:29 UTC (rev 100704)
@@ -95,7 +95,7 @@
   <bean name="SynchAdapter" class="org.jboss.deployers.vfs.spi.structure.modified.OverrideSynchAdapter"/>
 
   <!-- We just visit wars, but exclude classes, lib, dev dirs -->
-  <bean name="WebVisitorAttributes" class="org.jboss.system.server.profile.basic.IncludeExcludeVisitorAttributes">
+  <bean name="WebVisitorAttributes" class="org.jboss.virtual.plugins.vfs.helpers.IncludeExcludeVisitorAttributes">
     <constructor>
       <parameter>
         <set>

Modified: trunk/server/src/etc/conf/default/bootstrap/profile.xml
===================================================================
--- trunk/server/src/etc/conf/default/bootstrap/profile.xml	2010-02-08 15:01:02 UTC (rev 100703)
+++ trunk/server/src/etc/conf/default/bootstrap/profile.xml	2010-02-08 16:34:29 UTC (rev 100704)
@@ -87,7 +87,7 @@
   <bean name="SynchAdapter" class="org.jboss.deployers.vfs.spi.structure.modified.OverrideSynchAdapter"/>
 
   <!-- We just visit wars, but exclude classes, lib, dev dirs -->
-  <bean name="WebVisitorAttributes" class="org.jboss.system.server.profile.basic.IncludeExcludeVisitorAttributes">
+  <bean name="WebVisitorAttributes" class="org.jboss.virtual.plugins.vfs.helpers.IncludeExcludeVisitorAttributes">
     <constructor>
       <parameter>
         <set>

Modified: trunk/server/src/etc/deployers/metadata-deployer-jboss-beans.xml
===================================================================
--- trunk/server/src/etc/deployers/metadata-deployer-jboss-beans.xml	2010-02-08 15:01:02 UTC (rev 100703)
+++ trunk/server/src/etc/deployers/metadata-deployer-jboss-beans.xml	2010-02-08 16:34:29 UTC (rev 100704)
@@ -23,7 +23,7 @@
   <bean name="JBossCustomDeployDUFilter" class="org.jboss.deployers.vfs.spi.structure.helpers.VirtualFileDeploymentUnitFilter">
     <constructor>
       <parameter>
-        <bean class="org.jboss.deployment.FileNameVirtualFileFilter">
+        <bean class="org.jboss.virtual.plugins.vfs.helpers.FileNameVirtualFileFilter">
           <constructor>
             <parameter>
               <map keyClass="java.lang.String" valueClass="java.util.Set">
@@ -79,7 +79,7 @@
     </constructor>
   </bean>
 
-  <bean name="DeploymentProvidedDUFilter" class="org.jboss.deployment.DeploymentProvidedDeploymentUnitFilter" />
+  <bean name="DeploymentProvidedDUFilter" class="org.jboss.deployers.vfs.spi.structure.helpers.DeploymentProvidedDeploymentUnitFilter" />
   
   <bean name="GenScanDeployer" class="org.jboss.deployers.vfs.plugins.annotations.FilteredAnnotationRepositoryDeployer">
     <property name="filter">

Deleted: trunk/server/src/main/java/org/jboss/deployment/DeploymentProvidedDeploymentUnitFilter.java
===================================================================
--- trunk/server/src/main/java/org/jboss/deployment/DeploymentProvidedDeploymentUnitFilter.java	2010-02-08 15:01:02 UTC (rev 100703)
+++ trunk/server/src/main/java/org/jboss/deployment/DeploymentProvidedDeploymentUnitFilter.java	2010-02-08 16:34:29 UTC (rev 100704)
@@ -1,48 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.deployment;
-
-// $Id$
-
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.deployers.structure.spi.DeploymentUnitFilter;
-import org.jboss.deployers.vfs.spi.structure.helpers.VFS2BaseBridgeDeploymentUnitFilter;
-
-/**
- * A DeploymentUnitFilter that delegates its work the DeploymentUnitFilter that
- * is attached to the DeploymentUnit.
- * 
- * A Deployer can attach a DeploymentUnitFilter to a DeploymentUnit which controlls whether 
- * the DeploymentUnit is to be processed by following Deployers
- *
- * @author Thomas.Diesler at jboss.com
- * @since 04-Mar-2009
- */
-public class DeploymentProvidedDeploymentUnitFilter extends VFS2BaseBridgeDeploymentUnitFilter
-{
-   @Override
-   protected boolean doAccepts(DeploymentUnit unit)
-   {
-      DeploymentUnitFilter filter = unit.getTopLevel().getAttachment(DeploymentUnitFilter.class);
-      return filter == null || filter.accepts(unit);
-   }
-}
\ No newline at end of file

Deleted: trunk/server/src/main/java/org/jboss/deployment/FileNameVirtualFileFilter.java
===================================================================
--- trunk/server/src/main/java/org/jboss/deployment/FileNameVirtualFileFilter.java	2010-02-08 15:01:02 UTC (rev 100703)
+++ trunk/server/src/main/java/org/jboss/deployment/FileNameVirtualFileFilter.java	2010-02-08 16:34:29 UTC (rev 100704)
@@ -1,100 +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.deployment;
-
-import java.util.Map;
-import java.util.Set;
-
-import org.jboss.logging.Logger;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
-
-/**
- * Exclude virtual file by file name and path.
- *
- * @author ales.justin at jboss.org
- */
-public class FileNameVirtualFileFilter implements VirtualFileFilter
-{
-   private Logger log = Logger.getLogger(getClass());
-   private Map<String, Set<String>> excludes;
-
-   public FileNameVirtualFileFilter(Map<String, Set<String>> excludes)
-   {
-      if (excludes == null || excludes.isEmpty())
-         throw new IllegalArgumentException("Null or empty excludes.");
-
-      this.excludes = excludes;
-   }
-
-   /**
-    * Do we accept file.
-    *
-    * If pathName contains any of the keys,
-    *   * if the value is null - then do exclude
-    *   * if value is not null - only exclude if it value contains simple name
-    *
-    * @param file the virtual file
-    * @return false if file is excluded by excludes map, true other wise
-    */
-   public boolean accepts(VirtualFile file)
-   {
-      String pathName = getPathName(file);
-      for (Map.Entry<String, Set<String>> entry : excludes.entrySet())
-      {
-         String key = entry.getKey();
-         if (pathName.contains(key))
-         {
-            String simpleName = file.getName();
-            Set<String> value = entry.getValue();
-            if (value == null || value.contains(simpleName))
-            {
-               if (log.isTraceEnabled())
-                  log.trace("Excluding " + pathName);
-               
-               return false;
-            }
-         }
-      }
-      return true;
-   }
-   
-   /**
-    * Get the path name for the VirtualFile.
-    * 
-    * @param file the virtual file
-    * @return the path name
-    */
-   private String getPathName(VirtualFile file)
-   {
-      try
-      {
-         // prefer the URI, as the pathName might
-         // return an empty string for temp virtual files
-         return file.toURI().toString();
-      }
-      catch(Exception e)
-      {
-         return file.getPathName();
-      }
-   }
-}
\ No newline at end of file




More information about the jboss-cvs-commits mailing list