[jboss-cvs] JBossAS SVN: r85214 - in branches/Branch_5_0/server/src: main/org/jboss/deployment and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Mar 4 07:32:04 EST 2009


Author: thomas.diesler at jboss.com
Date: 2009-03-04 07:32:03 -0500 (Wed, 04 Mar 2009)
New Revision: 85214

Added:
   branches/Branch_5_0/server/src/main/org/jboss/deployment/DeploymentProvidedDeploymentUnitFilter.java
Modified:
   branches/Branch_5_0/server/src/etc/deployers/metadata-deployer-jboss-beans.xml
Log:
Add DeploymentProvidedDeploymentUnitFilter

Modified: branches/Branch_5_0/server/src/etc/deployers/metadata-deployer-jboss-beans.xml
===================================================================
--- branches/Branch_5_0/server/src/etc/deployers/metadata-deployer-jboss-beans.xml	2009-03-04 10:28:57 UTC (rev 85213)
+++ branches/Branch_5_0/server/src/etc/deployers/metadata-deployer-jboss-beans.xml	2009-03-04 12:32:03 UTC (rev 85214)
@@ -75,11 +75,14 @@
     </constructor>
   </bean>
 
+  <bean name="DeploymentProvidedDUFilter" class="org.jboss.deployment.DeploymentProvidedDeploymentUnitFilter" />
+  
   <bean name="GenScanDeployer" class="org.jboss.deployers.vfs.plugins.annotations.FilteredAnnotationEnvironmentDeployer">
     <property name="filter">
       <bean class="org.jboss.deployment.ListDeploymentUnitFilter">
         <property name="filters">
           <list>
+            <inject bean="DeploymentProvidedDUFilter" />
             <inject bean="JBossMetaDataDUFilter"/>
             <inject bean="ScanningMetaDataDUFilter"/>
             <inject bean="JBossCustomDeployDUFilter"/>

Added: branches/Branch_5_0/server/src/main/org/jboss/deployment/DeploymentProvidedDeploymentUnitFilter.java
===================================================================
--- branches/Branch_5_0/server/src/main/org/jboss/deployment/DeploymentProvidedDeploymentUnitFilter.java	                        (rev 0)
+++ branches/Branch_5_0/server/src/main/org/jboss/deployment/DeploymentProvidedDeploymentUnitFilter.java	2009-03-04 12:32:03 UTC (rev 85214)
@@ -0,0 +1,48 @@
+/*
+ * 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


Property changes on: branches/Branch_5_0/server/src/main/org/jboss/deployment/DeploymentProvidedDeploymentUnitFilter.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF




More information about the jboss-cvs-commits mailing list