[jboss-cvs] JBossAS SVN: r92010 - projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/file.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Aug 5 09:38:52 EDT 2009


Author: alesj
Date: 2009-08-05 09:38:52 -0400 (Wed, 05 Aug 2009)
New Revision: 92010

Modified:
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/file/FileStructure.java
Log:
[JBDEPLOY-209]; have FileStructure impl VirtualFileFilter.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/file/FileStructure.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/file/FileStructure.java	2009-08-05 12:20:08 UTC (rev 92009)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/file/FileStructure.java	2009-08-05 13:38:52 UTC (rev 92010)
@@ -32,14 +32,19 @@
 import org.jboss.deployers.vfs.spi.deployer.FileMatcher;
 import org.jboss.deployers.vfs.spi.structure.StructureContext;
 import org.jboss.virtual.VirtualFile;
+import org.jboss.virtual.VirtualFileFilter;
 
 /**
  * FileStructure is a simple suffix recognition structure deployer.
  * 
+ * It can also act as a file filter, only recognizing those which
+ * match any of the FileMatcher implementations.
+ * 
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
  * @version $Revision: 1.1 $
  */
-public class FileStructure extends AbstractVFSStructureDeployer
+public class FileStructure extends AbstractVFSStructureDeployer implements VirtualFileFilter
 {
    /** The file suffixes */
    private static Set<String> fileSuffixes = new CopyOnWriteArraySet<String>();
@@ -164,6 +169,11 @@
       return false;
    }
 
+   public boolean accepts(VirtualFile file)
+   {
+      return checkFileMatchers(file);
+   }
+
    public boolean determineStructure(StructureContext structureContext) throws DeploymentException
    {
       ContextInfo context = null;




More information about the jboss-cvs-commits mailing list