[jboss-cvs] JBossAS SVN: r95574 - in projects/jboss-deployers/trunk: deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/bean/support and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Oct 26 13:27:36 EDT 2009
Author: kabir.khan at jboss.com
Date: 2009-10-26 13:27:36 -0400 (Mon, 26 Oct 2009)
New Revision: 95574
Added:
projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/helpers/KernelControllerContextCreator.java
Removed:
projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/helpers/ControllerContextCreator.java
Modified:
projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/deployer/kernel/BeanMetaDataDeployer.java
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/bean/support/NoopControllerContextCreator.java
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/bean/support/SpecialControllerContextCreator.java
Log:
[JBDEPLOY-219] Add controller to KCCC.createContext() parameters
Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/deployer/kernel/BeanMetaDataDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/deployer/kernel/BeanMetaDataDeployer.java 2009-10-26 16:28:45 UTC (rev 95573)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/deployer/kernel/BeanMetaDataDeployer.java 2009-10-26 17:27:36 UTC (rev 95574)
@@ -164,7 +164,7 @@
{
for (KernelControllerContextCreator creator : controllerContextCreators)
{
- KernelControllerContext context = creator.createContext(unit, deployment);
+ KernelControllerContext context = creator.createContext(controller, unit, deployment);
if (context != null)
return context;
}
Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/bean/support/NoopControllerContextCreator.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/bean/support/NoopControllerContextCreator.java 2009-10-26 16:28:45 UTC (rev 95573)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/bean/support/NoopControllerContextCreator.java 2009-10-26 17:27:36 UTC (rev 95574)
@@ -22,6 +22,7 @@
package org.jboss.test.deployers.vfs.deployer.bean.support;
import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.dependency.spi.Controller;
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.deployers.vfs.spi.deployer.helpers.KernelControllerContextCreator;
import org.jboss.kernel.spi.dependency.KernelControllerContext;
@@ -40,8 +41,14 @@
return triggered;
}
- public KernelControllerContext createContext(DeploymentUnit unit, BeanMetaData beanMetaData)
+ public KernelControllerContext createContext(Controller controller, DeploymentUnit unit, BeanMetaData beanMetaData)
{
+ if (controller == null)
+ throw new IllegalArgumentException("Null controller");
+ if (unit == null)
+ throw new IllegalArgumentException("Null unit");
+ if (beanMetaData == null)
+ throw new IllegalArgumentException("Null beanMetadata");
triggered = true;
return null;
}
Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/bean/support/SpecialControllerContextCreator.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/bean/support/SpecialControllerContextCreator.java 2009-10-26 16:28:45 UTC (rev 95573)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/bean/support/SpecialControllerContextCreator.java 2009-10-26 17:27:36 UTC (rev 95574)
@@ -23,6 +23,7 @@
import org.jboss.beans.info.spi.BeanInfo;
import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.dependency.spi.Controller;
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.deployers.vfs.spi.deployer.helpers.KernelControllerContextCreator;
import org.jboss.kernel.plugins.dependency.AbstractKernelControllerContext;
@@ -37,7 +38,7 @@
{
public static final String TRIGGER = "TriggerSpecialControllerContextCreator";
- public KernelControllerContext createContext(DeploymentUnit unit, BeanMetaData beanMetaData)
+ public KernelControllerContext createContext(Controller controller, DeploymentUnit unit, BeanMetaData beanMetaData)
{
if (unit.getAttachment(TRIGGER) != null)
return new SpecialControllerContext(null, beanMetaData, null);
Deleted: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/helpers/ControllerContextCreator.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/helpers/ControllerContextCreator.java 2009-10-26 16:28:45 UTC (rev 95573)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/helpers/ControllerContextCreator.java 2009-10-26 17:27:36 UTC (rev 95574)
@@ -1,42 +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.deployers.vfs.spi.deployer.helpers;
-
-import org.jboss.beans.metadata.spi.BeanMetaData;
-import org.jboss.dependency.spi.ControllerContext;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-
-/**
- * Interface used to create a controller context. Intention is to be able
- * to override the default KernelControllerContext created by BeanMetaDataDeployer
- *
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public interface ControllerContextCreator
-{
- /**
- * Create a controller context
- * @return the created controller context or null if this controller context creator should not handle the creation of the context
- */
- ControllerContext createContext(DeploymentUnit unit, BeanMetaData beanMetaData);
-}
Added: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/helpers/KernelControllerContextCreator.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/helpers/KernelControllerContextCreator.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/helpers/KernelControllerContextCreator.java 2009-10-26 17:27:36 UTC (rev 95574)
@@ -0,0 +1,46 @@
+/*
+* 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.deployers.vfs.spi.deployer.helpers;
+
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.dependency.spi.Controller;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.kernel.spi.dependency.KernelControllerContext;
+
+/**
+ * Interface used to create a controller context. Intention is to be able
+ * to override the default KernelControllerContext created by BeanMetaDataDeployer
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public interface KernelControllerContextCreator
+{
+ /**
+ * Create a controller context
+ * @param controller The controller to which the beans will be deployed
+ * @param unit The deployment unit we are deploying
+ * @param beanMetaData The bean metadata we are deploying
+ * @return the created controller context or null if this controller context creator should not handle the creation of the context
+ */
+ KernelControllerContext createContext(Controller controller, DeploymentUnit unit, BeanMetaData beanMetaData);
+}
More information about the jboss-cvs-commits
mailing list