[jboss-cvs] JBossAS SVN: r84907 - projects/jboss-deployers/branches/Branch_2_0/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Feb 28 12:40:41 EST 2009


Author: alesj
Date: 2009-02-28 12:40:41 -0500 (Sat, 28 Feb 2009)
New Revision: 84907

Added:
   projects/jboss-deployers/branches/Branch_2_0/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/DeploymentProvidedDeploymentUnitFilter.java
Log:
[JBDEPLOY-161]; add DeploymentProvidedDUFilter.

Added: projects/jboss-deployers/branches/Branch_2_0/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/DeploymentProvidedDeploymentUnitFilter.java
===================================================================
--- projects/jboss-deployers/branches/Branch_2_0/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/DeploymentProvidedDeploymentUnitFilter.java	                        (rev 0)
+++ projects/jboss-deployers/branches/Branch_2_0/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/DeploymentProvidedDeploymentUnitFilter.java	2009-02-28 17:40:41 UTC (rev 84907)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.deployers.vfs.spi.structure.helpers;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.deployers.structure.spi.DeploymentUnitFilter;
+
+/**
+ * DeploymentProvidedDeploymentUnitFilter.
+ *
+ * It delegates the filtering to DeploymentUnitFilter found in attachment.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class DeploymentProvidedDeploymentUnitFilter extends VFS2BaseBridgeDeploymentUnitFilter
+{
+   protected boolean doAccepts(DeploymentUnit unit)
+   {
+      DeploymentUnitFilter filter = unit.getAttachment(DeploymentUnitFilter.class);
+      return filter == null || filter.accepts(unit);
+   }
+}
\ No newline at end of file




More information about the jboss-cvs-commits mailing list