[jboss-cvs] JBossAS SVN: r85312 - in projects/jboss-deployers/trunk/deployers-structure-spi/src/main/java/org/jboss/deployers/structure/spi: helpers and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Mar 5 12:46:51 EST 2009
Author: alesj
Date: 2009-03-05 12:46:51 -0500 (Thu, 05 Mar 2009)
New Revision: 85312
Modified:
projects/jboss-deployers/trunk/deployers-structure-spi/src/main/java/org/jboss/deployers/structure/spi/DeploymentContext.java
projects/jboss-deployers/trunk/deployers-structure-spi/src/main/java/org/jboss/deployers/structure/spi/DeploymentUnit.java
projects/jboss-deployers/trunk/deployers-structure-spi/src/main/java/org/jboss/deployers/structure/spi/helpers/AbstractDeploymentContext.java
projects/jboss-deployers/trunk/deployers-structure-spi/src/main/java/org/jboss/deployers/structure/spi/helpers/AbstractDeploymentUnit.java
projects/jboss-deployers/trunk/deployers-structure-spi/src/main/java/org/jboss/deployers/structure/spi/helpers/ComponentDeploymentContext.java
Log:
[JBDEPLOY-170]; set required stage.
Modified: projects/jboss-deployers/trunk/deployers-structure-spi/src/main/java/org/jboss/deployers/structure/spi/DeploymentContext.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-structure-spi/src/main/java/org/jboss/deployers/structure/spi/DeploymentContext.java 2009-03-05 17:44:58 UTC (rev 85311)
+++ projects/jboss-deployers/trunk/deployers-structure-spi/src/main/java/org/jboss/deployers/structure/spi/DeploymentContext.java 2009-03-05 17:46:51 UTC (rev 85312)
@@ -29,6 +29,7 @@
import org.jboss.deployers.client.spi.Deployment;
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.DeploymentState;
+import org.jboss.deployers.spi.deployer.DeploymentStage;
import org.jboss.deployers.spi.attachments.ManagedObjectsWithTransientAttachments;
import org.jboss.metadata.spi.MetaData;
import org.jboss.metadata.spi.MutableMetaData;
@@ -347,6 +348,13 @@
Object getControllerContextName();
/**
+ * Set the required stage.
+ *
+ * @param stage the required stage
+ */
+ void setRequiredStage(DeploymentStage stage);
+
+ /**
* Get the dependency info
*
* @return the dependency
Modified: projects/jboss-deployers/trunk/deployers-structure-spi/src/main/java/org/jboss/deployers/structure/spi/DeploymentUnit.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-structure-spi/src/main/java/org/jboss/deployers/structure/spi/DeploymentUnit.java 2009-03-05 17:44:58 UTC (rev 85311)
+++ projects/jboss-deployers/trunk/deployers-structure-spi/src/main/java/org/jboss/deployers/structure/spi/DeploymentUnit.java 2009-03-05 17:46:51 UTC (rev 85312)
@@ -29,6 +29,7 @@
import org.jboss.deployers.client.spi.main.MainDeployer;
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.attachments.MutableAttachments;
+import org.jboss.deployers.spi.deployer.DeploymentStage;
import org.jboss.metadata.spi.MetaData;
import org.jboss.metadata.spi.MutableMetaData;
import org.jboss.metadata.spi.scope.ScopeKey;
@@ -269,6 +270,13 @@
Object getControllerContextName();
/**
+ * Set the required stage.
+ *
+ * @param stage the required stage
+ */
+ void setRequiredStage(DeploymentStage stage);
+
+ /**
* Get the dependency info
*
* @return the dependency
Modified: projects/jboss-deployers/trunk/deployers-structure-spi/src/main/java/org/jboss/deployers/structure/spi/helpers/AbstractDeploymentContext.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-structure-spi/src/main/java/org/jboss/deployers/structure/spi/helpers/AbstractDeploymentContext.java 2009-03-05 17:44:58 UTC (rev 85311)
+++ projects/jboss-deployers/trunk/deployers-structure-spi/src/main/java/org/jboss/deployers/structure/spi/helpers/AbstractDeploymentContext.java 2009-03-05 17:46:51 UTC (rev 85312)
@@ -44,9 +44,11 @@
import org.jboss.classloading.spi.RealClassLoader;
import org.jboss.dependency.spi.ControllerContext;
import org.jboss.dependency.spi.DependencyInfo;
+import org.jboss.dependency.spi.ControllerState;
import org.jboss.deployers.client.spi.Deployment;
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.DeploymentState;
+import org.jboss.deployers.spi.deployer.DeploymentStage;
import org.jboss.deployers.spi.attachments.Attachments;
import org.jboss.deployers.spi.attachments.MutableAttachments;
import org.jboss.deployers.spi.attachments.helpers.ManagedObjectsWithTransientAttachmentsImpl;
@@ -770,6 +772,23 @@
}
}
+ public void setRequiredStage(DeploymentStage stage)
+ {
+ ControllerContext controllerContext = getTransientAttachments().getAttachment(ControllerContext.class);
+ if (controllerContext != null)
+ {
+ controllerContext.setRequiredState(new ControllerState(stage.getName()));
+ }
+ else
+ {
+ DeploymentContext parent = getParent();
+ if (parent == null)
+ throw new IllegalStateException("Deployment ControllerContext has not been set");
+
+ parent.setRequiredStage(stage);
+ }
+ }
+
public DependencyInfo getDependencyInfo()
{
ControllerContext controllerContext = getTransientAttachments().getAttachment(ControllerContext.class);
Modified: projects/jboss-deployers/trunk/deployers-structure-spi/src/main/java/org/jboss/deployers/structure/spi/helpers/AbstractDeploymentUnit.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-structure-spi/src/main/java/org/jboss/deployers/structure/spi/helpers/AbstractDeploymentUnit.java 2009-03-05 17:44:58 UTC (rev 85311)
+++ projects/jboss-deployers/trunk/deployers-structure-spi/src/main/java/org/jboss/deployers/structure/spi/helpers/AbstractDeploymentUnit.java 2009-03-05 17:46:51 UTC (rev 85312)
@@ -36,6 +36,7 @@
import org.jboss.dependency.spi.DependencyItem;
import org.jboss.deployers.client.spi.main.MainDeployer;
import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStage;
import org.jboss.deployers.spi.attachments.MutableAttachments;
import org.jboss.deployers.spi.attachments.helpers.AbstractMutableAttachments;
import org.jboss.deployers.structure.spi.ClassLoaderFactory;
@@ -467,6 +468,11 @@
return getDeploymentContext().getControllerContextName();
}
+ public void setRequiredStage(DeploymentStage stage)
+ {
+ getDeploymentContext().setRequiredStage(stage);
+ }
+
public DependencyInfo getDependencyInfo()
{
return getDeploymentContext().getDependencyInfo();
Modified: projects/jboss-deployers/trunk/deployers-structure-spi/src/main/java/org/jboss/deployers/structure/spi/helpers/ComponentDeploymentContext.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-structure-spi/src/main/java/org/jboss/deployers/structure/spi/helpers/ComponentDeploymentContext.java 2009-03-05 17:44:58 UTC (rev 85311)
+++ projects/jboss-deployers/trunk/deployers-structure-spi/src/main/java/org/jboss/deployers/structure/spi/helpers/ComponentDeploymentContext.java 2009-03-05 17:46:51 UTC (rev 85312)
@@ -40,6 +40,7 @@
import org.jboss.deployers.client.spi.Deployment;
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.DeploymentState;
+import org.jboss.deployers.spi.deployer.DeploymentStage;
import org.jboss.deployers.spi.attachments.Attachments;
import org.jboss.deployers.spi.attachments.AttachmentsFactory;
import org.jboss.deployers.spi.attachments.MutableAttachments;
@@ -428,6 +429,11 @@
return parent.getControllerContextName();
}
+ public void setRequiredStage(DeploymentStage stage)
+ {
+ parent.setRequiredStage(stage);
+ }
+
public DependencyInfo getDependencyInfo()
{
return parent.getDependencyInfo();
More information about the jboss-cvs-commits
mailing list