[jboss-cvs] JBossAS SVN: r88962 - in projects/integration/trunk: jboss-corba-ots-spi and 5 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri May 15 16:58:38 EDT 2009
Author: scott.stark at jboss.org
Date: 2009-05-15 16:58:38 -0400 (Fri, 15 May 2009)
New Revision: 88962
Added:
projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/ContextStateMapper.java
Modified:
projects/integration/trunk/jboss-classloading-spi/.classpath
projects/integration/trunk/jboss-classloading-spi/.project
projects/integration/trunk/jboss-corba-ots-spi/.classpath
projects/integration/trunk/jboss-corba-ots-spi/.project
projects/integration/trunk/jboss-deployment-spi/.project
projects/integration/trunk/jboss-jca-spi/.classpath
projects/integration/trunk/jboss-jca-spi/.project
projects/integration/trunk/jboss-profileservice-spi/.classpath
projects/integration/trunk/jboss-profileservice-spi/.project
projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/RuntimeComponentDispatcher.java
projects/integration/trunk/jboss-transaction-spi/.classpath
projects/integration/trunk/jboss-transaction-spi/.project
Log:
JBAS-6927, add a mapControllerState method
Modified: projects/integration/trunk/jboss-classloading-spi/.classpath
===================================================================
--- projects/integration/trunk/jboss-classloading-spi/.classpath 2009-05-15 20:57:16 UTC (rev 88961)
+++ projects/integration/trunk/jboss-classloading-spi/.classpath 2009-05-15 20:58:38 UTC (rev 88962)
@@ -2,6 +2,6 @@
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="output" path="target/classes"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.8.GA/jboss-common-core-2.2.8.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-common-core/2.2.8.GA/jboss-common-core-2.2.8.GA-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.11.GA/jboss-common-core-2.2.11.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-common-core/2.2.11.GA/jboss-common-core-2.2.11.GA-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA-sources.jar"/>
</classpath>
\ No newline at end of file
Modified: projects/integration/trunk/jboss-classloading-spi/.project
===================================================================
--- projects/integration/trunk/jboss-classloading-spi/.project 2009-05-15 20:57:16 UTC (rev 88961)
+++ projects/integration/trunk/jboss-classloading-spi/.project 2009-05-15 20:58:38 UTC (rev 88962)
@@ -1,6 +1,6 @@
<projectDescription>
<name>jboss-classloading-spi</name>
- <comment>The Java ClassLoading 5.0.0 SPI classes</comment>
+ <comment>The Java ClassLoading 6.0.0 SPI classes</comment>
<projects/>
<buildSpec>
<buildCommand>
Modified: projects/integration/trunk/jboss-corba-ots-spi/.classpath
===================================================================
--- projects/integration/trunk/jboss-corba-ots-spi/.classpath 2009-05-15 20:57:16 UTC (rev 88961)
+++ projects/integration/trunk/jboss-corba-ots-spi/.classpath 2009-05-15 20:58:38 UTC (rev 88962)
@@ -3,5 +3,5 @@
<classpathentry kind="output" path="target/classes"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="M2_REPO/jacorb/jacorb/2.3.0jboss.patch5-brew/jacorb-2.3.0jboss.patch5-brew.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-transaction-api/1.0.1.CR2/jboss-transaction-api-1.0.1.CR2.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-transaction-api/1.0.1.CR2/jboss-transaction-api-1.0.1.CR2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-transaction-api/1.0.1.GA/jboss-transaction-api-1.0.1.GA.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-transaction-api/1.0.1.GA/jboss-transaction-api-1.0.1.GA-sources.jar"/>
</classpath>
\ No newline at end of file
Modified: projects/integration/trunk/jboss-corba-ots-spi/.project
===================================================================
--- projects/integration/trunk/jboss-corba-ots-spi/.project 2009-05-15 20:57:16 UTC (rev 88961)
+++ projects/integration/trunk/jboss-corba-ots-spi/.project 2009-05-15 20:58:38 UTC (rev 88962)
@@ -1,6 +1,6 @@
<projectDescription>
<name>jboss-corba-ots-spi</name>
- <comment>SPI to be implemented by CORBA OTS providers for JBoss 5.0.0</comment>
+ <comment>SPI to be implemented by CORBA OTS providers for JBoss 6.0.0</comment>
<projects/>
<buildSpec>
<buildCommand>
Modified: projects/integration/trunk/jboss-deployment-spi/.project
===================================================================
--- projects/integration/trunk/jboss-deployment-spi/.project 2009-05-15 20:57:16 UTC (rev 88961)
+++ projects/integration/trunk/jboss-deployment-spi/.project 2009-05-15 20:58:38 UTC (rev 88962)
@@ -1,6 +1,6 @@
<projectDescription>
<name>jboss-deployment-spi</name>
- <comment>The JBossAS Deployment 5.0.0 SPI classes</comment>
+ <comment>The JBossAS Deployment 6.0.0 SPI classes</comment>
<projects/>
<buildSpec>
<buildCommand>
Modified: projects/integration/trunk/jboss-jca-spi/.classpath
===================================================================
--- projects/integration/trunk/jboss-jca-spi/.classpath 2009-05-15 20:57:16 UTC (rev 88961)
+++ projects/integration/trunk/jboss-jca-spi/.classpath 2009-05-15 20:58:38 UTC (rev 88962)
@@ -2,8 +2,18 @@
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="output" path="target/classes"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop-jdk50-client/2.0.0.CR16/jboss-aop-jdk50-client-2.0.0.CR16.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.8.GA/jboss-common-core-2.2.8.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-common-core/2.2.8.GA/jboss-common-core-2.2.8.GA-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jca-api/1.5.0.CR2/jboss-jca-api-1.5.0.CR2.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-jca-api/1.5.0.CR2/jboss-jca-api-1.5.0.CR2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant/1.7.0/ant-1.7.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javassist/javassist/3.9.0.GA/javassist-3.9.0.GA.jar" sourcepath="M2_REPO/javassist/javassist/3.9.0.GA/javassist-3.9.0.GA-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop/2.0.0.SP1/jboss-aop-2.0.0.SP1-client.jar" sourcepath="M2_REPO/org/jboss/aop/jboss-aop/2.0.0.SP1/jboss-aop-2.0.0.SP1-client-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.11.GA/jboss-common-core-2.2.11.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-common-core/2.2.11.GA/jboss-common-core-2.2.11.GA-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jca-api/1.5.0.GA/jboss-jca-api-1.5.0.GA.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-jca-api/1.5.0.GA/jboss-jca-api-1.5.0.GA-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.0.5.GA/jboss-logging-log4j-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.0.5.GA/jboss-logging-log4j-2.0.5.GA-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-mdr/2.0.0.GA/jboss-mdr-2.0.0.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-mdr/2.0.0.GA/jboss-mdr-2.0.0.GA-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-reflect/2.0.2.GA/jboss-reflect-2.0.2.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-reflect/2.0.2.GA/jboss-reflect-2.0.2.GA-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/qdox/qdox/1.6.1/qdox-1.6.1.jar" sourcepath="M2_REPO/qdox/qdox/1.6.1/qdox-1.6.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/trove/trove/2.1.1/trove-2.1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/apache-xerces/xml-apis/2.9.1/xml-apis-2.9.1.jar"/>
</classpath>
\ No newline at end of file
Modified: projects/integration/trunk/jboss-jca-spi/.project
===================================================================
--- projects/integration/trunk/jboss-jca-spi/.project 2009-05-15 20:57:16 UTC (rev 88961)
+++ projects/integration/trunk/jboss-jca-spi/.project 2009-05-15 20:58:38 UTC (rev 88962)
@@ -1,6 +1,6 @@
<projectDescription>
<name>jboss-jca-spi</name>
- <comment>The JBoss JCA 5.0.0 SPI classes</comment>
+ <comment>The JBoss JCA 6.0.0 SPI classes</comment>
<projects/>
<buildSpec>
<buildCommand>
Modified: projects/integration/trunk/jboss-profileservice-spi/.classpath
===================================================================
--- projects/integration/trunk/jboss-profileservice-spi/.classpath 2009-05-15 20:57:16 UTC (rev 88961)
+++ projects/integration/trunk/jboss-profileservice-spi/.classpath 2009-05-15 20:58:38 UTC (rev 88962)
@@ -5,24 +5,15 @@
<classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1.1/activation-1.1.1.jar"/>
<classpathentry kind="var" path="M2_REPO/wutka-dtdparser/dtdparser121/1.2.1/dtdparser121-1.2.1.jar"/>
<classpathentry kind="var" path="M2_REPO/sun-jaxb/jaxb-api/2.1.4/jaxb-api-2.1.4.jar" sourcepath="M2_REPO/sun-jaxb/jaxb-api/2.1.4/jaxb-api-2.1.4-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloader/2.0.0.CR5/jboss-classloader-2.0.0.CR5.jar" sourcepath="M2_REPO/org/jboss/cl/jboss-classloader/2.0.0.CR5/jboss-classloader-2.0.0.CR5-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloading/2.0.0.CR5/jboss-classloading-2.0.0.CR5.jar" sourcepath="M2_REPO/org/jboss/cl/jboss-classloading/2.0.0.CR5/jboss-classloading-2.0.0.CR5-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-classloading-spi/5.0.0.CR2/jboss-classloading-spi-5.0.0.CR2.jar" sourcepath="M2_REPO/org/jboss/integration/jboss-classloading-spi/5.0.0.CR2/jboss-classloading-spi-5.0.0.CR2-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.8.GA/jboss-common-core-2.2.8.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-common-core/2.2.8.GA/jboss-common-core-2.2.8.GA-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-dependency/2.0.0.CR4/jboss-dependency-2.0.0.CR4.jar" sourcepath="M2_REPO/org/jboss/microcontainer/jboss-dependency/2.0.0.CR4/jboss-dependency-2.0.0.CR4-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-client-spi/2.0.0.CR5/jboss-deployers-client-spi-2.0.0.CR5.jar" sourcepath="M2_REPO/org/jboss/deployers/jboss-deployers-client-spi/2.0.0.CR5/jboss-deployers-client-spi-2.0.0.CR5-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-core-spi/2.0.0.CR5/jboss-deployers-core-spi-2.0.0.CR5.jar" sourcepath="M2_REPO/org/jboss/deployers/jboss-deployers-core-spi/2.0.0.CR5/jboss-deployers-core-spi-2.0.0.CR5-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-spi/2.0.0.CR5/jboss-deployers-spi-2.0.0.CR5.jar" sourcepath="M2_REPO/org/jboss/deployers/jboss-deployers-spi/2.0.0.CR5/jboss-deployers-spi-2.0.0.CR5-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-structure-spi/2.0.0.CR5/jboss-deployers-structure-spi-2.0.0.CR5.jar" sourcepath="M2_REPO/org/jboss/deployers/jboss-deployers-structure-spi/2.0.0.CR5/jboss-deployers-structure-spi-2.0.0.CR5-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-vfs-spi/2.0.0.CR5/jboss-deployers-vfs-spi-2.0.0.CR5.jar" sourcepath="M2_REPO/org/jboss/deployers/jboss-deployers-vfs-spi/2.0.0.CR5/jboss-deployers-vfs-spi-2.0.0.CR5-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.11.GA/jboss-common-core-2.2.11.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-common-core/2.2.11.GA/jboss-common-core-2.2.11.GA-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-dependency/2.0.4.GA/jboss-dependency-2.0.4.GA.jar" sourcepath="M2_REPO/org/jboss/microcontainer/jboss-dependency/2.0.4.GA/jboss-dependency-2.0.4.GA-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/man/jboss-managed/2.0.0.CR5/jboss-managed-2.0.0.CR5.jar" sourcepath="M2_REPO/org/jboss/man/jboss-managed/2.0.0.CR5/jboss-managed-2.0.0.CR5-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-mdr/2.0.0.GA/jboss-mdr-2.0.0.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-mdr/2.0.0.GA/jboss-mdr-2.0.0.GA-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/man/jboss-metatype/2.0.0.CR5/jboss-metatype-2.0.0.CR5.jar" sourcepath="M2_REPO/org/jboss/man/jboss-metatype/2.0.0.CR5/jboss-metatype-2.0.0.CR5-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-reflect/2.0.0.CR1/jboss-reflect-2.0.0.CR1.jar" sourcepath="M2_REPO/org/jboss/jboss-reflect/2.0.0.CR1/jboss-reflect-2.0.0.CR1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-vfs/2.0.0.CR5/jboss-vfs-2.0.0.CR5.jar" sourcepath="M2_REPO/org/jboss/jboss-vfs/2.0.0.CR5/jboss-vfs-2.0.0.CR5-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/man/jboss-managed/2.1.0.CR1/jboss-managed-2.1.0.CR1.jar" sourcepath="M2_REPO/org/jboss/man/jboss-managed/2.1.0.CR1/jboss-managed-2.1.0.CR1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-mdr/2.0.1.GA/jboss-mdr-2.0.1.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-mdr/2.0.1.GA/jboss-mdr-2.0.1.GA-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/man/jboss-metatype/2.1.0.CR1/jboss-metatype-2.1.0.CR1.jar" sourcepath="M2_REPO/org/jboss/man/jboss-metatype/2.1.0.CR1/jboss-metatype-2.1.0.CR1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-reflect/2.0.2.GA/jboss-reflect-2.0.2.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-reflect/2.0.2.GA/jboss-reflect-2.0.2.GA-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-vfs/2.1.0.GA/jboss-vfs-2.1.0.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-vfs/2.1.0.GA/jboss-vfs-2.1.0.GA-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/jboss/jbossxb/2.0.0.GA/jbossxb-2.0.0.GA.jar" sourcepath="M2_REPO/org/jboss/jbossxb/2.0.0.GA/jbossxb-2.0.0.GA-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/stax/stax-api/1.0/stax-api-1.0.jar"/>
<classpathentry kind="var" path="M2_REPO/apache-xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"/>
<classpathentry kind="var" path="M2_REPO/apache-xerces/xml-apis/2.9.1/xml-apis-2.9.1.jar"/>
</classpath>
\ No newline at end of file
Modified: projects/integration/trunk/jboss-profileservice-spi/.project
===================================================================
--- projects/integration/trunk/jboss-profileservice-spi/.project 2009-05-15 20:57:16 UTC (rev 88961)
+++ projects/integration/trunk/jboss-profileservice-spi/.project 2009-05-15 20:58:38 UTC (rev 88962)
@@ -1,6 +1,6 @@
<projectDescription>
<name>jboss-profileservice-spi</name>
- <comment>The Java ProfileService 5.0.0 SPI classes</comment>
+ <comment>The Java ProfileService 6.0.0 SPI classes</comment>
<projects/>
<buildSpec>
<buildCommand>
Copied: projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/ContextStateMapper.java (from rev 88961, projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/ContextStateMapper.java)
===================================================================
--- projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/ContextStateMapper.java (rev 0)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/ContextStateMapper.java 2009-05-15 20:58:38 UTC (rev 88962)
@@ -0,0 +1,93 @@
+/*
+ * 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.management;
+
+import java.util.Map;
+
+import org.jboss.dependency.spi.ControllerState;
+
+/**
+ * Basic state mapper.
+ *
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class ContextStateMapper<T extends Enum<?>>
+{
+
+ /** The state mappings. */
+ private Map<String, T> mappings;
+
+ /** Installing state. */
+ private T installState;
+
+ /** Uninstalling state. */
+ private T uninstallState;
+
+ /** The unknown state. */
+ private T unknown;
+
+ /** The error state. */
+ private T error;
+
+ public ContextStateMapper(Map<String, T> mappings,
+ T installState, T uninstallState, T error, T unknown)
+ {
+ this.mappings = mappings;
+ this.installState = installState;
+ this.uninstallState = uninstallState;
+ this.error = error;
+ this.unknown = unknown;
+ }
+
+ public T getErrorState()
+ {
+ return this.error;
+ }
+
+ public T map(ControllerState currentState, ControllerState toState)
+ {
+ // If the context is in the required state
+ if(toState == null || currentState.equals(toState))
+ return getMapping(currentState);
+ // The error state
+ if(ControllerState.ERROR.equals(currentState))
+ return error;
+ // installing state
+ if(ControllerState.INSTALLED.equals(toState))
+ return installState;
+ // uninstalling state
+ if(ControllerState.NOT_INSTALLED.equals(toState))
+ return uninstallState;
+ // Fallback
+ return getMapping(currentState);
+ }
+
+ protected T getMapping(ControllerState controllerState)
+ {
+ T state = unknown;
+ if(controllerState != null)
+ state = mappings.get(controllerState.getStateString());
+ return state;
+ }
+
+}
Modified: projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/RuntimeComponentDispatcher.java
===================================================================
--- projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/RuntimeComponentDispatcher.java 2009-05-15 20:57:16 UTC (rev 88961)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/RuntimeComponentDispatcher.java 2009-05-15 20:58:38 UTC (rev 88962)
@@ -60,4 +60,15 @@
* @return runtime component's return value
*/
Object invoke(Object componentName, String methodName, MetaValue... param);
+
+ /**
+ * Map the state of the component.
+ *
+ * @param <T> the state enum
+ * @param name the component name
+ * @param mapper the state mapper
+ * @return the mapped state
+ */
+ <T extends Enum<?>> T mapControllerState(Object name, ContextStateMapper<T> mapper);
+
}
Modified: projects/integration/trunk/jboss-transaction-spi/.classpath
===================================================================
--- projects/integration/trunk/jboss-transaction-spi/.classpath 2009-05-15 20:57:16 UTC (rev 88961)
+++ projects/integration/trunk/jboss-transaction-spi/.classpath 2009-05-15 20:58:38 UTC (rev 88962)
@@ -2,8 +2,8 @@
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="output" path="target/classes"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.8.GA/jboss-common-core-2.2.8.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-common-core/2.2.8.GA/jboss-common-core-2.2.8.GA-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jca-api/1.5.0.CR2/jboss-jca-api-1.5.0.CR2.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-jca-api/1.5.0.CR2/jboss-jca-api-1.5.0.CR2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.11.GA/jboss-common-core-2.2.11.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-common-core/2.2.11.GA/jboss-common-core-2.2.11.GA-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jca-api/1.5.0.GA/jboss-jca-api-1.5.0.GA.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-jca-api/1.5.0.GA/jboss-jca-api-1.5.0.GA-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-transaction-api/1.0.1.CR2/jboss-transaction-api-1.0.1.CR2.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-transaction-api/1.0.1.CR2/jboss-transaction-api-1.0.1.CR2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-transaction-api/1.0.1.GA/jboss-transaction-api-1.0.1.GA.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-transaction-api/1.0.1.GA/jboss-transaction-api-1.0.1.GA-sources.jar"/>
</classpath>
\ No newline at end of file
Modified: projects/integration/trunk/jboss-transaction-spi/.project
===================================================================
--- projects/integration/trunk/jboss-transaction-spi/.project 2009-05-15 20:57:16 UTC (rev 88961)
+++ projects/integration/trunk/jboss-transaction-spi/.project 2009-05-15 20:58:38 UTC (rev 88962)
@@ -1,6 +1,6 @@
<projectDescription>
<name>jboss-transaction-spi</name>
- <comment>The Java Transaction 5.0.0 SPI classes</comment>
+ <comment>The Java Transaction 6.0.0 SPI classes</comment>
<projects/>
<buildSpec>
<buildCommand>
More information about the jboss-cvs-commits
mailing list