[jboss-cvs] JBossAS SVN: r105630 - projects/jboss-deployers/trunk/deployers-spi/src/main/java/org/jboss/deployers/spi/deployer/helpers.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jun 3 04:39:10 EDT 2010


Author: alesj
Date: 2010-06-03 04:39:09 -0400 (Thu, 03 Jun 2010)
New Revision: 105630

Added:
   projects/jboss-deployers/trunk/deployers-spi/src/main/java/org/jboss/deployers/spi/deployer/helpers/NegatingNameIgnoreMechanism.java
Log:
Negating NIM.

Copied: projects/jboss-deployers/trunk/deployers-spi/src/main/java/org/jboss/deployers/spi/deployer/helpers/NegatingNameIgnoreMechanism.java (from rev 105627, projects/jboss-deployers/trunk/deployers-spi/src/main/java/org/jboss/deployers/spi/deployer/helpers/DummyNameIgnoreMechanism.java)
===================================================================
--- projects/jboss-deployers/trunk/deployers-spi/src/main/java/org/jboss/deployers/spi/deployer/helpers/NegatingNameIgnoreMechanism.java	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-spi/src/main/java/org/jboss/deployers/spi/deployer/helpers/NegatingNameIgnoreMechanism.java	2010-06-03 08:39:09 UTC (rev 105630)
@@ -0,0 +1,58 @@
+/*
+ * 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.deployers.spi.deployer.helpers;
+
+import org.jboss.deployers.spi.deployer.matchers.LazyPath;
+import org.jboss.deployers.spi.deployer.matchers.NameIgnoreMechanism;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+
+/**
+ * Negate delegate's decision.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class NegatingNameIgnoreMechanism implements NameIgnoreMechanism
+{
+   private NameIgnoreMechanism delegate;
+
+   public NegatingNameIgnoreMechanism(NameIgnoreMechanism delegate)
+   {
+      if (delegate == null)
+         throw new IllegalArgumentException("Null delegate");
+      this.delegate = delegate;
+   }
+
+   public boolean ignoreName(DeploymentUnit unit, String name)
+   {
+      return delegate.ignoreName(unit, name) == false;
+   }
+
+   public boolean ignorePath(DeploymentUnit unit, String path)
+   {
+      return delegate.ignorePath(unit, path) == false;
+   }
+
+   public boolean ignorePath(DeploymentUnit unit, LazyPath path)
+   {
+      return delegate.ignorePath(unit, path) == false;      
+   }
+}
\ No newline at end of file




More information about the jboss-cvs-commits mailing list