Overlord SVN: r314 - in cdl/trunk/samples: jbossesb and 1 other directory.
by overlord-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2008-09-07 10:17:02 -0400 (Sun, 07 Sep 2008)
New Revision: 314
Added:
cdl/trunk/samples/jbossesb/README.txt
cdl/trunk/samples/jbossesb/brokerage/
cdl/trunk/samples/jbossesb/client/
cdl/trunk/samples/jbossesb/common/
cdl/trunk/samples/jbossesb/purchasing/
cdl/trunk/samples/jbossesb/trailblazer/
Removed:
cdl/trunk/samples/README.txt
cdl/trunk/samples/brokerage/
cdl/trunk/samples/client/
cdl/trunk/samples/common/
cdl/trunk/samples/purchasing/
cdl/trunk/samples/trailblazer/
Log:
* Need to revert the last 3 commits...I mis-understood, it should put them under samples directly for distribution, but not for source code.
Deleted: cdl/trunk/samples/README.txt
===================================================================
--- cdl/trunk/samples/README.txt 2008-09-07 14:15:08 UTC (rev 313)
+++ cdl/trunk/samples/README.txt 2008-09-07 14:17:02 UTC (rev 314)
@@ -1,99 +0,0 @@
-Instructions for examples running:
-=================================
-
-Required to run the Purchasing example:
----------------------------------------
-- ANT 1.6.5 or higher
-- Maven 2.0.8 or higher
-- JBoss AS 4.2.2.GA or higher with the JBoss ESB SAR deployment (jbossesb.sar).
-- JBossESB 4.3.GA
-
-Folders structure:
--------------------
-- client: It is for running examples' client.
-- broker: Broker participant. (Broker Example)
-- purchasing: Purchasing participant. (Purchase Example)
-- creditAgency: CredityAgency participant. (For both Broker and Purchase Example)
-- supplier: supplier participant. (For Broker example)
-
-Settings required to edit before running:
-========================================
-
-File: $samples/pom.xml
-- Update the "deploy.dir" property value to your JBossAS server directory.
-
-- Before jbossesb-rosetta.jar and jbossesb-config-model.jar get published in jboss maven repository, you need to install these two artifacts into
-your local repository by using following commands:
-
-mvn install:install-file -Dfile=<path-to-rosetta> -DgroupId=org.jboss.jbossesb
- -DartifactId=rosetta -Dversion=4.3 -Dpackaging=jar
-mvn install:install-file -Dfile=<path-to-configmodel> -DgroupId=org.jboss.jbossesb
- -DartifactId=config-model -Dversion=1.0.1 -Dpackaging=jar
-
-Notice: Here we are using jbossesb-rosetta 4.3 version, jbossesb-config-model 1.0.1 version.
-
-
-Instructions for deploying the cdl-jbossesb.esb to the JBoss ESB server.
-==========================================
-1. At the $cdl/trunk: run: mvn install.
-2. Copy the 'cdl-jbossesb.esb' from the 'assembly/jbossesb/target' to JBoss ESB server deploy folder.
-
-
-Instructions for deploying samples:
-==========================================
-1. Please make sure you are setting the 'deploy.dir' in $samples/pom.xml properly.
-2. At the $cdl/trunk/samples, run: mvn install, it will deploy the 'purchasing.esb', 'broker.esb', 'creditAgency.esb', 'supplier.esb' to the server deploy folder.
-3. From the $JBossAS, execute the command to start the ESB server: "bin/run.sh", or "bin/run.bat" for windows.
-
-Instructions for running purchasing example:
-===========================================
-
-1 - from the $samples/jbossesb/client, execute the command to run the client: "ant runClient"
- You will see following in the console.
-
- [java] =========================================
- [java] Request: <BuyRequest id="5" ></BuyRequest>
- [java] Reply: <BuyResponse id="5"></BuyResponse>
- [java] =========================================
-
-
-Instructions for running broker example:
-=======================================
-
-1 - from the $samples/jbossesb/client, execute the command to run the client: "ant runBrokerClient"
- You will see following in the console.
- [java] =========================================
- [java] Request: <enquiry id="20" ></enquiry>
- [java] Reply: <quoteList id="20"><quote supplierDesc="{http://www.jboss.org/overlord/loanBroker}Supplier1">10</quote></quoteList>
- [java] Sending Buy request to Broker...
- [java] Request: <buy id="20" supplierDesc="{http://www.jboss.org/overlord/loanBroker}Supplier1" quoteValue="10"></buy>
- [java] Reply: <bookingReference id="20" supplierDesc = "{http://www.jboss.org/overlord/loanBroker}Supplier1">The quote of 10 has been confirmed.</bookingReference>
- [java] =========================================
-
-Example scenario description:
-===============================
-1 - Purchasing example:
-------------
-The flow for this example would be:
-
- * Users send an 'buy' request to broker
- * Broker send a 'credit check' request to the credit agency.
- * If the credit agency returns a successful message, then the Broker will send a 'BuyResponse' to user.
- * If the credit agency returns a failed message, then the Broker will send a 'BuyFail' to user.
-
-
-2 - Broker example:
-----------
-
-The flow for this example would be:
-
- * Users send an 'enquiry' request to broker
- * Broker sends the request to one or more suppliers concurrently
- * When all of the quote responses have been received, or a timeout expires, the available information is returned to the user.
- * User decides whether to:
- o Cancel the transaction, or
- o Send a 'buy' request to the broker
- * If a 'buy' request is received by the broker, it will send a 'credit check' request to the credit agency
- * If the credit agency returns a successful message, then the Broker sends a 'buy' request to the supplier selected by the User (in the 'buy' request), followed by a confirmation back to the User
- * If the credit agency returns a failed message, then the Broker will inform the User
-
Copied: cdl/trunk/samples/jbossesb/README.txt (from rev 311, cdl/trunk/samples/README.txt)
===================================================================
--- cdl/trunk/samples/jbossesb/README.txt (rev 0)
+++ cdl/trunk/samples/jbossesb/README.txt 2008-09-07 14:17:02 UTC (rev 314)
@@ -0,0 +1,99 @@
+Instructions for examples running:
+=================================
+
+Required to run the Purchasing example:
+---------------------------------------
+- ANT 1.6.5 or higher
+- Maven 2.0.8 or higher
+- JBoss AS 4.2.2.GA or higher with the JBoss ESB SAR deployment (jbossesb.sar).
+- JBossESB 4.3.GA
+
+Folders structure:
+-------------------
+- client: It is for running examples' client.
+- broker: Broker participant. (Broker Example)
+- purchasing: Purchasing participant. (Purchase Example)
+- creditAgency: CredityAgency participant. (For both Broker and Purchase Example)
+- supplier: supplier participant. (For Broker example)
+
+Settings required to edit before running:
+========================================
+
+File: $samples/pom.xml
+- Update the "deploy.dir" property value to your JBossAS server directory.
+
+- Before jbossesb-rosetta.jar and jbossesb-config-model.jar get published in jboss maven repository, you need to install these two artifacts into
+your local repository by using following commands:
+
+mvn install:install-file -Dfile=<path-to-rosetta> -DgroupId=org.jboss.jbossesb
+ -DartifactId=rosetta -Dversion=4.3 -Dpackaging=jar
+mvn install:install-file -Dfile=<path-to-configmodel> -DgroupId=org.jboss.jbossesb
+ -DartifactId=config-model -Dversion=1.0.1 -Dpackaging=jar
+
+Notice: Here we are using jbossesb-rosetta 4.3 version, jbossesb-config-model 1.0.1 version.
+
+
+Instructions for deploying the cdl-jbossesb.esb to the JBoss ESB server.
+==========================================
+1. At the $cdl/trunk: run: mvn install.
+2. Copy the 'cdl-jbossesb.esb' from the 'assembly/jbossesb/target' to JBoss ESB server deploy folder.
+
+
+Instructions for deploying samples:
+==========================================
+1. Please make sure you are setting the 'deploy.dir' in $samples/pom.xml properly.
+2. At the $cdl/trunk/samples, run: mvn install, it will deploy the 'purchasing.esb', 'broker.esb', 'creditAgency.esb', 'supplier.esb' to the server deploy folder.
+3. From the $JBossAS, execute the command to start the ESB server: "bin/run.sh", or "bin/run.bat" for windows.
+
+Instructions for running purchasing example:
+===========================================
+
+1 - from the $samples/jbossesb/client, execute the command to run the client: "ant runClient"
+ You will see following in the console.
+
+ [java] =========================================
+ [java] Request: <BuyRequest id="5" ></BuyRequest>
+ [java] Reply: <BuyResponse id="5"></BuyResponse>
+ [java] =========================================
+
+
+Instructions for running broker example:
+=======================================
+
+1 - from the $samples/jbossesb/client, execute the command to run the client: "ant runBrokerClient"
+ You will see following in the console.
+ [java] =========================================
+ [java] Request: <enquiry id="20" ></enquiry>
+ [java] Reply: <quoteList id="20"><quote supplierDesc="{http://www.jboss.org/overlord/loanBroker}Supplier1">10</quote></quoteList>
+ [java] Sending Buy request to Broker...
+ [java] Request: <buy id="20" supplierDesc="{http://www.jboss.org/overlord/loanBroker}Supplier1" quoteValue="10"></buy>
+ [java] Reply: <bookingReference id="20" supplierDesc = "{http://www.jboss.org/overlord/loanBroker}Supplier1">The quote of 10 has been confirmed.</bookingReference>
+ [java] =========================================
+
+Example scenario description:
+===============================
+1 - Purchasing example:
+------------
+The flow for this example would be:
+
+ * Users send an 'buy' request to broker
+ * Broker send a 'credit check' request to the credit agency.
+ * If the credit agency returns a successful message, then the Broker will send a 'BuyResponse' to user.
+ * If the credit agency returns a failed message, then the Broker will send a 'BuyFail' to user.
+
+
+2 - Broker example:
+----------
+
+The flow for this example would be:
+
+ * Users send an 'enquiry' request to broker
+ * Broker sends the request to one or more suppliers concurrently
+ * When all of the quote responses have been received, or a timeout expires, the available information is returned to the user.
+ * User decides whether to:
+ o Cancel the transaction, or
+ o Send a 'buy' request to the broker
+ * If a 'buy' request is received by the broker, it will send a 'credit check' request to the credit agency
+ * If the credit agency returns a successful message, then the Broker sends a 'buy' request to the supplier selected by the User (in the 'buy' request), followed by a confirmation back to the User
+ * If the credit agency returns a failed message, then the Broker will inform the User
+
Copied: cdl/trunk/samples/jbossesb/brokerage (from rev 311, cdl/trunk/samples/brokerage)
Copied: cdl/trunk/samples/jbossesb/client (from rev 311, cdl/trunk/samples/client)
Copied: cdl/trunk/samples/jbossesb/common (from rev 311, cdl/trunk/samples/common)
Copied: cdl/trunk/samples/jbossesb/purchasing (from rev 311, cdl/trunk/samples/purchasing)
Copied: cdl/trunk/samples/jbossesb/trailblazer (from rev 311, cdl/trunk/samples/trailblazer)
15 years, 8 months
Overlord SVN: r313 - cdl/trunk/samples.
by overlord-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2008-09-07 10:15:08 -0400 (Sun, 07 Sep 2008)
New Revision: 313
Added:
cdl/trunk/samples/jbossesb/
Modified:
cdl/trunk/samples/pom.xml
Log:
* Need to revert the last 3 commits...I mis-understood, it should put them under samples directly for distribution, but not for source code.
Modified: cdl/trunk/samples/pom.xml
===================================================================
--- cdl/trunk/samples/pom.xml 2008-09-07 13:23:44 UTC (rev 312)
+++ cdl/trunk/samples/pom.xml 2008-09-07 14:15:08 UTC (rev 313)
@@ -21,10 +21,10 @@
<modules>
- <module>jbossesb/purchasing</module>
- <module>jbossesb/creditAgency</module>
- <module>jbossesb/supplier</module>
- <module>jbossesb/broker</module>
+ <module>purchasing/store</module>
+ <module>common/creditAgency</module>
+ <module>brokerage/broker</module>
+ <module>brokerage/supplier</module>
</modules>
<build>
15 years, 8 months
Overlord SVN: r312 - cdl/trunk/samples.
by overlord-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2008-09-07 09:23:44 -0400 (Sun, 07 Sep 2008)
New Revision: 312
Removed:
cdl/trunk/samples/jbossesb/
Log:
15 years, 8 months
Overlord SVN: r311 - in cdl/trunk/samples: jbossesb and 1 other directory.
by overlord-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2008-09-07 09:22:19 -0400 (Sun, 07 Sep 2008)
New Revision: 311
Added:
cdl/trunk/samples/README.txt
cdl/trunk/samples/brokerage/
cdl/trunk/samples/client/
cdl/trunk/samples/common/
cdl/trunk/samples/purchasing/
cdl/trunk/samples/trailblazer/
Removed:
cdl/trunk/samples/jbossesb/README.txt
cdl/trunk/samples/jbossesb/brokerage/
cdl/trunk/samples/jbossesb/client/
cdl/trunk/samples/jbossesb/common/
cdl/trunk/samples/jbossesb/purchasing/
cdl/trunk/samples/jbossesb/trailblazer/
Log:
* Remove the jbossesb folder.
Copied: cdl/trunk/samples/README.txt (from rev 307, cdl/trunk/samples/jbossesb/README.txt)
===================================================================
--- cdl/trunk/samples/README.txt (rev 0)
+++ cdl/trunk/samples/README.txt 2008-09-07 13:22:19 UTC (rev 311)
@@ -0,0 +1,99 @@
+Instructions for examples running:
+=================================
+
+Required to run the Purchasing example:
+---------------------------------------
+- ANT 1.6.5 or higher
+- Maven 2.0.8 or higher
+- JBoss AS 4.2.2.GA or higher with the JBoss ESB SAR deployment (jbossesb.sar).
+- JBossESB 4.3.GA
+
+Folders structure:
+-------------------
+- client: It is for running examples' client.
+- broker: Broker participant. (Broker Example)
+- purchasing: Purchasing participant. (Purchase Example)
+- creditAgency: CredityAgency participant. (For both Broker and Purchase Example)
+- supplier: supplier participant. (For Broker example)
+
+Settings required to edit before running:
+========================================
+
+File: $samples/pom.xml
+- Update the "deploy.dir" property value to your JBossAS server directory.
+
+- Before jbossesb-rosetta.jar and jbossesb-config-model.jar get published in jboss maven repository, you need to install these two artifacts into
+your local repository by using following commands:
+
+mvn install:install-file -Dfile=<path-to-rosetta> -DgroupId=org.jboss.jbossesb
+ -DartifactId=rosetta -Dversion=4.3 -Dpackaging=jar
+mvn install:install-file -Dfile=<path-to-configmodel> -DgroupId=org.jboss.jbossesb
+ -DartifactId=config-model -Dversion=1.0.1 -Dpackaging=jar
+
+Notice: Here we are using jbossesb-rosetta 4.3 version, jbossesb-config-model 1.0.1 version.
+
+
+Instructions for deploying the cdl-jbossesb.esb to the JBoss ESB server.
+==========================================
+1. At the $cdl/trunk: run: mvn install.
+2. Copy the 'cdl-jbossesb.esb' from the 'assembly/jbossesb/target' to JBoss ESB server deploy folder.
+
+
+Instructions for deploying samples:
+==========================================
+1. Please make sure you are setting the 'deploy.dir' in $samples/pom.xml properly.
+2. At the $cdl/trunk/samples, run: mvn install, it will deploy the 'purchasing.esb', 'broker.esb', 'creditAgency.esb', 'supplier.esb' to the server deploy folder.
+3. From the $JBossAS, execute the command to start the ESB server: "bin/run.sh", or "bin/run.bat" for windows.
+
+Instructions for running purchasing example:
+===========================================
+
+1 - from the $samples/jbossesb/client, execute the command to run the client: "ant runClient"
+ You will see following in the console.
+
+ [java] =========================================
+ [java] Request: <BuyRequest id="5" ></BuyRequest>
+ [java] Reply: <BuyResponse id="5"></BuyResponse>
+ [java] =========================================
+
+
+Instructions for running broker example:
+=======================================
+
+1 - from the $samples/jbossesb/client, execute the command to run the client: "ant runBrokerClient"
+ You will see following in the console.
+ [java] =========================================
+ [java] Request: <enquiry id="20" ></enquiry>
+ [java] Reply: <quoteList id="20"><quote supplierDesc="{http://www.jboss.org/overlord/loanBroker}Supplier1">10</quote></quoteList>
+ [java] Sending Buy request to Broker...
+ [java] Request: <buy id="20" supplierDesc="{http://www.jboss.org/overlord/loanBroker}Supplier1" quoteValue="10"></buy>
+ [java] Reply: <bookingReference id="20" supplierDesc = "{http://www.jboss.org/overlord/loanBroker}Supplier1">The quote of 10 has been confirmed.</bookingReference>
+ [java] =========================================
+
+Example scenario description:
+===============================
+1 - Purchasing example:
+------------
+The flow for this example would be:
+
+ * Users send an 'buy' request to broker
+ * Broker send a 'credit check' request to the credit agency.
+ * If the credit agency returns a successful message, then the Broker will send a 'BuyResponse' to user.
+ * If the credit agency returns a failed message, then the Broker will send a 'BuyFail' to user.
+
+
+2 - Broker example:
+----------
+
+The flow for this example would be:
+
+ * Users send an 'enquiry' request to broker
+ * Broker sends the request to one or more suppliers concurrently
+ * When all of the quote responses have been received, or a timeout expires, the available information is returned to the user.
+ * User decides whether to:
+ o Cancel the transaction, or
+ o Send a 'buy' request to the broker
+ * If a 'buy' request is received by the broker, it will send a 'credit check' request to the credit agency
+ * If the credit agency returns a successful message, then the Broker sends a 'buy' request to the supplier selected by the User (in the 'buy' request), followed by a confirmation back to the User
+ * If the credit agency returns a failed message, then the Broker will inform the User
+
Copied: cdl/trunk/samples/brokerage (from rev 307, cdl/trunk/samples/jbossesb/brokerage)
Copied: cdl/trunk/samples/client (from rev 307, cdl/trunk/samples/jbossesb/client)
Copied: cdl/trunk/samples/common (from rev 307, cdl/trunk/samples/jbossesb/common)
Deleted: cdl/trunk/samples/jbossesb/README.txt
===================================================================
--- cdl/trunk/samples/jbossesb/README.txt 2008-09-07 07:34:23 UTC (rev 310)
+++ cdl/trunk/samples/jbossesb/README.txt 2008-09-07 13:22:19 UTC (rev 311)
@@ -1,99 +0,0 @@
-Instructions for examples running:
-=================================
-
-Required to run the Purchasing example:
----------------------------------------
-- ANT 1.6.5 or higher
-- Maven 2.0.8 or higher
-- JBoss AS 4.2.2.GA or higher with the JBoss ESB SAR deployment (jbossesb.sar).
-- JBossESB 4.3.GA
-
-Folders structure:
--------------------
-- client: It is for running examples' client.
-- broker: Broker participant. (Broker Example)
-- purchasing: Purchasing participant. (Purchase Example)
-- creditAgency: CredityAgency participant. (For both Broker and Purchase Example)
-- supplier: supplier participant. (For Broker example)
-
-Settings required to edit before running:
-========================================
-
-File: $samples/pom.xml
-- Update the "deploy.dir" property value to your JBossAS server directory.
-
-- Before jbossesb-rosetta.jar and jbossesb-config-model.jar get published in jboss maven repository, you need to install these two artifacts into
-your local repository by using following commands:
-
-mvn install:install-file -Dfile=<path-to-rosetta> -DgroupId=org.jboss.jbossesb
- -DartifactId=rosetta -Dversion=4.3 -Dpackaging=jar
-mvn install:install-file -Dfile=<path-to-configmodel> -DgroupId=org.jboss.jbossesb
- -DartifactId=config-model -Dversion=1.0.1 -Dpackaging=jar
-
-Notice: Here we are using jbossesb-rosetta 4.3 version, jbossesb-config-model 1.0.1 version.
-
-
-Instructions for deploying the cdl-jbossesb.esb to the JBoss ESB server.
-==========================================
-1. At the $cdl/trunk: run: mvn install.
-2. Copy the 'cdl-jbossesb.esb' from the 'assembly/jbossesb/target' to JBoss ESB server deploy folder.
-
-
-Instructions for deploying samples:
-==========================================
-1. Please make sure you are setting the 'deploy.dir' in $samples/pom.xml properly.
-2. At the $cdl/trunk/samples, run: mvn install, it will deploy the 'purchasing.esb', 'broker.esb', 'creditAgency.esb', 'supplier.esb' to the server deploy folder.
-3. From the $JBossAS, execute the command to start the ESB server: "bin/run.sh", or "bin/run.bat" for windows.
-
-Instructions for running purchasing example:
-===========================================
-
-1 - from the $samples/jbossesb/client, execute the command to run the client: "ant runClient"
- You will see following in the console.
-
- [java] =========================================
- [java] Request: <BuyRequest id="5" ></BuyRequest>
- [java] Reply: <BuyResponse id="5"></BuyResponse>
- [java] =========================================
-
-
-Instructions for running broker example:
-=======================================
-
-1 - from the $samples/jbossesb/client, execute the command to run the client: "ant runBrokerClient"
- You will see following in the console.
- [java] =========================================
- [java] Request: <enquiry id="20" ></enquiry>
- [java] Reply: <quoteList id="20"><quote supplierDesc="{http://www.jboss.org/overlord/loanBroker}Supplier1">10</quote></quoteList>
- [java] Sending Buy request to Broker...
- [java] Request: <buy id="20" supplierDesc="{http://www.jboss.org/overlord/loanBroker}Supplier1" quoteValue="10"></buy>
- [java] Reply: <bookingReference id="20" supplierDesc = "{http://www.jboss.org/overlord/loanBroker}Supplier1">The quote of 10 has been confirmed.</bookingReference>
- [java] =========================================
-
-Example scenario description:
-===============================
-1 - Purchasing example:
-------------
-The flow for this example would be:
-
- * Users send an 'buy' request to broker
- * Broker send a 'credit check' request to the credit agency.
- * If the credit agency returns a successful message, then the Broker will send a 'BuyResponse' to user.
- * If the credit agency returns a failed message, then the Broker will send a 'BuyFail' to user.
-
-
-2 - Broker example:
-----------
-
-The flow for this example would be:
-
- * Users send an 'enquiry' request to broker
- * Broker sends the request to one or more suppliers concurrently
- * When all of the quote responses have been received, or a timeout expires, the available information is returned to the user.
- * User decides whether to:
- o Cancel the transaction, or
- o Send a 'buy' request to the broker
- * If a 'buy' request is received by the broker, it will send a 'credit check' request to the credit agency
- * If the credit agency returns a successful message, then the Broker sends a 'buy' request to the supplier selected by the User (in the 'buy' request), followed by a confirmation back to the User
- * If the credit agency returns a failed message, then the Broker will inform the User
-
Copied: cdl/trunk/samples/purchasing (from rev 307, cdl/trunk/samples/jbossesb/purchasing)
Copied: cdl/trunk/samples/trailblazer (from rev 307, cdl/trunk/samples/jbossesb/trailblazer)
15 years, 8 months
Overlord SVN: r310 - cdl/trunk/samples/jbossesb.
by overlord-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2008-09-07 03:34:23 -0400 (Sun, 07 Sep 2008)
New Revision: 310
Removed:
cdl/trunk/samples/jbossesb/database/
Log:
* Remove the database folder.
15 years, 8 months
Overlord SVN: r309 - in cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src: java/org/jboss/tools/overlord/cdl/jbossesb/model/actions and 1 other directories.
by overlord-commits@lists.jboss.org
Author: objectiser
Date: 2008-09-06 18:33:14 -0400 (Sat, 06 Sep 2008)
New Revision: 309
Modified:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/DefaultESBLanguageModel.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/DefaultESBService.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/AbstractESBAction.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/CreateSessionAction.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/IfAction.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/MessageRouterAction.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/ParallelAction.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/PerformAction.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/RetrieveSessionAction.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/ScheduleStateAction.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/SendMessageAction.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/SetStateAction.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/SwitchAction.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/WhenAction.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/WhileAction.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/test/org/jboss/tools/overlord/cdl/jbossesb/model/TestModelListener.java
Log:
Update to reflect change in the way errors are reported.
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/DefaultESBLanguageModel.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/DefaultESBLanguageModel.java 2008-09-05 20:12:05 UTC (rev 308)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/DefaultESBLanguageModel.java 2008-09-06 22:33:14 UTC (rev 309)
@@ -629,39 +629,35 @@
m_listener = l;
}
- public void error(ModelObject src, String mesg, java.util.Map<String,Object> props) {
-
- if (props == null) {
- props = new java.util.HashMap<String,Object>();
+ public void error(ModelIssue issue) {
+
+ issue.getProperties().put(ModelListener.RESOLUTIONS, ModelListener.SHOW_REFERENCE_DESCRIPTION_RESOLUTION);
+ issue.getProperties().put(ModelListener.REFERENCE_MODEL, m_source);
+ issue.getProperties().put(ModelListener.REFERENCE_MODEL_START_POSITION,
+ issue.getModelObject().getSource().getStartPosition());
+ issue.getProperties().put(ModelListener.REFERENCE_MODEL_END_POSITION,
+ issue.getModelObject().getSource().getEndPosition());
+ if (issue.getModelObject().getSource().getComponentURI() != null) {
+ issue.getProperties().put(ModelListener.REFERENCE_MODEL_COMPONENT,
+ issue.getModelObject().getSource().getComponentURI());
}
- props.put(ModelListener.RESOLUTIONS, ModelListener.SHOW_REFERENCE_DESCRIPTION_RESOLUTION);
- props.put(ModelListener.REFERENCE_MODEL, m_source);
- props.put(ModelListener.REFERENCE_MODEL_START_POSITION, src.getSource().getStartPosition());
- props.put(ModelListener.REFERENCE_MODEL_END_POSITION, src.getSource().getEndPosition());
- if (src.getSource().getComponentURI() != null) {
- props.put(ModelListener.REFERENCE_MODEL_COMPONENT,
- src.getSource().getComponentURI());
- }
-
- m_listener.error(src, mesg, props);
+ m_listener.error(issue);
}
- public void warning(ModelObject src, String mesg, java.util.Map<String,Object> props) {
- if (props == null) {
- props = new java.util.HashMap<String,Object>();
+ public void warning(ModelIssue issue) {
+ issue.getProperties().put(ModelListener.RESOLUTIONS, ModelListener.SHOW_REFERENCE_DESCRIPTION_RESOLUTION);
+ issue.getProperties().put(ModelListener.REFERENCE_MODEL, m_source);
+ issue.getProperties().put(ModelListener.REFERENCE_MODEL_START_POSITION,
+ issue.getModelObject().getSource().getStartPosition());
+ issue.getProperties().put(ModelListener.REFERENCE_MODEL_END_POSITION,
+ issue.getModelObject().getSource().getEndPosition());
+ if (issue.getModelObject().getSource().getComponentURI() != null) {
+ issue.getProperties().put(ModelListener.REFERENCE_MODEL_COMPONENT,
+ issue.getModelObject().getSource().getComponentURI());
}
- props.put(ModelListener.RESOLUTIONS, ModelListener.SHOW_REFERENCE_DESCRIPTION_RESOLUTION);
- props.put(ModelListener.REFERENCE_MODEL, m_source);
- props.put(ModelListener.REFERENCE_MODEL_START_POSITION, src.getSource().getStartPosition());
- props.put(ModelListener.REFERENCE_MODEL_END_POSITION, src.getSource().getEndPosition());
- if (src.getSource().getComponentURI() != null) {
- props.put(ModelListener.REFERENCE_MODEL_COMPONENT,
- src.getSource().getComponentURI());
- }
-
- m_listener.warning(src, mesg, props);
+ m_listener.warning(issue);
}
private ModelListener m_listener=null;
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/DefaultESBService.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/DefaultESBService.java 2008-09-05 20:12:05 UTC (rev 308)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/DefaultESBService.java 2008-09-06 22:33:14 UTC (rev 309)
@@ -190,11 +190,11 @@
src = (ModelObject)focus;
}
- l.error(src, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(src, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.Messages"),
"_NOT_SPECIFIED_SESSION_CLASS",
- new String[]{}), null);
+ new String[]{})));
}
for (int i=0; i < m_actions.size(); i++) {
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/AbstractESBAction.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/AbstractESBAction.java 2008-09-05 20:12:05 UTC (rev 308)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/AbstractESBAction.java 2008-09-06 22:33:14 UTC (rev 309)
@@ -177,11 +177,11 @@
java.util.Map<String,Object> props=new java.util.HashMap<String,Object>();
props.put(ProblemDefinitions.PROBLEM_PROPERTY,
mandatory.get(i));
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_NOT_SPECIFIED_PROPERTY",
- new String[]{mandatory.get(i)}), props);
+ new String[]{mandatory.get(i)}), props));
}
}
@@ -192,11 +192,11 @@
if (getOptionalProperties().contains(propName) == false &&
getMandatoryProperties().contains(propName) == false) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_UNKNOWN_PROPERTY",
- new String[]{propName}), null);
+ new String[]{propName})));
}
}
@@ -211,11 +211,11 @@
try {
Class.forName(session, true, cl);
} catch(ClassNotFoundException cfne) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.Messages"),
"_NOT_FOUND_BUSINESS_OBJECT_TYPE",
- new String[]{session}), null);
+ new String[]{session})));
}
} catch(Exception e) {
@@ -233,11 +233,11 @@
// unless it is a remote service, so defined in a
// different file
if (link.isRemote() == false) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.Messages"),
"_NOT_FOUND_SERVICE_DESCRIPTOR",
- new String[]{link.getCategory(),link.getName()}), null);
+ new String[]{link.getCategory(),link.getName()})));
}
} else if (getService().getSessionName() != null &&
isPerform() == false && link.isRemote() == false &&
@@ -249,11 +249,11 @@
props.put(ProblemDefinitions.PROBLEM_PROPERTY,
DefaultESBService.BUSINESS_OBJECT_TYPE_PROPERTY);
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_MISMATCH_SESSION_CLASS",
- new String[]{link.getCategory(),link.getName()}), props);
+ new String[]{link.getCategory(),link.getName()}), props));
}
}
}
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/CreateSessionAction.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/CreateSessionAction.java 2008-09-05 20:12:05 UTC (rev 308)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/CreateSessionAction.java 2008-09-06 22:33:14 UTC (rev 309)
@@ -96,32 +96,32 @@
ESBAction act=getService().getActions().get(0);
if (act != this) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_MUST_BE_FIRST_ACTION",
- new String[]{"CreateSession"}), null);
+ new String[]{"CreateSession"})));
}
}
// If service is root, then need to defined conversation type
if (getService().isRoot()) {
if (getService().getConversationType() == null) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_NOT_SPECIFIED_CONVERSATION_TYPE",
- new String[]{}), null);
+ new String[]{})));
} else {
int index=getService().getConversationType().indexOf('@');
String convType=getService().getConversationType().trim();
if (index == -1 || index == convType.length()-1) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_NOT_SPECIFIED_CONVERSATION_TYPE_ROLE",
- new String[]{convType}), null);
+ new String[]{convType})));
}
}
}
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/IfAction.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/IfAction.java 2008-09-05 20:12:05 UTC (rev 308)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/IfAction.java 2008-09-06 22:33:14 UTC (rev 309)
@@ -195,27 +195,27 @@
// Report any errors
if (nl != null && (f_if == false || f_orderWrong)) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_IF_ORDER_WRONG",
- new String[]{}), null);
+ new String[]{})));
}
if (f_serviceDetailsMissing) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_PATH_SERVICE_DETAILS_MISSING",
- new String[]{}), null);
+ new String[]{})));
}
if (f_immediateInvalid) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_BOOLEAN",
- new String[]{IMMEDIATE}), null);
+ new String[]{IMMEDIATE})));
}
}
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/MessageRouterAction.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/MessageRouterAction.java 2008-09-05 20:12:05 UTC (rev 308)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/MessageRouterAction.java 2008-09-06 22:33:14 UTC (rev 309)
@@ -289,11 +289,11 @@
// Check that message router has no other session based
// ESB actions in the same service descriptor
if (getService().isSessionBased()) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_CANNOT_SESSION_BASED_ACTIONS_WITH_ROUTER",
- new String[]{}), null);
+ new String[]{})));
}
// Check that 'initate' services have a 'CreateSessionAction' and
@@ -302,12 +302,12 @@
ESBService service=m_initiateServices.get(i);
if (service.isRoot() == false) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_CANNOT_INITIATE_NON_ROOT",
new String[]{service.getCategory(),
- service.getName()}), null);
+ service.getName()})));
}
}
@@ -317,12 +317,12 @@
ESBService service=m_services.get(i);
if (service.isRoot()) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_MUST_INITIATE_ROOT",
new String[]{service.getCategory(),
- service.getName()}), null);
+ service.getName()})));
}
}
@@ -348,19 +348,19 @@
// Report any errors
if (nl != null && routeCount < 1) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_ROUTER_ONE_OR_MORE_PATHS",
- new String[]{}), null);
+ new String[]{})));
}
if (f_serviceDetailsMissing) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_PATH_SERVICE_DETAILS_MISSING",
- new String[]{}), null);
+ new String[]{})));
}
}
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/ParallelAction.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/ParallelAction.java 2008-09-05 20:12:05 UTC (rev 308)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/ParallelAction.java 2008-09-06 22:33:14 UTC (rev 309)
@@ -184,43 +184,43 @@
// Report any errors
if (nl != null && pathCount < 2) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_PARALLEL_MORE_THAN_TWO_PATHS",
- new String[]{}), null);
+ new String[]{})));
}
if (f_pathAfterJoin) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_PARALLEL_PATH_AFTER_JOIN",
- new String[]{}), null);
+ new String[]{})));
}
if (f_multipleJoins) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_MULTIPLE_JOINS",
- new String[]{}), null);
+ new String[]{})));
}
if (f_serviceDetailsMissing) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_PATH_SERVICE_DETAILS_MISSING",
- new String[]{}), null);
+ new String[]{})));
}
if (f_immediateInvalid) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_BOOLEAN",
- new String[]{IMMEDIATE}), null);
+ new String[]{IMMEDIATE})));
}
}
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/PerformAction.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/PerformAction.java 2008-09-05 20:12:05 UTC (rev 308)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/PerformAction.java 2008-09-06 22:33:14 UTC (rev 309)
@@ -141,11 +141,11 @@
// Check if performed state starts with a create session action
if (m_service != null &&
m_service.isCreateSession() == false) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_NOT_FOUND_PERFORM_CREATE_SESSION",
- new String[]{}), null);
+ new String[]{})));
}
// Check if performed service has relevant bind
@@ -158,20 +158,20 @@
if (PropertyUtil.isProperty(m_service.getSessionClass(),
parentRefProperty) == false) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_NOT_FOUND_VARIABLE",
new String[]{parentRefProperty,
- m_service.getSessionClass().getName()}), null);
+ m_service.getSessionClass().getName()})));
} else if (PropertyUtil.hasWritableProperty(m_service.getSessionClass(),
parentRefProperty) == false) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_NOT_WRITABLE_PROPERTY",
new String[]{parentRefProperty,
- m_service.getSessionClass().getName()}), null);
+ m_service.getSessionClass().getName()})));
}
Class<?> parentCls=PropertyUtil.getPropertyType(
@@ -180,13 +180,13 @@
if (parentCls != null && getService() != null &&
getService().getSessionClass() != null &&
parentCls != getService().getSessionClass()) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_INVALID_PROPERTY_TYPE",
new String[]{parentRefProperty,
m_service.getSessionClass().getName(),
- getService().getSessionClass().getName()}), null);
+ getService().getSessionClass().getName()})));
}
}
@@ -204,21 +204,21 @@
if (PropertyUtil.isProperty(m_service.getSessionClass(),
variable) == false) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_NOT_FOUND_VARIABLE",
new String[]{variable,
- m_service.getSessionClass().getName()}), null);
+ m_service.getSessionClass().getName()})));
} else if (PropertyUtil.hasWritableProperty(m_service.getSessionClass(),
variable) == false) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_NOT_WRITABLE_PROPERTY",
new String[]{variable,
- m_service.getSessionClass().getName()}), null);
+ m_service.getSessionClass().getName()})));
}
} else {
// Possibly report if 'to-variable' not
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/RetrieveSessionAction.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/RetrieveSessionAction.java 2008-09-05 20:12:05 UTC (rev 308)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/RetrieveSessionAction.java 2008-09-06 22:33:14 UTC (rev 309)
@@ -69,11 +69,11 @@
ESBAction act=getService().getActions().get(0);
if (act != this) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_MUST_BE_FIRST_ACTION",
- new String[]{"RetrieveSession"}), null);
+ new String[]{"RetrieveSession"})));
}
}
}
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/ScheduleStateAction.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/ScheduleStateAction.java 2008-09-05 20:12:05 UTC (rev 308)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/ScheduleStateAction.java 2008-09-06 22:33:14 UTC (rev 309)
@@ -112,11 +112,11 @@
if (immediate != null && immediate.equalsIgnoreCase("true") == false &&
immediate.equalsIgnoreCase("false") == false) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_BOOLEAN",
- new String[]{IMMEDIATE}), null);
+ new String[]{IMMEDIATE})));
}
}
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/SendMessageAction.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/SendMessageAction.java 2008-09-05 20:12:05 UTC (rev 308)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/SendMessageAction.java 2008-09-06 22:33:14 UTC (rev 309)
@@ -134,11 +134,11 @@
// TODO: Validate that the client EPR has been sent on
// a preceding received request
} else {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_NOT_SPECIFIED_REQ_RESP_EPR",
- new String[]{}), null);
+ new String[]{})));
}
}
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/SetStateAction.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/SetStateAction.java 2008-09-05 20:12:05 UTC (rev 308)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/SetStateAction.java 2008-09-06 22:33:14 UTC (rev 309)
@@ -97,35 +97,35 @@
if (PropertyUtil.isProperty(cls, token) == false) {
if (variable.equals(token)) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_NOT_FOUND_VARIABLE",
- new String[]{variable, cls.getName()}), null);
+ new String[]{variable, cls.getName()})));
} else {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_NOT_FOUND_VARIABLE_PROPERTY",
- new String[]{variable, token, cls.getName()}), null);
+ new String[]{variable, token, cls.getName()})));
}
} else if (st.hasMoreTokens()) {
// Check property can be read
if (!PropertyUtil.hasReadableProperty(cls, token)) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_NOT_READABLE_PROPERTY",
- new String[]{token, cls.getName()}), null);
+ new String[]{token, cls.getName()})));
}
} else {
// Check property can be written
if (!PropertyUtil.hasWritableProperty(cls, token)) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_NOT_WRITABLE_PROPERTY",
- new String[]{token, cls.getName()}), null);
+ new String[]{token, cls.getName()})));
}
}
@@ -140,11 +140,11 @@
if ((stateExpression == null && messageExpression == null) ||
(stateExpression != null && messageExpression != null)) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_MUST_SPECIFY_STATE_OR_MESSAGE_EXPRESSION",
- new String[]{}), null);
+ new String[]{})));
}
}
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/SwitchAction.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/SwitchAction.java 2008-09-05 20:12:05 UTC (rev 308)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/SwitchAction.java 2008-09-06 22:33:14 UTC (rev 309)
@@ -136,19 +136,19 @@
// Report any errors
if (nl != null && pathCount < 1) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_SWITCH_ONE_OR_MORE_PATHS",
- new String[]{}), null);
+ new String[]{})));
}
if (f_serviceDetailsMissing) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_PATH_SERVICE_DETAILS_MISSING",
- new String[]{}), null);
+ new String[]{})));
}
}
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/WhenAction.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/WhenAction.java 2008-09-05 20:12:05 UTC (rev 308)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/WhenAction.java 2008-09-06 22:33:14 UTC (rev 309)
@@ -142,19 +142,19 @@
// Report any errors
if (nl != null && pathCount < 1) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_WHEN_ONE_OR_MORE_PATHS",
- new String[]{}), null);
+ new String[]{})));
}
if (f_serviceDetailsMissing) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_PATH_SERVICE_DETAILS_MISSING",
- new String[]{}), null);
+ new String[]{})));
}
}
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/WhileAction.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/WhileAction.java 2008-09-05 20:12:05 UTC (rev 308)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/WhileAction.java 2008-09-06 22:33:14 UTC (rev 309)
@@ -151,11 +151,11 @@
ESBAction act=getService().getActions().get(0);
if (act != this) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_MUST_BE_FIRST_ACTION",
- new String[]{"While"}), null);
+ new String[]{"While"})));
}
}
@@ -230,43 +230,43 @@
// Report any errors
if (nl != null && (f_while == false || f_multipleWhiles)) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_MUST_DEFINE_SINGLE_WHILE_PATH",
- new String[]{}), null);
+ new String[]{})));
}
if (nl != null && (f_exit == false || f_multipleExits)) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_MUST_DEFINE_SINGLE_WHILE_EXIT",
- new String[]{}), null);
+ new String[]{})));
}
if (f_pathAfterExit) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_WHILE_PATH_AFTER_EXIT",
- new String[]{}), null);
+ new String[]{})));
}
if (f_serviceDetailsMissing) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_PATH_SERVICE_DETAILS_MISSING",
- new String[]{}), null);
+ new String[]{})));
}
if (f_immediateInvalid) {
- l.error(this, org.scribble.util.MessageUtil.format(
+ l.error(new ModelIssue(this, org.scribble.util.MessageUtil.format(
java.util.PropertyResourceBundle.getBundle(
"org.jboss.tools.overlord.cdl.jbossesb.model.actions.Messages"),
"_BOOLEAN",
- new String[]{IMMEDIATE}), null);
+ new String[]{IMMEDIATE})));
}
}
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/test/org/jboss/tools/overlord/cdl/jbossesb/model/TestModelListener.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/test/org/jboss/tools/overlord/cdl/jbossesb/model/TestModelListener.java 2008-09-05 20:12:05 UTC (rev 308)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/test/org/jboss/tools/overlord/cdl/jbossesb/model/TestModelListener.java 2008-09-06 22:33:14 UTC (rev 309)
@@ -17,18 +17,17 @@
*/
package org.jboss.tools.overlord.cdl.jbossesb.model;
+import org.scribble.model.ModelIssue;
import org.scribble.model.ModelObject;
public class TestModelListener implements org.scribble.model.ModelListener {
- public void error(ModelObject modelObject, String mesg,
- java.util.Map<String,Object> props) {
- reported(mesg);
+ public void error(ModelIssue issue) {
+ reported(issue.getMessage());
}
- public void warning(ModelObject modelObject, String mesg,
- java.util.Map<String,Object> props) {
- reported(mesg);
+ public void warning(ModelIssue issue) {
+ reported(issue.getMessage());
}
protected void reported(String mesg) {
15 years, 8 months
Overlord SVN: r308 - in cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src: java/org/jboss/tools/overlord/cdl/jbossesb/model/change and 1 other directories.
by overlord-commits@lists.jboss.org
Author: objectiser
Date: 2008-09-05 16:12:05 -0400 (Fri, 05 Sep 2008)
New Revision: 308
Added:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/AbstractInteractionMessageAction.java
Modified:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/AbstractESBAction.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/MessageRouterAction.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/ReceiveMessageAction.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/SendMessageAction.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/ConversationInteractionModelChangeRule.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/ConversationModelChangeRule.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/IfModelChangeRule.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/LanguageToConversationModelChangeRule.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/ParallelModelChangeRule.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/RunModelChangeRule.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/SpawnModelChangeRule.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/WhenModelChangeRule.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/WhileModelChangeRule.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/test/org/jboss/tools/overlord/cdl/jbossesb/model/change/ConversationInteractionModelChangeRuleTest.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/test/org/jboss/tools/overlord/cdl/jbossesb/model/change/IfModelChangeRuleTest.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/test/org/jboss/tools/overlord/cdl/jbossesb/model/change/ParallelModelChangeRuleTest.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/test/org/jboss/tools/overlord/cdl/jbossesb/model/change/RunModelChangeRuleTest.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/test/org/jboss/tools/overlord/cdl/jbossesb/model/change/WhenModelChangeRuleTest.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/test/org/jboss/tools/overlord/cdl/jbossesb/model/change/WhileModelChangeRuleTest.java
Log:
Update to reflect change in model change APIs.
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/AbstractESBAction.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/AbstractESBAction.java 2008-09-03 15:32:42 UTC (rev 307)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/AbstractESBAction.java 2008-09-05 20:12:05 UTC (rev 308)
@@ -71,6 +71,8 @@
getOwnerDocument().createElement(ACTION_ELEMENT);
m_action.setAttribute(CLASS_PROPERTY, actionClass);
+
+ getSource().setObject(this);
}
/**
@@ -148,6 +150,8 @@
getSource().getProperties().put("path",
ESBModelUtil.getPath(m_action));
+
+ getSource().setObject(this);
}
}
@@ -482,7 +486,7 @@
*
* @return The service
*/
- protected ESBService getService() {
+ public ESBService getService() {
return(m_service);
}
Added: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/AbstractInteractionMessageAction.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/AbstractInteractionMessageAction.java (rev 0)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/AbstractInteractionMessageAction.java 2008-09-05 20:12:05 UTC (rev 308)
@@ -0,0 +1,139 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.tools.overlord.cdl.jbossesb.model.actions;
+
+import org.jboss.tools.overlord.cdl.jbossesb.model.*;
+
+/**
+ * The abstract model component for the 'ReceiveMessageAction'
+ * and 'SendMessageAction'.
+ *
+ * @author gary
+ */
+public abstract class AbstractInteractionMessageAction extends AbstractESBAction {
+
+ public static final String IDENTITIES = "identities";
+ public static final String MESSAGE_TYPE = "messageType";
+ public static final String OPERATION = "operation";
+ public static final String CLIENT_EPR = "clientEPR";
+
+ /**
+ * The constructor for the action.
+ *
+ * @param service The reference to the service in which
+ * the action is contained
+ * @param action The XML configuration details for the action
+ */
+ public AbstractInteractionMessageAction(ESBService service,
+ org.w3c.dom.Element action) {
+ super(service, action);
+ }
+
+ /**
+ * The contructor for initializing a new action.
+ */
+ protected AbstractInteractionMessageAction(ESBService service,
+ String actionClass) {
+ super(service, actionClass);
+ }
+
+ /**
+ * This method returns the mandatory property names.
+ *
+ * @return The mandatory property names
+ */
+ @Override
+ protected java.util.List<String> getMandatoryProperties() {
+ java.util.List<String> ret=super.getMandatoryProperties();
+ ret.add(MESSAGE_TYPE);
+ ret.add(IDENTITIES);
+ return(ret);
+ }
+
+ /**
+ * This method returns the optional property names.
+ *
+ * @return The optional property names
+ */
+ @Override
+ protected java.util.List<String> getOptionalProperties() {
+ java.util.List<String> ret=super.getOptionalProperties();
+ ret.add(OPERATION);
+ ret.add(CLIENT_EPR);
+ return(ret);
+ }
+
+ /**
+ * This method sets the operation property.
+ *
+ * @param operation The operation
+ */
+ public void setOperation(String operation) {
+
+ org.w3c.dom.Element prop=getPropertyElement(OPERATION);
+
+ if (prop != null) {
+ prop.setAttribute(VALUE_ATTR, operation);
+ }
+ }
+
+ /**
+ * This method sets the message type.
+ *
+ * @param type The message type
+ */
+ public void setMessageType(String type) {
+
+ org.w3c.dom.Element prop=getPropertyElement(MESSAGE_TYPE);
+
+ if (prop != null) {
+ prop.setAttribute(VALUE_ATTR, type);
+ }
+ }
+
+ /**
+ * This method returns the message type.
+ *
+ * @return The message type
+ */
+ public String getMessageType() {
+ String ret=null;
+
+ org.w3c.dom.Element prop=getPropertyElement(MESSAGE_TYPE);
+
+ if (prop != null && prop.hasAttribute(VALUE_ATTR)) {
+ ret = prop.getAttribute(VALUE_ATTR);
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method sets the client's EPR label property.
+ *
+ * @param epr The client EPR label
+ */
+ public void setClientEPR(String epr) {
+
+ org.w3c.dom.Element prop=getPropertyElement(CLIENT_EPR);
+
+ if (prop != null) {
+ prop.setAttribute(VALUE_ATTR, epr);
+ }
+ }
+}
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/MessageRouterAction.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/MessageRouterAction.java 2008-09-03 15:32:42 UTC (rev 307)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/MessageRouterAction.java 2008-09-05 20:12:05 UTC (rev 308)
@@ -20,8 +20,8 @@
import java.util.logging.Logger;
import org.jboss.tools.overlord.cdl.jbossesb.model.*;
-import org.jboss.tools.overlord.cdl.jbossesb.model.change.*;
import org.jboss.tools.overlord.cdl.jbossesb.model.util.IdentityUtil;
+import org.jboss.tools.overlord.cdl.jbossesb.model.util.InteractionUtil;
import org.scribble.conversation.model.*;
import org.scribble.model.*;
@@ -162,15 +162,9 @@
if (messageTypes.get(i).getTypes().size() == 1) {
TypeReference ref=messageTypes.get(i).getTypes().get(0);
- String type="";
- if (ref.getNamespace() != null) {
- type += "{"+ref.getNamespace()+"}";
- }
- type += ref.getLocalpart();
+ mt.setAttribute(TYPE_ATTR, InteractionUtil.getTypeString(ref));
- mt.setAttribute(TYPE_ATTR, type);
-
path.appendChild(mt);
if (messageTypes.get(i).getParent() instanceof ConversationInteraction &&
@@ -221,8 +215,56 @@
return(ret);
}
+
+ /**
+ * This method returns the DOM element associated with the
+ * specified route.
+ *
+ * @param index The index of the required route
+ * @return The route element, or null if not found
+ */
+ public org.w3c.dom.Element getRouteElement(int index) {
+ org.w3c.dom.Element ret=null;
+
+ org.w3c.dom.NodeList nl=getAction().getElementsByTagName(ROUTE);
+
+ if (index >= 0 && index < nl.getLength() &&
+ nl.item(index) instanceof org.w3c.dom.Element) {
+ ret = (org.w3c.dom.Element)nl.item(index);
+ }
+ return(ret);
+ }
+
/**
+ * This method returns the DOM element associated with the
+ * specified service category and name.
+ *
+ * @param category The service category
+ * @param name The service name
+ * @return The route element, or null if not found
+ */
+ public org.w3c.dom.Element getRouteElement(String category,
+ String name) {
+ org.w3c.dom.Element ret=null;
+
+ org.w3c.dom.NodeList nl=getAction().getElementsByTagName(ROUTE);
+
+ for (int i=0; ret == null && i < nl.getLength(); i++) {
+ if (nl.item(i) instanceof org.w3c.dom.Element) {
+ ret = (org.w3c.dom.Element)nl.item(i);
+
+ if (ret.getAttribute(SERVICE_CATEGORY).equals(category) == false ||
+ ret.getAttribute(SERVICE_NAME).equals(name) == false) {
+ ret = null;
+ }
+ }
+ }
+
+ return(ret);
+ }
+
+ /**
* This method returns the mandatory property names.
*
* @return The mandatory property names
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/ReceiveMessageAction.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/ReceiveMessageAction.java 2008-09-03 15:32:42 UTC (rev 307)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/ReceiveMessageAction.java 2008-09-05 20:12:05 UTC (rev 308)
@@ -26,13 +26,8 @@
*
* @author gary
*/
-public class ReceiveMessageAction extends AbstractESBAction {
+public class ReceiveMessageAction extends AbstractInteractionMessageAction {
- public static final String IDENTITIES = "identities";
- public static final String MESSAGE_TYPE = "messageType";
- public static final String OPERATION = "operation";
- public static final String CLIENT_EPR = "clientEPR";
-
/**
* The constructor for the action.
*
@@ -58,32 +53,6 @@
}
/**
- * This method returns the mandatory property names.
- *
- * @return The mandatory property names
- */
- @Override
- protected java.util.List<String> getMandatoryProperties() {
- java.util.List<String> ret=super.getMandatoryProperties();
- ret.add(MESSAGE_TYPE);
- ret.add(IDENTITIES);
- return(ret);
- }
-
- /**
- * This method returns the optional property names.
- *
- * @return The optional property names
- */
- @Override
- protected java.util.List<String> getOptionalProperties() {
- java.util.List<String> ret=super.getOptionalProperties();
- ret.add(OPERATION);
- ret.add(CLIENT_EPR);
- return(ret);
- }
-
- /**
* This method converts the ESB action into an equivalent
* behavioural description for conformance checking.
*
@@ -133,46 +102,4 @@
recv.setToRole(new Role(context.getRole()));
}
}
-
- /**
- * This method sets the operation property.
- *
- * @param operation The operation
- */
- public void setOperation(String operation) {
-
- org.w3c.dom.Element prop=getPropertyElement(OPERATION);
-
- if (prop != null) {
- prop.setAttribute(VALUE_ATTR, operation);
- }
- }
-
- /**
- * This method sets the message type.
- *
- * @param type The message type
- */
- public void setMessageType(String type) {
-
- org.w3c.dom.Element prop=getPropertyElement(MESSAGE_TYPE);
-
- if (prop != null) {
- prop.setAttribute(VALUE_ATTR, type);
- }
- }
-
- /**
- * This method sets the client's EPR label property.
- *
- * @param epr The client EPR label
- */
- public void setClientEPR(String epr) {
-
- org.w3c.dom.Element prop=getPropertyElement(CLIENT_EPR);
-
- if (prop != null) {
- prop.setAttribute(VALUE_ATTR, epr);
- }
- }
}
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/SendMessageAction.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/SendMessageAction.java 2008-09-03 15:32:42 UTC (rev 307)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/actions/SendMessageAction.java 2008-09-05 20:12:05 UTC (rev 308)
@@ -26,17 +26,14 @@
*
* @author gary
*/
-public class SendMessageAction extends AbstractESBAction {
+public class SendMessageAction extends AbstractInteractionMessageAction {
- public static final String CLIENT_EPR = "clientEPR";
public static final String RESPONSE_SERVICE_NAME = "responseServiceName";
public static final String RESPONSE_SERVICE_CATEGORY = "responseServiceCategory";
public static final String SERVICE_NAME = "serviceName";
public static final String SERVICE_CATEGORY = "serviceCategory";
public static final String SERVICE_NAME_EXPRESSION = "serviceNameExpression";
public static final String SERVICE_CATEGORY_EXPRESSION = "serviceCategoryExpression";
- public static final String MESSAGE_TYPE = "messageType";
- public static final String OPERATION = "operation";
/**
* The constructor for the action.
@@ -93,19 +90,6 @@
}
/**
- * This method returns the mandatory property names.
- *
- * @return The mandatory property names
- */
- @Override
- protected java.util.List<String> getMandatoryProperties() {
- java.util.List<String> ret=super.getMandatoryProperties();
- ret.add(MESSAGE_TYPE);
- ret.add(IDENTITIES);
- return(ret);
- }
-
- /**
* This method returns the optional property names.
*
* @return The optional property names
@@ -113,8 +97,6 @@
@Override
protected java.util.List<String> getOptionalProperties() {
java.util.List<String> ret=super.getOptionalProperties();
- ret.add(OPERATION);
- ret.add(CLIENT_EPR);
ret.add(RESPONSE_SERVICE_NAME);
ret.add(RESPONSE_SERVICE_CATEGORY);
ret.add(SERVICE_NAME);
@@ -236,48 +218,6 @@
}
/**
- * This method sets the operation property.
- *
- * @param operation The operation
- */
- public void setOperation(String operation) {
-
- org.w3c.dom.Element prop=getPropertyElement(OPERATION);
-
- if (prop != null) {
- prop.setAttribute(VALUE_ATTR, operation);
- }
- }
-
- /**
- * This method sets the client's EPR label property.
- *
- * @param epr The client EPR label
- */
- public void setClientEPR(String epr) {
-
- org.w3c.dom.Element prop=getPropertyElement(CLIENT_EPR);
-
- if (prop != null) {
- prop.setAttribute(VALUE_ATTR, epr);
- }
- }
-
- /**
- * This method sets the message type.
- *
- * @param type The message type
- */
- public void setMessageType(String type) {
-
- org.w3c.dom.Element prop=getPropertyElement(MESSAGE_TYPE);
-
- if (prop != null) {
- prop.setAttribute(VALUE_ATTR, type);
- }
- }
-
- /**
* This method sets the destination service descriptor properties.
*
* @param category The category
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/ConversationInteractionModelChangeRule.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/ConversationInteractionModelChangeRule.java 2008-09-03 15:32:42 UTC (rev 307)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/ConversationInteractionModelChangeRule.java 2008-09-05 20:12:05 UTC (rev 308)
@@ -35,16 +35,16 @@
/**
* This method determines whether the rule is appropriate
- * for the supplied type of model, parent (in the context) and
+ * for the supplied type of model, parent (in the context) and inserted
* model object.
- *
+ *
* @param context The context
* @param model The model
- * @param mobj The model object causing the change
+ * @param mobj The model object being inserted
* @return Whether the rule supports the supplied information
*/
@Override
- protected boolean isChangeSupported(ModelChangeContext context,
+ public boolean isInsertSupported(ModelChangeContext context,
Model model, ModelObject mobj) {
boolean ret=false;
@@ -64,17 +64,29 @@
* will usually be from a different model representation
* (e.g. due to a merge), so the details will be
* copied and placed in the representation associated
- * with the supplied model and parent model object.
+ * with the supplied model and parent model object.<p>
+ * <p>
+ * If a reference model object is supplied, then the
+ * insertion will occur relative to it. If the reference
+ * object is a block, then it means that the insertion
+ * should occur at the end of the block. Otherwise the
+ * new model object should be inserted before the
+ * reference object, within the containing block.<p>
+ * <p>
+ * If the reference object is not supplied, then the
+ * new model object should be inserted at the end of
+ * the behaviour associated with the parent in the model
+ * change context.
*
* @param context The context
* @param model The model being changed
* @param mobj The model object details to be inserted
- * @param position The position, where relevant
+ * @param ref The optional reference model object
* @return Whether the change has been applied
*/
@Override
public boolean insert(ModelChangeContext context,
- Model model, ModelObject mobj, int position) {
+ Model model, ModelObject mobj, ModelObject ref) {
ESBLanguageModel esbModel=(ESBLanguageModel)model;
ConversationInteraction interaction=(ConversationInteraction)mobj;
@@ -82,11 +94,11 @@
if (InteractionUtil.isSend(interaction)) {
// Send
- insertSend(context, esbModel, interaction, position);
+ insertSend(context, esbModel, interaction, ref);
} else {
// Receive
- insertReceive(context, esbModel, interaction, position);
+ insertReceive(context, esbModel, interaction, ref);
}
return(true);
@@ -94,8 +106,8 @@
protected void insertSend(ModelChangeContext context,
ESBLanguageModel esbModel, ConversationInteraction interaction,
- int position) {
- ESBService service=(ESBService)context.getParent();
+ ModelObject ref) {
+ ESBService service=getESBService(context, ref);
SendMessageAction action=
new SendMessageAction(service);
@@ -104,22 +116,18 @@
action.setOperation(interaction.getMessageSignature().getOperation());
}
- if (interaction.getMessageSignature().getTypes().size() == 1) {
- TypeReference ref=interaction.getMessageSignature().getTypes().get(0);
-
- // TODO: Search for an implementation associated with
- // the type reference, so that the type can be
- // abstract - possibly have the required message type
- // notation as part of the context, so that if multiple
- // implementations found, then can select e.g. XML or
- // Java as message type representation.
-
- String mtype=InteractionUtil.getTypeString(ref);
-
- action.setMessageType(mtype);
+ setMessageType(action, interaction);
+
+ int pos=-1;
+
+ // Check if reference model object provided, and if so,
+ // if it has a position within the service
+ if (ref != null && ref.getSource().getObject() instanceof ESBAction) {
+ pos = service.getActions().indexOf((ESBAction)
+ ref.getSource().getObject());
}
- service.addAction(action, position);
+ service.addAction(action, pos);
if (((ESBService)context.getParent()).getFirstSessionBasedAction() == action &&
interaction.getEnclosingDefinition() instanceof Conversation) {
@@ -182,11 +190,22 @@
interaction.getMessageSignature(), ids, locators);
}
}
+
+ protected ESBService getESBService(ModelChangeContext context,
+ ModelObject ref) {
+ ESBService ret=(ESBService)context.getParent();
+
+ if (ref != null && ref.getSource().getObject() instanceof AbstractESBAction) {
+ ret = ((AbstractESBAction)ref.getSource().getObject()).getService();
+ }
+
+ return(ret);
+ }
protected void insertReceive(ModelChangeContext context,
ESBLanguageModel esbModel, ConversationInteraction interaction,
- int position) {
- ESBService service=(ESBService)context.getParent();
+ ModelObject ref) {
+ ESBService service=getESBService(context, ref);
// TODO: Create a new service to receive the
// message and add a schedule service to link
@@ -210,7 +229,17 @@
schedule.setDestination(recvService.getCategory(),
recvService.getName(), false);
- service.addAction(schedule, position);
+// service.addAction(schedule, -1);
+ int pos=-1;
+
+ // Check if reference model object provided, and if so,
+ // if it has a position within the service
+ if (ref != null && ref.getSource().getObject() instanceof ESBAction) {
+ pos = service.getActions().indexOf((ESBAction)
+ ref.getSource().getObject());
+ }
+
+ service.addAction(schedule, pos);
context.setParent(recvService);
}
@@ -222,20 +251,10 @@
action.setOperation(interaction.getMessageSignature().getOperation());
}
- if (interaction.getMessageSignature().getTypes().size() == 1) {
- TypeReference ref=interaction.getMessageSignature().getTypes().get(0);
-
- // TODO: Search for an implementation associated with
- // the type reference, so that the type can be
- // abstract - possibly have the required message type
- // notation as part of the context, so that if multiple
- // implementations found, then can select e.g. XML or
- // Java as message type representation.
- String mtype=InteractionUtil.getTypeString(ref);
-
- action.setMessageType(mtype);
- }
+ setMessageType(action, interaction);
+ // TODO: Decide how to determine position, in situations
+ // where new service no created
((ESBService)context.getParent()).addAction(action, -1);
if (((ESBService)context.getParent()).getFirstSessionBasedAction() == action &&
@@ -289,4 +308,105 @@
interaction.getMessageSignature(), ids, locators);
}
}
+
+ /**
+ * This method modifies an existing model object, within a
+ * parent model object, with the details supplied in
+ * another model object.
+ *
+ * @param context The context
+ * @param model The model being changed
+ * @param mobj The model object details to be modified
+ * @param position The position, where relevant
+ * @return Whether the change has been applied
+ */
+ public boolean update(ModelChangeContext context,
+ Model model, ModelObject mobj, int position) {
+ boolean ret=false;
+ ESBLanguageModel esbModel=(ESBLanguageModel)model;
+ ConversationInteraction interaction=(ConversationInteraction)mobj;
+ ESBService service=(ESBService)context.getParent();
+
+ // Get action at position
+ if (position != -1 && position < service.getActions().size()) {
+ ESBAction action=service.getActions().get(position);
+
+ // Check action is an interaction
+ if (action instanceof AbstractInteractionMessageAction) {
+ AbstractInteractionMessageAction ma=
+ (AbstractInteractionMessageAction)action;
+
+ String origMesgType=ma.getMessageType();
+
+ // Set message type
+ setMessageType(ma, interaction);
+
+ // Update message type in router if appropriate
+ if (InteractionUtil.isSend(interaction) == false &&
+ interaction.getReplyToLabel() == null) {
+ updateRouterMessageType(esbModel, service,
+ origMesgType, ma);
+ }
+
+ ret = true;
+ }
+ }
+
+ return(ret);
+ }
+
+ protected void updateRouterMessageType(ESBLanguageModel esbModel,
+ ESBService service, String origMesgType,
+ AbstractInteractionMessageAction ma) {
+ ESBService gwService=esbModel.getGatewayService();
+
+ if (gwService != null) {
+ ESBAction gwAction=gwService.getGatewayAction();
+
+ if (gwAction instanceof MessageRouterAction) {
+ MessageRouterAction mra=(MessageRouterAction)
+ gwAction;
+
+ org.w3c.dom.Element route=
+ mra.getRouteElement(service.getCategory(),
+ service.getName());
+
+ if (route != null) {
+ org.w3c.dom.NodeList nl=
+ route.getElementsByTagName(MessageRouterAction.MESSAGE_ELEMENT);
+
+ for (int i=0; i < nl.getLength(); i++) {
+ if (nl.item(i) instanceof org.w3c.dom.Element) {
+ org.w3c.dom.Element mesg=
+ (org.w3c.dom.Element)nl.item(i);
+
+ if (mesg.getAttribute(MessageRouterAction.TYPE_ATTR).
+ equals(origMesgType)) {
+ mesg.setAttribute(MessageRouterAction.TYPE_ATTR,
+ ma.getMessageType());
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ protected void setMessageType(AbstractInteractionMessageAction action,
+ ConversationInteraction interaction) {
+
+ if (interaction.getMessageSignature().getTypes().size() == 1) {
+ TypeReference ref=interaction.getMessageSignature().getTypes().get(0);
+
+ // TODO: Search for an implementation associated with
+ // the type reference, so that the type can be
+ // abstract - possibly have the required message type
+ // notation as part of the context, so that if multiple
+ // implementations found, then can select e.g. XML or
+ // Java as message type representation.
+ String mtype=InteractionUtil.getTypeString(ref);
+
+ action.setMessageType(mtype);
+ }
+ }
}
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/ConversationModelChangeRule.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/ConversationModelChangeRule.java 2008-09-03 15:32:42 UTC (rev 307)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/ConversationModelChangeRule.java 2008-09-05 20:12:05 UTC (rev 308)
@@ -44,7 +44,7 @@
* @return Whether the rule supports the supplied information
*/
@Override
- protected boolean isChangeSupported(ModelChangeContext context,
+ public boolean isInsertSupported(ModelChangeContext context,
Model model, ModelObject mobj) {
boolean ret=false;
@@ -63,17 +63,29 @@
* will usually be from a different model representation
* (e.g. due to a merge), so the details will be
* copied and placed in the representation associated
- * with the supplied model and parent model object.
+ * with the supplied model and parent model object.<p>
+ * <p>
+ * If a reference model object is supplied, then the
+ * insertion will occur relative to it. If the reference
+ * object is a block, then it means that the insertion
+ * should occur at the end of the block. Otherwise the
+ * new model object should be inserted before the
+ * reference object, within the containing block.<p>
+ * <p>
+ * If the reference object is not supplied, then the
+ * new model object should be inserted at the end of
+ * the behaviour associated with the parent in the model
+ * change context.
*
* @param context The context
* @param model The model being changed
* @param mobj The model object details to be inserted
- * @param position The position, where relevant
+ * @param ref The optional reference model object
* @return Whether the change has been applied
*/
@Override
public boolean insert(ModelChangeContext context,
- Model model, ModelObject mobj, int position) {
+ Model model, ModelObject mobj, ModelObject ref) {
ESBLanguageModel esbModel=(ESBLanguageModel)model;
Conversation conv=(Conversation)mobj;
@@ -85,8 +97,7 @@
String name=ConversationUtil.getServiceName(conv);
String sdname="";
-
-
+
// Check if root conversation
if (conv.getParent() instanceof Model) {
@@ -160,7 +171,7 @@
context.setParent(service);
for (int i=0; i < acts.size(); i++) {
- context.insert(model, acts.get(i), i);
+ context.insert(model, acts.get(i), null);
}
return(true);
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/IfModelChangeRule.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/IfModelChangeRule.java 2008-09-03 15:32:42 UTC (rev 307)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/IfModelChangeRule.java 2008-09-05 20:12:05 UTC (rev 308)
@@ -37,16 +37,16 @@
/**
* This method determines whether the rule is appropriate
- * for the supplied type of model, parent (in the context) and
+ * for the supplied type of model, parent (in the context) and inserted
* model object.
- *
+ *
* @param context The context
* @param model The model
- * @param mobj The model object causing the change
+ * @param mobj The model object being inserted
* @return Whether the rule supports the supplied information
*/
@Override
- protected boolean isChangeSupported(ModelChangeContext context,
+ public boolean isInsertSupported(ModelChangeContext context,
Model model, ModelObject mobj) {
boolean ret=false;
@@ -66,17 +66,29 @@
* will usually be from a different model representation
* (e.g. due to a merge), so the details will be
* copied and placed in the representation associated
- * with the supplied model and parent model object.
+ * with the supplied model and parent model object.<p>
+ * <p>
+ * If a reference model object is supplied, then the
+ * insertion will occur relative to it. If the reference
+ * object is a block, then it means that the insertion
+ * should occur at the end of the block. Otherwise the
+ * new model object should be inserted before the
+ * reference object, within the containing block.<p>
+ * <p>
+ * If the reference object is not supplied, then the
+ * new model object should be inserted at the end of
+ * the behaviour associated with the parent in the model
+ * change context.
*
* @param context The context
* @param model The model being changed
* @param mobj The model object details to be inserted
- * @param position The position, where relevant
+ * @param ref The optional reference model object
* @return Whether the change has been applied
*/
@Override
public boolean insert(ModelChangeContext context,
- Model model, ModelObject mobj, int position) {
+ Model model, ModelObject mobj, ModelObject ref) {
ESBLanguageModel esbModel=(ESBLanguageModel)model;
ESBService service=(ESBService)context.getParent();
If ifElem=(If)mobj;
@@ -94,7 +106,7 @@
// If action, because the role is a decision maker
IfAction ifAction=new IfAction(service);
- service.addAction(ifAction, position);
+ service.addAction(ifAction, -1);
for (int i=0; i < ifElem.getConditionalBlocks().size(); i++) {
ConditionalBlock cb=ifElem.getConditionalBlocks().get(i);
@@ -109,7 +121,7 @@
context.setParent(subService);
for (int j=0; j < cb.getContents().size(); j++) {
- context.insert(model, cb.getContents().get(j), j);
+ context.insert(model, cb.getContents().get(j), null);
}
boolean immediate=false;
@@ -145,7 +157,7 @@
for (int j=0; j < ifElem.getElseBlock().getContents().size(); j++) {
context.insert(model,
- ifElem.getElseBlock().getContents().get(j), j);
+ ifElem.getElseBlock().getContents().get(j), null);
}
boolean immediate=false;
@@ -187,7 +199,7 @@
logger.severe("Failed to find lookahead analyser");
}
- service.addAction(switchAction, position);
+ service.addAction(switchAction, -1);
java.util.List<MessageSignature> messageTypes=
new java.util.Vector<MessageSignature>();
@@ -205,7 +217,7 @@
context.setParent(subService);
for (int j=0; j < cb.getContents().size(); j++) {
- context.insert(model, cb.getContents().get(j), j);
+ context.insert(model, cb.getContents().get(j), null);
}
java.util.Set<Interaction> interactions=null;
@@ -262,7 +274,7 @@
for (int j=0; j < ifElem.getElseBlock().getContents().size(); j++) {
context.insert(model,
- ifElem.getElseBlock().getContents().get(j), j);
+ ifElem.getElseBlock().getContents().get(j), null);
}
java.util.Set<Interaction> interactions=null;
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/LanguageToConversationModelChangeRule.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/LanguageToConversationModelChangeRule.java 2008-09-03 15:32:42 UTC (rev 307)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/LanguageToConversationModelChangeRule.java 2008-09-05 20:12:05 UTC (rev 308)
@@ -33,17 +33,17 @@
/**
* This method determines whether the rule is appropriate
- * for the supplied type of model, parent (in the context) and
+ * for the supplied type of model, parent (in the context) and inserted
* model object.
*
* @param context The context
* @param model The model
- * @param mobj The model object causing the change
+ * @param mobj The model object being inserted
* @return Whether the rule supports the supplied information
*/
@Override
- protected boolean isChangeSupported(ModelChangeContext context,
- Model model, ModelObject mobj) {
+ public boolean isInsertSupported(ModelChangeContext context,
+ Model model, ModelObject mobj) {
boolean ret=false;
if (mobj instanceof ConversationModel &&
@@ -61,21 +61,33 @@
* will usually be from a different model representation
* (e.g. due to a merge), so the details will be
* copied and placed in the representation associated
- * with the supplied model and parent model object.
+ * with the supplied model and parent model object.<p>
+ * <p>
+ * If a reference model object is supplied, then the
+ * insertion will occur relative to it. If the reference
+ * object is a block, then it means that the insertion
+ * should occur at the end of the block. Otherwise the
+ * new model object should be inserted before the
+ * reference object, within the containing block.<p>
+ * <p>
+ * If the reference object is not supplied, then the
+ * new model object should be inserted at the end of
+ * the behaviour associated with the parent in the model
+ * change context.
*
* @param context The context
* @param model The model being changed
* @param mobj The model object details to be inserted
- * @param position The position, where relevant
+ * @param ref The optional reference model object
* @return Whether the change has been applied
*/
@Override
public boolean insert(ModelChangeContext context,
- Model model, ModelObject mobj, int position) {
+ Model model, ModelObject mobj, ModelObject ref) {
ConversationModel cm=(ConversationModel)mobj;
if (cm.getConversation() != null) {
- context.insert(model, cm.getConversation(), -1);
+ context.insert(model, cm.getConversation(), null);
}
return(true);
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/ParallelModelChangeRule.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/ParallelModelChangeRule.java 2008-09-03 15:32:42 UTC (rev 307)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/ParallelModelChangeRule.java 2008-09-05 20:12:05 UTC (rev 308)
@@ -36,16 +36,16 @@
/**
* This method determines whether the rule is appropriate
- * for the supplied type of model, parent (in the context) and
+ * for the supplied type of model, parent (in the context) and inserted
* model object.
- *
+ *
* @param context The context
* @param model The model
- * @param mobj The model object causing the change
+ * @param mobj The model object being inserted
* @return Whether the rule supports the supplied information
*/
@Override
- protected boolean isChangeSupported(ModelChangeContext context,
+ public boolean isInsertSupported(ModelChangeContext context,
Model model, ModelObject mobj) {
boolean ret=false;
@@ -65,17 +65,29 @@
* will usually be from a different model representation
* (e.g. due to a merge), so the details will be
* copied and placed in the representation associated
- * with the supplied model and parent model object.
+ * with the supplied model and parent model object.<p>
+ * <p>
+ * If a reference model object is supplied, then the
+ * insertion will occur relative to it. If the reference
+ * object is a block, then it means that the insertion
+ * should occur at the end of the block. Otherwise the
+ * new model object should be inserted before the
+ * reference object, within the containing block.<p>
+ * <p>
+ * If the reference object is not supplied, then the
+ * new model object should be inserted at the end of
+ * the behaviour associated with the parent in the model
+ * change context.
*
* @param context The context
* @param model The model being changed
* @param mobj The model object details to be inserted
- * @param position The position, where relevant
+ * @param ref The optional reference model object
* @return Whether the change has been applied
*/
@Override
public boolean insert(ModelChangeContext context,
- Model model, ModelObject mobj, int position) {
+ Model model, ModelObject mobj, ModelObject ref) {
ESBLanguageModel esbModel=(ESBLanguageModel)model;
ESBService service=(ESBService)context.getParent();
Parallel parallel=(Parallel)mobj;
@@ -91,7 +103,7 @@
// Create and configure the parallel action
ParallelAction parAction=new ParallelAction(service);
- service.addAction(parAction, position);
+ service.addAction(parAction, -1);
for (int i=0; i < parallel.getBlocks().size(); i++) {
Block b=parallel.getBlocks().get(i);
@@ -106,7 +118,7 @@
context.setParent(subService);
for (int j=0; j < b.getContents().size(); j++) {
- context.insert(model, b.getContents().get(j), j);
+ context.insert(model, b.getContents().get(j), null);
}
ScheduleStateAction schedule=
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/RunModelChangeRule.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/RunModelChangeRule.java 2008-09-03 15:32:42 UTC (rev 307)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/RunModelChangeRule.java 2008-09-05 20:12:05 UTC (rev 308)
@@ -36,16 +36,16 @@
/**
* This method determines whether the rule is appropriate
- * for the supplied type of model, parent (in the context) and
+ * for the supplied type of model, parent (in the context) and inserted
* model object.
- *
+ *
* @param context The context
* @param model The model
- * @param mobj The model object causing the change
+ * @param mobj The model object being inserted
* @return Whether the rule supports the supplied information
*/
@Override
- protected boolean isChangeSupported(ModelChangeContext context,
+ public boolean isInsertSupported(ModelChangeContext context,
Model model, ModelObject mobj) {
boolean ret=false;
@@ -65,24 +65,36 @@
* will usually be from a different model representation
* (e.g. due to a merge), so the details will be
* copied and placed in the representation associated
- * with the supplied model and parent model object.
+ * with the supplied model and parent model object.<p>
+ * <p>
+ * If a reference model object is supplied, then the
+ * insertion will occur relative to it. If the reference
+ * object is a block, then it means that the insertion
+ * should occur at the end of the block. Otherwise the
+ * new model object should be inserted before the
+ * reference object, within the containing block.<p>
+ * <p>
+ * If the reference object is not supplied, then the
+ * new model object should be inserted at the end of
+ * the behaviour associated with the parent in the model
+ * change context.
*
* @param context The context
* @param model The model being changed
* @param mobj The model object details to be inserted
- * @param position The position, where relevant
+ * @param ref The optional reference model object
* @return Whether the change has been applied
*/
@Override
public boolean insert(ModelChangeContext context,
- Model model, ModelObject mobj, int position) {
+ Model model, ModelObject mobj, ModelObject ref) {
ESBLanguageModel esbModel=(ESBLanguageModel)model;
ESBService service=(ESBService)context.getParent();
Run run=(Run)mobj;
PerformAction action=new PerformAction(service);
- service.addAction(action, position);
+ service.addAction(action, -1);
String category=ConversationUtil.getServiceCategory(run.getDefinition());
String name=ConversationUtil.getServiceName(run.getDefinition());
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/SpawnModelChangeRule.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/SpawnModelChangeRule.java 2008-09-03 15:32:42 UTC (rev 307)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/SpawnModelChangeRule.java 2008-09-05 20:12:05 UTC (rev 308)
@@ -35,16 +35,16 @@
/**
* This method determines whether the rule is appropriate
- * for the supplied type of model, parent (in the context) and
+ * for the supplied type of model, parent (in the context) and inserted
* model object.
- *
+ *
* @param context The context
* @param model The model
- * @param mobj The model object causing the change
+ * @param mobj The model object being inserted
* @return Whether the rule supports the supplied information
*/
@Override
- protected boolean isChangeSupported(ModelChangeContext context,
+ public boolean isInsertSupported(ModelChangeContext context,
Model model, ModelObject mobj) {
boolean ret=false;
@@ -64,23 +64,35 @@
* will usually be from a different model representation
* (e.g. due to a merge), so the details will be
* copied and placed in the representation associated
- * with the supplied model and parent model object.
+ * with the supplied model and parent model object.<p>
+ * <p>
+ * If a reference model object is supplied, then the
+ * insertion will occur relative to it. If the reference
+ * object is a block, then it means that the insertion
+ * should occur at the end of the block. Otherwise the
+ * new model object should be inserted before the
+ * reference object, within the containing block.<p>
+ * <p>
+ * If the reference object is not supplied, then the
+ * new model object should be inserted at the end of
+ * the behaviour associated with the parent in the model
+ * change context.
*
* @param context The context
* @param model The model being changed
* @param mobj The model object details to be inserted
- * @param position The position, where relevant
+ * @param ref The optional reference model object
* @return Whether the change has been applied
*/
@Override
public boolean insert(ModelChangeContext context,
- Model model, ModelObject mobj, int position) {
+ Model model, ModelObject mobj, ModelObject ref) {
ESBService service=(ESBService)context.getParent();
Spawn spawn=(Spawn)mobj;
PerformAction action=new PerformAction(service);
- service.addAction(action, position);
+ service.addAction(action, -1);
String category=ConversationUtil.getServiceCategory(spawn.getDefinition());
String name=ConversationUtil.getServiceName(spawn.getDefinition());
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/WhenModelChangeRule.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/WhenModelChangeRule.java 2008-09-03 15:32:42 UTC (rev 307)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/WhenModelChangeRule.java 2008-09-05 20:12:05 UTC (rev 308)
@@ -36,16 +36,16 @@
/**
* This method determines whether the rule is appropriate
- * for the supplied type of model, parent (in the context) and
+ * for the supplied type of model, parent (in the context) and inserted
* model object.
- *
+ *
* @param context The context
* @param model The model
- * @param mobj The model object causing the change
+ * @param mobj The model object being inserted
* @return Whether the rule supports the supplied information
*/
@Override
- protected boolean isChangeSupported(ModelChangeContext context,
+ public boolean isInsertSupported(ModelChangeContext context,
Model model, ModelObject mobj) {
boolean ret=false;
@@ -65,17 +65,29 @@
* will usually be from a different model representation
* (e.g. due to a merge), so the details will be
* copied and placed in the representation associated
- * with the supplied model and parent model object.
+ * with the supplied model and parent model object.<p>
+ * <p>
+ * If a reference model object is supplied, then the
+ * insertion will occur relative to it. If the reference
+ * object is a block, then it means that the insertion
+ * should occur at the end of the block. Otherwise the
+ * new model object should be inserted before the
+ * reference object, within the containing block.<p>
+ * <p>
+ * If the reference object is not supplied, then the
+ * new model object should be inserted at the end of
+ * the behaviour associated with the parent in the model
+ * change context.
*
* @param context The context
* @param model The model being changed
* @param mobj The model object details to be inserted
- * @param position The position, where relevant
+ * @param ref The optional reference model object
* @return Whether the change has been applied
*/
@Override
public boolean insert(ModelChangeContext context,
- Model model, ModelObject mobj, int position) {
+ Model model, ModelObject mobj, ModelObject ref) {
ESBLanguageModel esbModel=(ESBLanguageModel)model;
ESBService service=(ESBService)context.getParent();
When when=(When)mobj;
@@ -91,7 +103,7 @@
if (when.getRoles().contains(context.getRole())) {
WhenAction action=new WhenAction(service);
- service.addAction(action, position);
+ service.addAction(action, -1);
for (int i=0; i < when.getConditionalBlocks().size(); i++) {
ConditionalBlock b=when.getConditionalBlocks().get(i);
@@ -106,7 +118,7 @@
context.setParent(subService);
for (int j=0; j < b.getContents().size(); j++) {
- context.insert(model, b.getContents().get(j), j);
+ context.insert(model, b.getContents().get(j), null);
}
ScheduleStateAction schedule=
@@ -146,7 +158,7 @@
logger.severe("Failed to find lookahead analyser");
}
- service.addAction(switchAction, position);
+ service.addAction(switchAction, -1);
java.util.List<MessageSignature> messageTypes=
new java.util.Vector<MessageSignature>();
@@ -164,7 +176,7 @@
context.setParent(subService);
for (int j=0; j < cb.getContents().size(); j++) {
- context.insert(model, cb.getContents().get(j), j);
+ context.insert(model, cb.getContents().get(j), null);
}
java.util.Set<Interaction> interactions=null;
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/WhileModelChangeRule.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/WhileModelChangeRule.java 2008-09-03 15:32:42 UTC (rev 307)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/java/org/jboss/tools/overlord/cdl/jbossesb/model/change/WhileModelChangeRule.java 2008-09-05 20:12:05 UTC (rev 308)
@@ -36,16 +36,16 @@
/**
* This method determines whether the rule is appropriate
- * for the supplied type of model, parent (in the context) and
+ * for the supplied type of model, parent (in the context) and inserted
* model object.
- *
+ *
* @param context The context
* @param model The model
- * @param mobj The model object causing the change
+ * @param mobj The model object being inserted
* @return Whether the rule supports the supplied information
*/
@Override
- protected boolean isChangeSupported(ModelChangeContext context,
+ public boolean isInsertSupported(ModelChangeContext context,
Model model, ModelObject mobj) {
boolean ret=false;
@@ -65,17 +65,29 @@
* will usually be from a different model representation
* (e.g. due to a merge), so the details will be
* copied and placed in the representation associated
- * with the supplied model and parent model object.
+ * with the supplied model and parent model object.<p>
+ * <p>
+ * If a reference model object is supplied, then the
+ * insertion will occur relative to it. If the reference
+ * object is a block, then it means that the insertion
+ * should occur at the end of the block. Otherwise the
+ * new model object should be inserted before the
+ * reference object, within the containing block.<p>
+ * <p>
+ * If the reference object is not supplied, then the
+ * new model object should be inserted at the end of
+ * the behaviour associated with the parent in the model
+ * change context.
*
* @param context The context
* @param model The model being changed
* @param mobj The model object details to be inserted
- * @param position The position, where relevant
+ * @param ref The optional reference model object
* @return Whether the change has been applied
*/
@Override
public boolean insert(ModelChangeContext context,
- Model model, ModelObject mobj, int position) {
+ Model model, ModelObject mobj, ModelObject ref) {
ESBLanguageModel esbModel=(ESBLanguageModel)model;
ESBService service=(ESBService)context.getParent();
While whileElem=(While)mobj;
@@ -110,7 +122,7 @@
WhileAction action=new WhileAction(service);
- service.addAction(action, position);
+ service.addAction(action, -1);
// Check if business object type needs to be specified
if (service.getFirstSessionBasedAction() == action &&
@@ -130,7 +142,7 @@
context.setParent(subService);
for (int j=0; j < whileElem.getBlock().getContents().size(); j++) {
- context.insert(model, whileElem.getBlock().getContents().get(j), j);
+ context.insert(model, whileElem.getBlock().getContents().get(j), null);
}
// Need to insert a 'ScheduleStateAction' to return back
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/test/org/jboss/tools/overlord/cdl/jbossesb/model/change/ConversationInteractionModelChangeRuleTest.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/test/org/jboss/tools/overlord/cdl/jbossesb/model/change/ConversationInteractionModelChangeRuleTest.java 2008-09-03 15:32:42 UTC (rev 307)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/test/org/jboss/tools/overlord/cdl/jbossesb/model/change/ConversationInteractionModelChangeRuleTest.java 2008-09-05 20:12:05 UTC (rev 308)
@@ -77,7 +77,7 @@
msig.getTypes().add(ref);
- if (rule.insert(context, model, mobj, -1) == false) {
+ if (rule.insert(context, model, mobj, null) == false) {
fail("Failed to insert");
}
@@ -155,7 +155,7 @@
msig1.getTypes().add(ref1);
- if (rule.insert(context, model, mobj1, -1) == false) {
+ if (rule.insert(context, model, mobj1, null) == false) {
fail("Failed to insert 1");
}
@@ -176,7 +176,7 @@
// will become session based
service.setSessionBased(true);
- if (rule.insert(context, model, mobj2, -1) == false) {
+ if (rule.insert(context, model, mobj2, null) == false) {
fail("Failed to insert 2");
}
@@ -259,6 +259,256 @@
}
}
+
+ public void testInsertThirdMiddleReceiveAction() {
+ ConversationInteractionModelChangeRule rule=new ConversationInteractionModelChangeRule();
+
+ TestESBLanguageModel model=new TestESBLanguageModel();
+
+ TestESBService service=(TestESBService)
+ model.createService("testcategory", "testname");
+
+ model.addService(service);
+
+ // Add gateway service
+ TestESBService gwservice=(TestESBService)
+ model.createService("testcategory", "gateway");
+ gwservice.setGateway(true);
+
+ MessageRouterAction mra=new MessageRouterAction(gwservice);
+ gwservice.setGatewayAction(mra);
+
+ model.setGatewayService(gwservice);
+
+
+ TestModelChangeContext context=new TestModelChangeContext();
+ context.setParent(service);
+
+ Role role=new Role();
+ role.setName("role1");
+
+ context.setRole(role);
+
+ Conversation conv=new Conversation();
+ ModelName mname=new ModelName();
+ mname.setLocatedRole(role);
+ conv.setModelName(mname);
+
+ ConversationInteraction mobj1=new ConversationInteraction();
+ mobj1.setToRole(role);
+ conv.getBlock().getContents().add(mobj1);
+
+ MessageSignature msig1=new MessageSignature();
+ mobj1.setMessageSignature(msig1);
+
+ TypeReference ref1=new TypeReference();
+ ref1.setNamespace("ns");
+ ref1.setLocalpart("lp1");
+
+ msig1.getTypes().add(ref1);
+
+ if (rule.insert(context, model, mobj1, null) == false) {
+ fail("Failed to insert 1");
+ }
+
+ ConversationInteraction mobj2=new ConversationInteraction();
+ mobj2.setToRole(role);
+ conv.getBlock().getContents().add(mobj2);
+
+ MessageSignature msig2=new MessageSignature();
+ mobj2.setMessageSignature(msig2);
+
+ TypeReference ref2=new TypeReference();
+ ref2.setNamespace("ns");
+ ref2.setLocalpart("lp2");
+
+ msig2.getTypes().add(ref2);
+
+ // Once first interaction associated with service it
+ // will become session based
+ service.setSessionBased(true);
+
+ if (rule.insert(context, model, mobj2, null) == false) {
+ fail("Failed to insert 2");
+ }
+
+ // Check actions
+ if (service.getActions().size() != 2) {
+ fail("Expecting 2 actions: "+service.getActions().size());
+ }
+
+ if ((service.getActions().get(0) instanceof ReceiveMessageAction) == false) {
+ fail("Action 1 was not ReceiveMessageAction: "+service.getActions().get(0));
+ }
+
+ if ((service.getActions().get(1) instanceof ScheduleStateAction) == false) {
+ fail("Action 2 was not ScheduleStateAction: "+service.getActions().get(1));
+ }
+
+ if (model.getServices().size() != 2) {
+ fail("Two services expected: "+model.getServices().size());
+ }
+
+ ESBService newService=null;
+ java.util.Iterator<ESBService> iter=model.getServices().iterator();
+ while (newService == null && iter.hasNext()) {
+ ESBService s=iter.next();
+
+ if (s != service) {
+ newService = s;
+ }
+ }
+
+ if (newService == null) {
+ fail("Other service not found");
+ }
+
+ ((TestESBService)newService).setSessionBased(true);
+
+ // Check schedule details
+ ScheduleStateAction schedule=(ScheduleStateAction)
+ service.getActions().get(1);
+
+ if (newService.getCategory().equals(schedule.getPropertyValue(
+ ScheduleStateAction.SERVICE_CATEGORY)) == false) {
+ fail("Schedule service category '"+
+ schedule.getPropertyValue(
+ ScheduleStateAction.SERVICE_CATEGORY)+
+ "' invalid, expecting: "+
+ service.getCategory());
+ }
+
+ if (newService.getName().equals(schedule.getPropertyValue(
+ ScheduleStateAction.SERVICE_NAME)) == false) {
+ fail("Schedule service name '"+
+ schedule.getPropertyValue(
+ ScheduleStateAction.SERVICE_NAME)+
+ "' invalid, expecting: "+
+ service.getName());
+ }
+
+ // Check actions
+ if (newService.getActions().size() != 1) {
+ fail("Expecting 1 action: "+newService.getActions().size());
+ }
+
+ if ((newService.getActions().get(0) instanceof ReceiveMessageAction) == false) {
+ fail("Action 1 was not ReceiveMessageAction: "+newService.getActions().get(0));
+ }
+
+ ReceiveMessageAction recv2=(ReceiveMessageAction)
+ newService.getActions().get(0);
+
+
+ String mtype=InteractionUtil.getTypeString(ref2);
+
+ if (recv2.getPropertyValue("messageType").equals(mtype)==false) {
+ fail("Message type '"+recv2.getPropertyValue("messageType")+
+ "' invalid, expecting: "+mtype);
+ }
+
+ java.util.List<Activity> acts=new java.util.Vector<Activity>();
+
+ DefaultConversionContext convContext=new DefaultConversionContext(role.getName());
+ recv2.convert(acts, convContext);
+
+ if (acts.size() != 1) {
+ fail("Expecting 1 activity: "+acts.size());
+ }
+
+ // Now second service identified, add new receive
+ // action to ensure that third service inserted in the
+ // middle
+ ConversationInteraction mobj3=new ConversationInteraction();
+ mobj3.setToRole(role);
+ conv.getBlock().getContents().add(mobj3);
+
+ MessageSignature msig3=new MessageSignature();
+ mobj3.setMessageSignature(msig3);
+
+ TypeReference ref3=new TypeReference();
+ ref3.setNamespace("ns");
+ ref3.setLocalpart("lp3");
+
+ msig3.getTypes().add(ref3);
+
+ // Insert into position 1, which should be after first
+ // receive
+
+ // TODO: Need to pass representation of last interaction
+ if (rule.insert(context, model, mobj3, acts.get(0)) == false) {
+ fail("Failed to insert 3");
+ }
+
+ // Re-Check actions
+ if (service.getActions().size() != 2) {
+ fail("Expecting 2 actions: "+service.getActions().size());
+ }
+
+ if ((service.getActions().get(0) instanceof ReceiveMessageAction) == false) {
+ fail("Action 1 was not ReceiveMessageAction: "+service.getActions().get(0));
+ }
+
+ if ((service.getActions().get(1) instanceof ScheduleStateAction) == false) {
+ fail("Action 2 was not ScheduleStateAction: "+service.getActions().get(1));
+ }
+
+ if (model.getServices().size() != 3) {
+ fail("Three services expected: "+model.getServices().size());
+ }
+
+ // TODO: Need to check if new service has been inserted
+ // in the middle of the previously inserted interactions
+
+ // Check actions
+ if (newService.getActions().size() != 2) {
+ fail("Now Expecting 2 action: "+newService.getActions().size());
+ }
+
+ if ((newService.getActions().get(0) instanceof ReceiveMessageAction) == false) {
+ fail("Action 1 was not ReceiveMessageAction: "+newService.getActions().get(0));
+ }
+
+ if ((newService.getActions().get(1) instanceof ScheduleStateAction) == false) {
+ fail("Action 2 was not ScheduleStateAction: "+newService.getActions().get(1));
+ }
+
+ ScheduleStateAction ssa=(ScheduleStateAction)newService.getActions().get(1);
+
+ ESBService newService2=model.getService(ssa.getPropertyValue(
+ ScheduleStateAction.SERVICE_CATEGORY),ssa.getPropertyValue(
+ ScheduleStateAction.SERVICE_NAME));
+
+ if (newService2 == null) {
+ fail("Failed to find final service");
+ }
+
+ if (newService2.getActions().size() != 1) {
+ fail("Only expecting one action: "+newService2.getActions().size());
+ }
+
+ ReceiveMessageAction recv4=(ReceiveMessageAction)
+ newService2.getActions().get(0);
+
+ String mtype4=InteractionUtil.getTypeString(ref2);
+
+ if (recv4.getPropertyValue("messageType").equals(mtype4)==false) {
+ fail("Message type '"+recv4.getPropertyValue("messageType")+
+ "' invalid, expecting: "+mtype4);
+ }
+
+
+ ReceiveMessageAction recv3=(ReceiveMessageAction)
+ newService.getActions().get(0);
+
+ String mtype3=InteractionUtil.getTypeString(ref3);
+
+ if (recv3.getPropertyValue("messageType").equals(mtype3)==false) {
+ fail("Message type '"+recv3.getPropertyValue("messageType")+
+ "' invalid, expecting: "+mtype3);
+ }
+ }
+
public void testInsertReceiveRequestAction() {
String fromRoleName="role1";
String toRoleName="role2";
@@ -305,7 +555,7 @@
msig.getTypes().add(ref);
- if (rule.insert(context, model, mobj, -1) == false) {
+ if (rule.insert(context, model, mobj, null) == false) {
fail("Failed to insert");
}
@@ -366,7 +616,7 @@
msig.getTypes().add(ref);
- if (rule.insert(context, model, mobj, -1) == false) {
+ if (rule.insert(context, model, mobj, null) == false) {
fail("Failed to insert");
}
@@ -433,7 +683,7 @@
msig.getTypes().add(ref);
- if (rule.insert(context, model, mobj, -1) == false) {
+ if (rule.insert(context, model, mobj, null) == false) {
fail("Failed to insert");
}
@@ -530,7 +780,7 @@
msig.getTypes().add(ref);
- if (rule.insert(context, model, mobj, -1) == false) {
+ if (rule.insert(context, model, mobj, null) == false) {
fail("Failed to insert");
}
@@ -611,7 +861,7 @@
msig.getTypes().add(ref);
- if (rule.insert(context, model, mobj, -1) == false) {
+ if (rule.insert(context, model, mobj, null) == false) {
fail("Failed to insert");
}
@@ -631,4 +881,105 @@
"' invalid, expecting: "+toRoleName);
}
}
+
+ public void testChangeFirstReceiveAction() {
+ ConversationInteractionModelChangeRule rule=new ConversationInteractionModelChangeRule();
+
+ TestESBLanguageModel model=new TestESBLanguageModel();
+
+ TestESBService service=(TestESBService)
+ model.createService("testcategory", "testname");
+
+ model.addService(service);
+
+ // Add gateway service
+ TestESBService gwservice=(TestESBService)
+ model.createService("testcategory", "gateway");
+ gwservice.setGateway(true);
+
+ MessageRouterAction mra=new MessageRouterAction(gwservice);
+ gwservice.setGatewayAction(mra);
+
+ model.setGatewayService(gwservice);
+
+
+ TestModelChangeContext context=new TestModelChangeContext();
+ context.setParent(service);
+
+ Role role=new Role();
+ role.setName("role1");
+
+ context.setRole(role);
+
+ Conversation conv=new Conversation();
+ ModelName mname=new ModelName();
+ mname.setLocatedRole(role);
+ conv.setModelName(mname);
+
+ ConversationInteraction mobj=new ConversationInteraction();
+ mobj.setToRole(role);
+ conv.getBlock().getContents().add(mobj);
+
+
+ MessageSignature msig=new MessageSignature();
+ mobj.setMessageSignature(msig);
+
+ TypeReference ref=new TypeReference();
+ ref.setNamespace("ns");
+ ref.setLocalpart("lp1");
+
+ msig.getTypes().add(ref);
+
+ // Create ReceiveMessageAction
+ if (rule.insert(context, model, mobj, null) == false) {
+ fail("Failed to insert");
+ }
+
+ // Change local part
+ ref.setLocalpart("lp2");
+
+ if (rule.update(context, model, mobj, 0) == false) {
+ fail("Failed to update");
+ }
+
+ // Check actions
+ if (service.getActions().size() != 1) {
+ fail("Expecting 1 action: "+service.getActions().size());
+ }
+
+ if ((service.getActions().get(0) instanceof ReceiveMessageAction) == false) {
+ fail("Action was not ReceiveMessageAction: "+service.getActions().get(0));
+ }
+
+ if (model.getServices().size() != 1) {
+ fail("One service expected: "+model.getServices().size());
+ }
+
+ ReceiveMessageAction action=(ReceiveMessageAction)service.getActions().get(0);
+
+ String mtype=InteractionUtil.getTypeString(ref);
+
+ if (action.getPropertyValue("messageType").equals(mtype)==false) {
+ fail("Message type '"+action.getPropertyValue("messageType")+
+ "' invalid, expecting: "+mtype);
+ }
+
+ if (mra.getNumberOfRoutes() != 1) {
+ fail("One route expected: "+mra.getNumberOfRoutes());
+ }
+
+ org.w3c.dom.Element route=mra.getRouteElement(0);
+
+ org.w3c.dom.NodeList mesgs=route.getElementsByTagName(MessageRouterAction.MESSAGE_ELEMENT);
+
+ if (mesgs.getLength() != 1) {
+ fail("Too many route message elements: "+mesgs.getLength());
+ }
+
+ org.w3c.dom.Element mesg=(org.w3c.dom.Element)mesgs.item(0);
+
+ if (mesg.getAttribute(MessageRouterAction.TYPE_ATTR).equals(mtype) == false) {
+ fail("Route message type has not been updated");
+ }
+ }
}
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/test/org/jboss/tools/overlord/cdl/jbossesb/model/change/IfModelChangeRuleTest.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/test/org/jboss/tools/overlord/cdl/jbossesb/model/change/IfModelChangeRuleTest.java 2008-09-03 15:32:42 UTC (rev 307)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/test/org/jboss/tools/overlord/cdl/jbossesb/model/change/IfModelChangeRuleTest.java 2008-09-05 20:12:05 UTC (rev 308)
@@ -53,7 +53,7 @@
mobj.getRoles().add(role);
- if (rule.insert(context, model, mobj, -1) == false) {
+ if (rule.insert(context, model, mobj, null) == false) {
fail("Failed to insert");
}
@@ -136,7 +136,7 @@
mobj.getRoles().add(role);
- if (rule.insert(context, model, mobj, -1) == false) {
+ if (rule.insert(context, model, mobj, null) == false) {
fail("Failed to insert");
}
@@ -327,7 +327,7 @@
mobj.getRoles().add(role);
- if (rule.insert(context, model, mobj, -1) == false) {
+ if (rule.insert(context, model, mobj, null) == false) {
fail("Failed to insert");
}
@@ -481,7 +481,7 @@
ConditionalBlock cb1=new ConditionalBlock();
mobj.getConditionalBlocks().add(cb1);
- if (rule.insert(context, model, mobj, -1) == false) {
+ if (rule.insert(context, model, mobj, null) == false) {
fail("Failed to insert");
}
@@ -571,7 +571,7 @@
Block b1=new Block();
mobj.setElseBlock(b1);
- if (rule.insert(context, model, mobj, -1) == false) {
+ if (rule.insert(context, model, mobj, null) == false) {
fail("Failed to insert");
}
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/test/org/jboss/tools/overlord/cdl/jbossesb/model/change/ParallelModelChangeRuleTest.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/test/org/jboss/tools/overlord/cdl/jbossesb/model/change/ParallelModelChangeRuleTest.java 2008-09-03 15:32:42 UTC (rev 307)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/test/org/jboss/tools/overlord/cdl/jbossesb/model/change/ParallelModelChangeRuleTest.java 2008-09-05 20:12:05 UTC (rev 308)
@@ -62,7 +62,7 @@
Block cb3=new Block();
mobj.getBlocks().add(cb3);
- if (rule.insert(context, model, mobj, -1) == false) {
+ if (rule.insert(context, model, mobj, null) == false) {
fail("Failed to insert");
}
@@ -304,7 +304,7 @@
cb1.getContents().add(interaction);
- if (rule.insert(context, model, mobj, -1) == false) {
+ if (rule.insert(context, model, mobj, null) == false) {
fail("Failed to insert");
}
@@ -430,7 +430,7 @@
cb1.getContents().add(interaction);
- if (rule.insert(context, model, mobj, -1) == false) {
+ if (rule.insert(context, model, mobj, null) == false) {
fail("Failed to insert");
}
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/test/org/jboss/tools/overlord/cdl/jbossesb/model/change/RunModelChangeRuleTest.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/test/org/jboss/tools/overlord/cdl/jbossesb/model/change/RunModelChangeRuleTest.java 2008-09-03 15:32:42 UTC (rev 307)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/test/org/jboss/tools/overlord/cdl/jbossesb/model/change/RunModelChangeRuleTest.java 2008-09-05 20:12:05 UTC (rev 308)
@@ -76,7 +76,7 @@
conv.getBlock().getContents().add(mobj);
- if (rule.insert(context, model, mobj, -1) == false) {
+ if (rule.insert(context, model, mobj, null) == false) {
fail("Failed to insert");
}
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/test/org/jboss/tools/overlord/cdl/jbossesb/model/change/WhenModelChangeRuleTest.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/test/org/jboss/tools/overlord/cdl/jbossesb/model/change/WhenModelChangeRuleTest.java 2008-09-03 15:32:42 UTC (rev 307)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/test/org/jboss/tools/overlord/cdl/jbossesb/model/change/WhenModelChangeRuleTest.java 2008-09-05 20:12:05 UTC (rev 308)
@@ -63,7 +63,7 @@
mobj.getRoles().add(role);
- if (rule.insert(context, model, mobj, -1) == false) {
+ if (rule.insert(context, model, mobj, null) == false) {
fail("Failed to insert");
}
@@ -258,7 +258,7 @@
ConditionalBlock cb1=new ConditionalBlock();
mobj.getConditionalBlocks().add(cb1);
- if (rule.insert(context, model, mobj, -1) == false) {
+ if (rule.insert(context, model, mobj, null) == false) {
fail("Failed to insert");
}
@@ -348,7 +348,7 @@
ConditionalBlock cb3=new ConditionalBlock();
mobj.getConditionalBlocks().add(cb3);
- if (rule.insert(context, model, mobj, -1) == false) {
+ if (rule.insert(context, model, mobj, null) == false) {
fail("Failed to insert");
}
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/test/org/jboss/tools/overlord/cdl/jbossesb/model/change/WhileModelChangeRuleTest.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/test/org/jboss/tools/overlord/cdl/jbossesb/model/change/WhileModelChangeRuleTest.java 2008-09-03 15:32:42 UTC (rev 307)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.jbossesb/src/test/org/jboss/tools/overlord/cdl/jbossesb/model/change/WhileModelChangeRuleTest.java 2008-09-05 20:12:05 UTC (rev 308)
@@ -80,7 +80,7 @@
mobj.getRoles().add(role);
- if (rule.insert(context, model, mobj, -1) == false) {
+ if (rule.insert(context, model, mobj, null) == false) {
fail("Failed to insert");
}
@@ -210,7 +210,7 @@
mobj.getBlock().getContents().add(interaction);
- if (rule.insert(context, model, mobj, -1) == false) {
+ if (rule.insert(context, model, mobj, null) == false) {
fail("Failed to insert");
}
@@ -340,7 +340,7 @@
mobj.getBlock().getContents().add(interaction);
- if (rule.insert(context, model, mobj, -1) == false) {
+ if (rule.insert(context, model, mobj, null) == false) {
fail("Failed to insert");
}
@@ -473,7 +473,7 @@
mobj.getRoles().add(role);
- if (rule.insert(context, model, mobj, -1) == false) {
+ if (rule.insert(context, model, mobj, null) == false) {
fail("Failed to insert");
}
15 years, 8 months
Overlord SVN: r307 - in cdl/trunk/distribution/validator/jbossesb: conf and 1 other directory.
by overlord-commits@lists.jboss.org
Author: objectiser
Date: 2008-09-03 11:32:42 -0400 (Wed, 03 Sep 2008)
New Revision: 307
Added:
cdl/trunk/distribution/validator/jbossesb/conf/jbossesb-properties-validator.xml
Removed:
cdl/trunk/distribution/validator/jbossesb/conf/jbossesb-properties-monitor.xml
Modified:
cdl/trunk/distribution/validator/jbossesb/build.xml
Log:
Fixed to change 'monitor' to 'validator'.
Modified: cdl/trunk/distribution/validator/jbossesb/build.xml
===================================================================
--- cdl/trunk/distribution/validator/jbossesb/build.xml 2008-09-03 11:48:17 UTC (rev 306)
+++ cdl/trunk/distribution/validator/jbossesb/build.xml 2008-09-03 15:32:42 UTC (rev 307)
@@ -2,30 +2,30 @@
<property name="target-server" value="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}" />
- <target name="deploy" depends="register-monitor-filter">
+ <target name="deploy" depends="register-validator-filter">
<echo message="Deploy pi4soa.sar, overlord-cdl-validator-jbossesb.esb files to the target server '${target-server}'." />
<copy todir="${target-server}/deploy/pi4soa.sar">
<fileset dir="${basedir}/pi4soa.sar"/>
</copy>
- <copy todir="${target-server}/deploy/monitor.esb">
+ <copy todir="${target-server}/deploy/overlord-cdl-validator.esb">
<fileset dir="${basedir}/overlord-cdl-validator-jbossesb.esb" />
</copy>
</target>
- <target name="undeploy" depends="unregister-monitor-filter">
+ <target name="undeploy" depends="unregister-validator-filter">
<echo message="Undeploy pi4soa.sar, overlord-cdl-validator-jbossesb.esb files from the target sever '${target-server}'."/>
<delete dir="${target-server}/deploy/pi4soa.sar" />
- <delete dir="${target-server}/deploy/overlord-cdl-validator-jbossesb.esb" />
+ <delete dir="${target-server}/deploy/overlord-cdl-validator.esb" />
</target>
- <target name="register-monitor-filter">
- <echo message="register the monitor filter in the jbossesb-properties file" />
+ <target name="register-validator-filter">
+ <echo message="register the validator filter in the jbossesb-properties file" />
<delete file="${target-server}/deploy/jbossesb.sar/jbossesb-properties.xml" />
- <copy file="${basedir}/conf/jbossesb-properties-monitor.xml" tofile="${target-server}/deploy/jbossesb.sar/jbossesb-properties.xml" />
+ <copy file="${basedir}/conf/jbossesb-properties-validator.xml" tofile="${target-server}/deploy/jbossesb.sar/jbossesb-properties.xml" />
</target>
- <target name="unregister-monitor-filter">
- <echo message="unregister the monitor filter from the jbossesb-properties file" />
+ <target name="unregister-validator-filter">
+ <echo message="unregister the validator filter from the jbossesb-properties file" />
<delete file="${target-server}/deploy/jbossesb.sar/jbossesb-properties.xml" />
<copy file="${basedir}/conf/jbossesb-properties.xml" tofile="${target-server}/deploy/jbossesb.sar/jbossesb-properties.xml" />
</target>
Deleted: cdl/trunk/distribution/validator/jbossesb/conf/jbossesb-properties-monitor.xml
===================================================================
--- cdl/trunk/distribution/validator/jbossesb/conf/jbossesb-properties-monitor.xml 2008-09-03 11:48:17 UTC (rev 306)
+++ cdl/trunk/distribution/validator/jbossesb/conf/jbossesb-properties-monitor.xml 2008-09-03 15:32:42 UTC (rev 307)
@@ -1,95 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- JBoss, Home of Professional Open Source
- Copyright 2006, JBoss Inc., and others contributors as indicated
- by the @authors tag. All rights reserved.
- See the copyright.txt in the distribution for a
- full listing of individual contributors.
- This copyrighted material is made available to anyone wishing to use,
- modify, copy, or redistribute it subject to the terms and conditions
- of the GNU Lesser General Public License, v. 2.1.
- This program is distributed in the hope that it will be useful, but WITHOUT A
- 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,
- v.2.1 along with this distribution; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- MA 02110-1301, USA.
-
- (C) 2005-2006,
- @author JBoss Inc.
--->
-<!-- $Id: jbossesb-unittest-properties.xml $ -->
-<!--
- These options are described in the JBossESB manual.
- Defaults are provided here for convenience only.
-
- Please read through this file prior to using the system, and consider
- updating the specified entries.
--->
-<esb
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="jbossesb-1_0.xsd">
- <properties name="core">
- <property name="org.jboss.soa.esb.jndi.server.context.factory" value="org.jnp.interfaces.NamingContextFactory"/>
- <property name="org.jboss.soa.esb.jndi.server.url" value="${jboss.bind.address}:1099"/>
- <property name="org.jboss.soa.esb.persistence.connection.factory" value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
- <property name="org.jboss.soa.esb.loadbalancer.policy" value="org.jboss.soa.esb.listeners.ha.RoundRobin"/>
- <property name="jboss.esb.invm.scope.default" value="NONE"/>
- </properties>
- <properties name="registry">
- <property name="org.jboss.soa.esb.registry.queryManagerURI" value="org.apache.juddi.registry.local.InquiryService#inquire"/>
- <property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="org.apache.juddi.registry.local.PublishService#publish"/>
- <property name="org.jboss.soa.esb.registry.implementationClass" value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
- <property name="org.jboss.soa.esb.registry.factoryClass" value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
- <property name="org.jboss.soa.esb.registry.user" value="jbossesb"/>
- <property name="org.jboss.soa.esb.registry.password" value="password"/>
- <!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
- <property name="org.jboss.soa.esb.scout.proxy.transportClass" value="org.apache.ws.scout.transport.LocalTransport"/>
- </properties>
- <properties name="transports" depends="core">
- <property name="org.jboss.soa.esb.mail.smtp.host" value="localhost"/>
- <property name="org.jboss.soa.esb.mail.smtp.user" value="jbossesb"/>
- <property name="org.jboss.soa.esb.mail.smtp.password" value=""/>
- <property name="org.jboss.soa.esb.mail.smtp.port" value="25"/>
- <property name="org.jboss.soa.esb.mail.smtp.auth" value="true"/>
- <property name="org.jboss.soa.esb.ftp.localdir" value="/tmp"/>
- <property name="org.jboss.soa.esb.ftp.remotedir" value="/tmp"/>
- <property name="org.jboss.soa.esb.jms.connectionPool" value="20"/>
- <property name="org.jboss.soa.esb.jms.sessionSleep" value="30"/>
- </properties>
- <properties name="connection">
- <property name="min-pool-size" value="5"/>
- <property name="max-pool=size" value="10"/>
- <property name="blocking-timeout-millis" value="5000"/>
- <property name="abandoned-connection-timeout" value="10000"/>
- <property name="abandoned-connection-time-interval" value="30000"/>
- </properties>
- <properties name="dbstore">
-
- <!-- connection manager type -->
- <!-- <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.StandaloneConnectionManager"/> -->
- <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.J2eeConnectionManager"/>
-
- <!-- this property is only used if using the j2ee connection manager -->
- <property name="org.jboss.soa.esb.persistence.db.datasource.name" value="java:/JBossESBDS"/>
-
- <!-- standalone connection pooling settings -->
- <property name="org.jboss.soa.esb.persistence.db.connection.url" value="jdbc:hsqldb:hsql://localhost:9001/"/>
- <property name="org.jboss.soa.esb.persistence.db.jdbc.driver" value="org.hsqldb.jdbcDriver"/>
- <property name="org.jboss.soa.esb.persistence.db.user" value="sa"/>
- <property name="org.jboss.soa.esb.persistence.db.pwd" value=""/>
- <property name="org.jboss.soa.esb.persistence.db.pool.initial.size" value="2"/>
- <property name="org.jboss.soa.esb.persistence.db.pool.min.size" value="2"/>
- <property name="org.jboss.soa.esb.persistence.db.pool.max.size" value="5"/>
- <!--table managed by pool to test for valid connections - created by pool automatically -->
- <property name="org.jboss.soa.esb.persistence.db.pool.test.table" value="pooltest"/>
- <property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis" value="5000"/>
-
- </properties>
- <properties name="filters">
- <property name="org.jboss.soa.esb.filter.1" value="org.jboss.internal.soa.esb.message.filter.MetaDataFilter"/>
- <property name="org.jboss.soa.esb.filter.2" value="org.jboss.internal.soa.esb.message.filter.GatewayFilter"/>
- <property name="org.jboss.soa.esb.filter.10" value="org.pi4soa.jbossesb.validator.ValidatorFilter" />
- </properties>
-</esb>
Added: cdl/trunk/distribution/validator/jbossesb/conf/jbossesb-properties-validator.xml
===================================================================
--- cdl/trunk/distribution/validator/jbossesb/conf/jbossesb-properties-validator.xml (rev 0)
+++ cdl/trunk/distribution/validator/jbossesb/conf/jbossesb-properties-validator.xml 2008-09-03 15:32:42 UTC (rev 307)
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ JBoss, Home of Professional Open Source
+ Copyright 2006, JBoss Inc., and others contributors as indicated
+ by the @authors tag. All rights reserved.
+ See the copyright.txt in the distribution for a
+ full listing of individual contributors.
+ This copyrighted material is made available to anyone wishing to use,
+ modify, copy, or redistribute it subject to the terms and conditions
+ of the GNU Lesser General Public License, v. 2.1.
+ This program is distributed in the hope that it will be useful, but WITHOUT A
+ 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,
+ v.2.1 along with this distribution; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ MA 02110-1301, USA.
+
+ (C) 2005-2006,
+ @author JBoss Inc.
+-->
+<!-- $Id: jbossesb-unittest-properties.xml $ -->
+<!--
+ These options are described in the JBossESB manual.
+ Defaults are provided here for convenience only.
+
+ Please read through this file prior to using the system, and consider
+ updating the specified entries.
+-->
+<esb
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="jbossesb-1_0.xsd">
+ <properties name="core">
+ <property name="org.jboss.soa.esb.jndi.server.context.factory" value="org.jnp.interfaces.NamingContextFactory"/>
+ <property name="org.jboss.soa.esb.jndi.server.url" value="${jboss.bind.address}:1099"/>
+ <property name="org.jboss.soa.esb.persistence.connection.factory" value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
+ <property name="org.jboss.soa.esb.loadbalancer.policy" value="org.jboss.soa.esb.listeners.ha.RoundRobin"/>
+ <property name="jboss.esb.invm.scope.default" value="NONE"/>
+ </properties>
+ <properties name="registry">
+ <property name="org.jboss.soa.esb.registry.queryManagerURI" value="org.apache.juddi.registry.local.InquiryService#inquire"/>
+ <property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="org.apache.juddi.registry.local.PublishService#publish"/>
+ <property name="org.jboss.soa.esb.registry.implementationClass" value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
+ <property name="org.jboss.soa.esb.registry.factoryClass" value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
+ <property name="org.jboss.soa.esb.registry.user" value="jbossesb"/>
+ <property name="org.jboss.soa.esb.registry.password" value="password"/>
+ <!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
+ <property name="org.jboss.soa.esb.scout.proxy.transportClass" value="org.apache.ws.scout.transport.LocalTransport"/>
+ </properties>
+ <properties name="transports" depends="core">
+ <property name="org.jboss.soa.esb.mail.smtp.host" value="localhost"/>
+ <property name="org.jboss.soa.esb.mail.smtp.user" value="jbossesb"/>
+ <property name="org.jboss.soa.esb.mail.smtp.password" value=""/>
+ <property name="org.jboss.soa.esb.mail.smtp.port" value="25"/>
+ <property name="org.jboss.soa.esb.mail.smtp.auth" value="true"/>
+ <property name="org.jboss.soa.esb.ftp.localdir" value="/tmp"/>
+ <property name="org.jboss.soa.esb.ftp.remotedir" value="/tmp"/>
+ <property name="org.jboss.soa.esb.jms.connectionPool" value="20"/>
+ <property name="org.jboss.soa.esb.jms.sessionSleep" value="30"/>
+ </properties>
+ <properties name="connection">
+ <property name="min-pool-size" value="5"/>
+ <property name="max-pool=size" value="10"/>
+ <property name="blocking-timeout-millis" value="5000"/>
+ <property name="abandoned-connection-timeout" value="10000"/>
+ <property name="abandoned-connection-time-interval" value="30000"/>
+ </properties>
+ <properties name="dbstore">
+
+ <!-- connection manager type -->
+ <!-- <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.StandaloneConnectionManager"/> -->
+ <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.J2eeConnectionManager"/>
+
+ <!-- this property is only used if using the j2ee connection manager -->
+ <property name="org.jboss.soa.esb.persistence.db.datasource.name" value="java:/JBossESBDS"/>
+
+ <!-- standalone connection pooling settings -->
+ <property name="org.jboss.soa.esb.persistence.db.connection.url" value="jdbc:hsqldb:hsql://localhost:9001/"/>
+ <property name="org.jboss.soa.esb.persistence.db.jdbc.driver" value="org.hsqldb.jdbcDriver"/>
+ <property name="org.jboss.soa.esb.persistence.db.user" value="sa"/>
+ <property name="org.jboss.soa.esb.persistence.db.pwd" value=""/>
+ <property name="org.jboss.soa.esb.persistence.db.pool.initial.size" value="2"/>
+ <property name="org.jboss.soa.esb.persistence.db.pool.min.size" value="2"/>
+ <property name="org.jboss.soa.esb.persistence.db.pool.max.size" value="5"/>
+ <!--table managed by pool to test for valid connections - created by pool automatically -->
+ <property name="org.jboss.soa.esb.persistence.db.pool.test.table" value="pooltest"/>
+ <property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis" value="5000"/>
+
+ </properties>
+ <properties name="filters">
+ <property name="org.jboss.soa.esb.filter.1" value="org.jboss.internal.soa.esb.message.filter.MetaDataFilter"/>
+ <property name="org.jboss.soa.esb.filter.2" value="org.jboss.internal.soa.esb.message.filter.GatewayFilter"/>
+ <property name="org.jboss.soa.esb.filter.10" value="org.pi4soa.jbossesb.validator.ValidatorFilter" />
+ </properties>
+</esb>
15 years, 8 months
Overlord SVN: r306 - in cdl/trunk/samples/jbossesb/purchasing: store/src/main/java/com/acme/services/broker and 1 other directory.
by overlord-commits@lists.jboss.org
Author: objectiser
Date: 2008-09-03 07:48:17 -0400 (Wed, 03 Sep 2008)
New Revision: 306
Modified:
cdl/trunk/samples/jbossesb/purchasing/models/PurchaseGoods.cdm
cdl/trunk/samples/jbossesb/purchasing/store/src/main/java/com/acme/services/broker/PurchaseGoods.java
Log:
Changed choreography to use 'Store' participant, and updated the associated conversation type against the participant and the Java 'session' class for that participant.
Modified: cdl/trunk/samples/jbossesb/purchasing/models/PurchaseGoods.cdm
===================================================================
--- cdl/trunk/samples/jbossesb/purchasing/models/PurchaseGoods.cdm 2008-09-03 11:28:37 UTC (rev 305)
+++ cdl/trunk/samples/jbossesb/purchasing/models/PurchaseGoods.cdm 2008-09-03 11:48:17 UTC (rev 306)
@@ -19,56 +19,56 @@
<tokenLocators description="This is the token locator CreditCheckInvalidIDLocator" token="//@typeDefinitions/(a)tokens.0" informationType="//@typeDefinitions/(a)informationTypes.4" query="//@id" name="CreditCheckInvalidIDLocator"/>
<tokenLocators description="This is the token locator CreditCheckRequestIDLocator" token="//@typeDefinitions/(a)tokens.0" informationType="//@typeDefinitions/(a)informationTypes.3" query="//@id" name="CreditCheckRequestIDLocator"/>
<tokenLocators description="This is the token locator CreditCheckResponseIDLocator" token="//@typeDefinitions/(a)tokens.0" informationType="//@typeDefinitions/(a)informationTypes.5" query="//@id" name="CreditCheckResponseIDLocator"/>
- <roleTypes description="This is the role type Broker" name="Broker">
- <behaviors description="This is the behavior BrokerBehavior" name="BrokerBehavior"/>
- </roleTypes>
<roleTypes description="This is the role type Buyer" name="Buyer">
<behaviors description="This is the behavior BuyerBehavior" name="BuyerBehavior"/>
</roleTypes>
<roleTypes description="This is the role type CreditAgency" name="CreditAgency">
<behaviors description="This is the behavior CreditAgencyBehavior" name="CreditAgencyBehavior"/>
</roleTypes>
- <relationshipTypes description="Relationship between Broker and CreditAgency" name="BrokerToCreditAgencyRel" firstRoleType="//@typeDefinitions/(a)roleTypes.0" secondRoleType="//@typeDefinitions/(a)roleTypes.2"/>
- <relationshipTypes description="Relationship between Buyer and Broker" name="BuyerToBrokerRel" firstRoleType="//@typeDefinitions/(a)roleTypes.1" secondRoleType="//@typeDefinitions/(a)roleTypes.0"/>
- <participantTypes description="This is the participant type Broker" name="Broker" roleTypes="//@typeDefinitions/(a)roleTypes.0">
- <semanticAnnotations annotation="jboss.overlord.samples.Purchasing@Broker" name="conversationType"/>
- </participantTypes>
- <participantTypes description="This is the participant type Buyer" name="Buyer" roleTypes="//@typeDefinitions/(a)roleTypes.1">
+ <roleTypes description="This is the role type Store" name="Store">
+ <behaviors description="This is the behavior StoreBehavior" name="StoreBehavior"/>
+ </roleTypes>
+ <relationshipTypes description="Relationship between Buyer and Store" name="BuyerToStoreRel" firstRoleType="//@typeDefinitions/(a)roleTypes.0" secondRoleType="//@typeDefinitions/(a)roleTypes.2"/>
+ <relationshipTypes description="Relationship between Store and CreditAgency" name="StoreToCreditAgencyRel" firstRoleType="//@typeDefinitions/(a)roleTypes.2" secondRoleType="//@typeDefinitions/(a)roleTypes.1"/>
+ <participantTypes description="This is the participant type Buyer" name="Buyer" roleTypes="//@typeDefinitions/(a)roleTypes.0">
<semanticAnnotations annotation="jboss.overlord.samples.Purchasing@Buyer" name="conversationType"/>
</participantTypes>
- <participantTypes description="This is the participant type CreditAgency" name="CreditAgency" roleTypes="//@typeDefinitions/(a)roleTypes.2">
+ <participantTypes description="This is the participant type CreditAgency" name="CreditAgency" roleTypes="//@typeDefinitions/(a)roleTypes.1">
<semanticAnnotations annotation="jboss.overlord.samples.Purchasing@CreditAgency" name="conversationType"/>
</participantTypes>
- <channelTypes description="This is the channel type BrokerChannelType" name="BrokerChannelType" referenceToken="//@typeDefinitions/(a)tokens.1" roleType="//@typeDefinitions/(a)roleTypes.0">
+ <participantTypes description="This is the participant type Store" name="Store" roleTypes="//@typeDefinitions/(a)roleTypes.2">
+ <semanticAnnotations annotation="jboss.overlord.samples.Purchasing@Store" name="conversationType"/>
+ </participantTypes>
+ <channelTypes description="This is the channel type CreditAgencyChannelType" name="CreditAgencyChannelType" referenceToken="//@typeDefinitions/(a)tokens.1" roleType="//@typeDefinitions/(a)roleTypes.1">
<identities description="ID" tokens="//@typeDefinitions/(a)tokens.0"/>
</channelTypes>
- <channelTypes description="This is the channel type CreditAgencyChannelType" name="CreditAgencyChannelType" referenceToken="//@typeDefinitions/(a)tokens.1" roleType="//@typeDefinitions/(a)roleTypes.2">
+ <channelTypes description="This is the channel type StoreChannelType" name="StoreChannelType" referenceToken="//@typeDefinitions/(a)tokens.1" roleType="//@typeDefinitions/(a)roleTypes.2">
<identities description="ID" tokens="//@typeDefinitions/(a)tokens.0"/>
</channelTypes>
</typeDefinitions>
<choreographies description="Choreography flow for the PurchaseGoods process" name="PurchaseGoodsProcess" root="true">
- <variableDefinitions description="Channel to facilitate interaction to Broker" name="BrokerChannel" type="//@typeDefinitions/(a)channelTypes.0"/>
- <variableDefinitions description="Channel to facilitate interaction to CreditAgency" name="CreditAgencyChannel" type="//@typeDefinitions/(a)channelTypes.1"/>
- <activities xsi:type="org.pi4soa.cdl:Interaction" name="BuyRequest" operation="buy" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.1">
+ <variableDefinitions description="Channel to facilitate interaction to CreditAgency" name="CreditAgencyChannel" type="//@typeDefinitions/(a)channelTypes.0"/>
+ <variableDefinitions description="Channel to facilitate interaction to Store" name="StoreChannel" type="//@typeDefinitions/(a)channelTypes.1"/>
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="BuyRequest" operation="buy" channelVariable="//@choreographies.0/(a)variableDefinitions.1" relationship="//@typeDefinitions/(a)relationshipTypes.0">
<exchangeDetails description="This is the exchange details for the request exchange associated with interaction BuyRequest" name="BuyRequestRequestExchange" type="//@typeDefinitions/(a)informationTypes.1"/>
</activities>
- <activities xsi:type="org.pi4soa.cdl:Interaction" name="CreditCheckRequest" operation="checkCredit" channelVariable="//@choreographies.0/(a)variableDefinitions.1" relationship="//@typeDefinitions/(a)relationshipTypes.0">
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="CreditCheckRequest" operation="checkCredit" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.1">
<exchangeDetails description="This is the exchange details for the request exchange associated with interaction CreditCheckRequest" name="CreditCheckRequestRequestExchange" type="//@typeDefinitions/(a)informationTypes.3"/>
</activities>
<activities xsi:type="org.pi4soa.cdl:Choice">
<activities xsi:type="org.pi4soa.cdl:Sequence">
- <activities xsi:type="org.pi4soa.cdl:Interaction" name="CreditCheckResponse" operation="checkCredit" channelVariable="//@choreographies.0/(a)variableDefinitions.1" relationship="//@typeDefinitions/(a)relationshipTypes.0">
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="CreditCheckResponse" operation="checkCredit" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.1">
<exchangeDetails description="This is the exchange details for the respond exchange associated with interaction CreditCheckResponse" name="CreditCheckResponseRespondExchange" type="//@typeDefinitions/(a)informationTypes.5" action="Respond"/>
</activities>
- <activities xsi:type="org.pi4soa.cdl:Interaction" name="BuyResponse" operation="buy" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.1">
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="BuyResponse" operation="buy" channelVariable="//@choreographies.0/(a)variableDefinitions.1" relationship="//@typeDefinitions/(a)relationshipTypes.0">
<exchangeDetails description="This is the exchange details for the respond exchange associated with interaction BuyResponse" name="BuyResponseRespondExchange" type="//@typeDefinitions/(a)informationTypes.2" action="Respond"/>
</activities>
</activities>
<activities xsi:type="org.pi4soa.cdl:Sequence">
- <activities xsi:type="org.pi4soa.cdl:Interaction" name="CreditCheckFailed" operation="checkCredit" channelVariable="//@choreographies.0/(a)variableDefinitions.1" relationship="//@typeDefinitions/(a)relationshipTypes.0">
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="CreditCheckFailed" operation="checkCredit" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.1">
<exchangeDetails description="This is the exchange details for the respond exchange associated with interaction CreditCheckFailed" name="CreditCheckFailedRespondExchange" type="//@typeDefinitions/(a)informationTypes.4" action="Respond" faultName="CreditCheckFailed"/>
</activities>
- <activities xsi:type="org.pi4soa.cdl:Interaction" name="BuyFailed" operation="buy" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.1">
+ <activities xsi:type="org.pi4soa.cdl:Interaction" name="BuyFailed" operation="buy" channelVariable="//@choreographies.0/(a)variableDefinitions.1" relationship="//@typeDefinitions/(a)relationshipTypes.0">
<exchangeDetails description="This is the exchange details for the respond exchange associated with interaction BuyFailed" name="BuyFailedRespondExchange" type="//@typeDefinitions/(a)informationTypes.0" action="Respond" faultName="BuyFailed"/>
</activities>
</activities>
Modified: cdl/trunk/samples/jbossesb/purchasing/store/src/main/java/com/acme/services/broker/PurchaseGoods.java
===================================================================
--- cdl/trunk/samples/jbossesb/purchasing/store/src/main/java/com/acme/services/broker/PurchaseGoods.java 2008-09-03 11:28:37 UTC (rev 305)
+++ cdl/trunk/samples/jbossesb/purchasing/store/src/main/java/com/acme/services/broker/PurchaseGoods.java 2008-09-03 11:48:17 UTC (rev 306)
@@ -23,7 +23,7 @@
import org.jboss.soa.overlord.jbossesb.actions.Service;
-@Service(name="{http://www.jboss.org/overlord/purchase}Broker", conversationType="overlord.cdl.samples.purchasing@Broker", root=true)
+@Service(name="{http://www.jboss.org/overlord/purchase}Store", conversationType="overlord.cdl.samples.purchasing@Store", root=true)
public class PurchaseGoods implements Serializable{
private long id;
15 years, 8 months
Overlord SVN: r305 - cdl/trunk/samples/jbossesb.
by overlord-commits@lists.jboss.org
Author: objectiser
Date: 2008-09-03 07:28:37 -0400 (Wed, 03 Sep 2008)
New Revision: 305
Added:
cdl/trunk/samples/jbossesb/brokerage/
Removed:
cdl/trunk/samples/jbossesb/brokage/
Log:
Copied: cdl/trunk/samples/jbossesb/brokerage (from rev 304, cdl/trunk/samples/jbossesb/brokage)
15 years, 8 months