[overlord-commits] Overlord SVN: r549 - in cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb: generator and 1 other directory.
overlord-commits at lists.jboss.org
overlord-commits at lists.jboss.org
Wed Mar 25 07:36:27 EDT 2009
Author: objectiser
Date: 2009-03-25 07:36:27 -0400 (Wed, 25 Mar 2009)
New Revision: 549
Added:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/BuildSystem.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/JBMMessagingSystem.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/JBossMQMessagingSystem.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/MessagingConfigurationGenerator.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/MessagingSystem.java
Removed:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/AbstractBuildSystem.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/BuildSystem.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/JBMConfigurationGenerator.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/JBMQConfigurationGenerator.java
Modified:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/dialogs/GenerateDialog.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/AntBuildSystem.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/Generator.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/GeneratorContext.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/MavenBuildSystem.java
Log:
SOAG-99 Updated ESB service generator to enable the messaging system (JBoss Messaging or JBossMQ) to be selected.
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/dialogs/GenerateDialog.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/dialogs/GenerateDialog.java 2009-03-24 17:52:23 UTC (rev 548)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/dialogs/GenerateDialog.java 2009-03-25 11:36:27 UTC (rev 549)
@@ -52,6 +52,9 @@
m_buildSystems.add(new AntBuildSystem());
m_buildSystems.add(new MavenBuildSystem());
+ m_messagingSystems.add(new JBMMessagingSystem());
+ m_messagingSystems.add(new JBossMQMessagingSystem());
+
initialize(m_file);
}
@@ -282,6 +285,19 @@
gd.widthHint = 100;
m_build.setLayoutData(gd);
+ m_messaging=new Combo(group, SWT.DROP_DOWN);
+
+ for (int i=0; i < m_messagingSystems.size(); i++) {
+ m_messaging.add(m_messagingSystems.get(i).getName());
+ }
+
+ m_messaging.select(0);
+
+ gd = new GridData();
+ gd.horizontalSpan = 1;
+ gd.widthHint = 100;
+ m_messaging.setLayoutData(gd);
+
return(composite);
}
@@ -358,7 +374,8 @@
public void okPressed() {
try {
- GeneratorContext context=new GeneratorContext(getSelectedBuildSystem());
+ GeneratorContext context=new GeneratorContext(getSelectedBuildSystem(),
+ getSelectedMessagingSystem());
Generator generator=new Generator(m_file,
context);
@@ -382,6 +399,10 @@
return(m_buildSystems.get(m_build.getSelectionIndex()));
}
+ protected MessagingSystem getSelectedMessagingSystem() {
+ return(m_messagingSystems.get(m_messaging.getSelectionIndex()));
+ }
+
/**
* This method is used to report an error.
*
@@ -409,5 +430,9 @@
private java.util.List<Button> m_statelessButtons=new java.util.Vector<Button>();
private java.util.List<Text> m_projectNames=new java.util.Vector<Text>();
private Combo m_build=null;
- private java.util.List<BuildSystem> m_buildSystems=new java.util.Vector<BuildSystem>();
+ private java.util.List<BuildSystem> m_buildSystems=
+ new java.util.Vector<BuildSystem>();
+ private Combo m_messaging=null;
+ private java.util.List<MessagingSystem> m_messagingSystems=
+ new java.util.Vector<MessagingSystem>();
}
Deleted: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/AbstractBuildSystem.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/AbstractBuildSystem.java 2009-03-24 17:52:23 UTC (rev 548)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/AbstractBuildSystem.java 2009-03-25 11:36:27 UTC (rev 549)
@@ -1,58 +0,0 @@
-/*
- * 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.runtime.jbossesb.generator;
-
-/**
- * This class represents an abstract build system.
- */
-public abstract class AbstractBuildSystem implements BuildSystem {
-
- private static final String TEMPLATE_SUFFIX = ".template";
- private static final String TEMPLATE_PREFIX = "template/";
-
- /**
- * This method returns the contents for the build
- * configuration file.
- *
- * @param projectName The project name
- * @return The build file contents
- */
- public String getBuildFileContents(String projectName) {
- String ret=null;
-
- java.io.InputStream is=
- AbstractBuildSystem.class.getResourceAsStream(
- TEMPLATE_PREFIX+getName()+TEMPLATE_SUFFIX);
-
- if (is != null) {
-
- try {
- byte[] b=new byte[is.available()];
- is.read(b);
-
- ret = new String(b);
-
- ret = ret.replaceAll("%PROJECT%", projectName);
- } catch(Exception e) {
- e.printStackTrace();
- }
- }
-
- return(ret);
- }
-}
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/AntBuildSystem.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/AntBuildSystem.java 2009-03-24 17:52:23 UTC (rev 548)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/AntBuildSystem.java 2009-03-25 11:36:27 UTC (rev 549)
@@ -20,25 +20,21 @@
/**
* This class represents the Ant build system.
*/
-public class AntBuildSystem extends AbstractBuildSystem {
+public class AntBuildSystem extends BuildSystem {
private static final String BUILD_FILE = "build.xml";
private static final String ANT = "Ant";
private static final String ESB_CONFIG_PATH = "src/conf/jboss-esb.xml";
private static final String DEPLOYMENT_PATH = "src/conf/deployment.xml";
- private static final String JBOSSMQ_CONFIG_PATH = "src/conf/jbmq-queue-service.xml";
- private static final String JBM_CONFIG_PATH = "src/conf/jbm-queue-service.xml";
+ private static final String MESSAGING_CONFIG_PATH = "src/conf";
private static final String JAVA_SOURCE_PATH = "src/java";
private static final String LIBRARY_PATH = "src/lib";
/**
- * This method represents the name of the build
- * system.
- *
- * @return The name
+ * This is the default constructor for the Ant build system.
*/
- public String getName() {
- return(ANT);
+ public AntBuildSystem() {
+ super(ANT);
}
/**
@@ -72,26 +68,16 @@
}
/**
- * This method returns the JBossMQ configuration file
+ * This method returns the messaging configuration
* path.
*
- * @return The JBossMQ configuration file path
+ * @return The messaging configuration path
*/
- public String getJBossMQConfigFilePath() {
- return(JBOSSMQ_CONFIG_PATH);
+ public String getMessagingConfigPath() {
+ return(MESSAGING_CONFIG_PATH);
}
/**
- * This method returns the JBM configuration file
- * path.
- *
- * @return The JBM configuration file path
- */
- public String getJBMConfigFilePath() {
- return(JBM_CONFIG_PATH);
- }
-
- /**
* This method returns the Java source path.
*
* @return The Java source path
Deleted: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/BuildSystem.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/BuildSystem.java 2009-03-24 17:52:23 UTC (rev 548)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/BuildSystem.java 2009-03-25 11:36:27 UTC (rev 549)
@@ -1,97 +0,0 @@
-/*
- * 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.runtime.jbossesb.generator;
-
-/**
- * This interface represents a build system used when
- * generating the ESB projects.
- */
-public interface BuildSystem {
-
- /**
- * This method represents the name of the build
- * system.
- *
- * @return The name
- */
- public String getName();
-
- /**
- * This method returns the build configuration file
- * path.
- *
- * @return The build configuration file path
- */
- public String getBuildFilePath();
-
- /**
- * This method returns the contents for the build
- * configuration file.
- *
- * @param projectName The project name
- * @return The build file contents
- */
- public String getBuildFileContents(String projectName);
-
- /**
- * This method returns the ESB configuration file
- * path.
- *
- * @return The ESB configuration file path
- */
- public String getESBConfigFilePath();
-
- /**
- * This method returns the deployment file
- * path.
- *
- * @return The deployment file path
- */
- public String getDeploymentFilePath();
-
- /**
- * This method returns the JBossMQ configuration file
- * path.
- *
- * @return The JBossMQ configuration file path
- */
- public String getJBossMQConfigFilePath();
-
- /**
- * This method returns the JBM configuration file
- * path.
- *
- * @return The JBM configuration file path
- */
- public String getJBMConfigFilePath();
-
- /**
- * This method returns the Java source path.
- *
- * @return The Java source path
- */
- public String getJavaSourcePath();
-
- /**
- * This method returns the library path.
- *
- * @return The library path, or null if not required
- */
- public String getLibraryPath();
-
-}
Copied: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/BuildSystem.java (from rev 531, cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/AbstractBuildSystem.java)
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/BuildSystem.java (rev 0)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/BuildSystem.java 2009-03-25 11:36:27 UTC (rev 549)
@@ -0,0 +1,124 @@
+/*
+ * 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.runtime.jbossesb.generator;
+
+/**
+ * This class represents an abstract build system.
+ */
+public abstract class BuildSystem {
+
+ private static final String TEMPLATE_SUFFIX = ".template";
+ private static final String TEMPLATE_PREFIX = "template/";
+
+ /**
+ * This is the constructor for the build system.
+ *
+ * @param name The name of the build system
+ */
+ public BuildSystem(String name) {
+ m_name = name;
+ }
+ /**
+ * This method represents the name of the build
+ * system.
+ *
+ * @return The name
+ */
+ public String getName() {
+ return(m_name);
+ }
+
+ /**
+ * This method returns the build configuration file
+ * path.
+ *
+ * @return The build configuration file path
+ */
+ public abstract String getBuildFilePath();
+
+ /**
+ * This method returns the ESB configuration file
+ * path.
+ *
+ * @return The ESB configuration file path
+ */
+ public abstract String getESBConfigFilePath();
+
+ /**
+ * This method returns the deployment file
+ * path.
+ *
+ * @return The deployment file path
+ */
+ public abstract String getDeploymentFilePath();
+
+ /**
+ * This method returns the messaging configuration
+ * path.
+ *
+ * @return The messaging configuration path
+ */
+ public abstract String getMessagingConfigPath();
+
+ /**
+ * This method returns the Java source path.
+ *
+ * @return The Java source path
+ */
+ public abstract String getJavaSourcePath();
+
+ /**
+ * This method returns the library path.
+ *
+ * @return The library path, or null if not required
+ */
+ public abstract String getLibraryPath();
+
+ /**
+ * This method returns the contents for the build
+ * configuration file.
+ *
+ * @param projectName The project name
+ * @return The build file contents
+ */
+ public String getBuildFileContents(String projectName) {
+ String ret=null;
+
+ java.io.InputStream is=
+ BuildSystem.class.getResourceAsStream(
+ TEMPLATE_PREFIX+getName()+TEMPLATE_SUFFIX);
+
+ if (is != null) {
+
+ try {
+ byte[] b=new byte[is.available()];
+ is.read(b);
+
+ ret = new String(b);
+
+ ret = ret.replaceAll("%PROJECT%", projectName);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ return(ret);
+ }
+
+ private String m_name=null;
+}
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/Generator.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/Generator.java 2009-03-24 17:52:23 UTC (rev 548)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/Generator.java 2009-03-25 11:36:27 UTC (rev 549)
@@ -74,7 +74,7 @@
m_conversationBasedGen.add(new BusinessObjectTypeGenerator());
m_modelBasedGen.add(new BuildConfigurationGenerator());
- m_modelBasedGen.add(new JBMQConfigurationGenerator());
+ m_modelBasedGen.add(new MessagingConfigurationGenerator());
m_modelBasedGen.add(new DeploymentFileGenerator());
// Initialize the model
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/GeneratorContext.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/GeneratorContext.java 2009-03-24 17:52:23 UTC (rev 548)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/GeneratorContext.java 2009-03-25 11:36:27 UTC (rev 549)
@@ -27,9 +27,12 @@
* This is the constructor for the generator context.
*
* @param buildSystem The build system
+ * @param messagingSystem The messaging system
*/
- public GeneratorContext(BuildSystem buildSystem) {
+ public GeneratorContext(BuildSystem buildSystem,
+ MessagingSystem messagingSystem) {
m_buildSystem = buildSystem;
+ m_messagingSystem = messagingSystem;
}
/**
@@ -41,5 +44,10 @@
return(m_buildSystem);
}
+ public MessagingSystem getMessagingSystem() {
+ return(m_messagingSystem);
+ }
+
private BuildSystem m_buildSystem=null;
+ private MessagingSystem m_messagingSystem=null;
}
Deleted: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/JBMConfigurationGenerator.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/JBMConfigurationGenerator.java 2009-03-24 17:52:23 UTC (rev 548)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/JBMConfigurationGenerator.java 2009-03-25 11:36:27 UTC (rev 549)
@@ -1,93 +0,0 @@
-/*
- * 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.runtime.jbossesb.generator;
-
-import java.util.logging.Logger;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IJavaProject;
-import org.jboss.tools.overlord.cdl.runtime.jbossesb.model.ESBLanguageModel;
-import org.jboss.tools.overlord.cdl.runtime.jbossesb.model.ESBService;
-
-/**
- * This class implements the model based generator to generate
- * the JBMQ configuration.
- */
-public class JBMConfigurationGenerator implements ModelBasedGenerator {
-
- /**
- * This method generates the relevant artefacts based on
- * the supplied model, within the specified Java project.
- *
- * @param jproj The Java project
- * @param model The model
- * @param context The generator context
- * @throws GeneratorException Failed to generate
- */
- public void generate(IJavaProject jproj,
- ESBLanguageModel model, GeneratorContext context)
- throws GeneratorException {
- IPath buildConfigPath=jproj.getPath().append(
- new Path(context.getBuildSystem().getJBMConfigFilePath()));
-
- IFile jbmqConfigFile=jproj.getProject().getWorkspace().getRoot().getFile(buildConfigPath);
- GeneratorUtil.createParentFolder(jbmqConfigFile);
-
- try {
- jbmqConfigFile.create(null, true,
- new org.eclipse.core.runtime.NullProgressMonitor());
-
- StringBuffer buf=new StringBuffer();
- buf.append("<server>\r\n");
-
- java.util.Iterator<ESBService> iter=model.getServices().iterator();
-
- while (iter.hasNext()) {
- ESBService service=iter.next();
-
- String dest=model.getJMSDefinition(service.getJMSBusIdRef());
-
- if (dest != null) {
- buf.append("\t<mbean code=\"org.jboss.jms.server.destination.QueueService\"\r\n");
- buf.append("\t\t\tname=\""+service.getCategory()+".destination:service=Queue,name="+dest+"\"\r\n");
- buf.append("\t\t\txmbean-dd=\"xmdesc/Queue-xmbean.xml\">\r\n");
- buf.append("\t\t<depends optional-attribute-name=\"ServerPeer\">\r\n");
- buf.append("\t\t\tjboss.messaging:service=ServerPeer\r\n");
- buf.append("\t\t</depends>\r\n");
- buf.append("\t\t<depends>jboss.messaging:service=PostOffice</depends>\r\n");
- buf.append("\t</mbean>\r\n");
- } else {
- logger.severe("Failed to find destination for JMS bus id '"+
- service.getJMSBusIdRef()+"'");
- }
- }
-
- buf.append("</server>\r\n");
-
- jbmqConfigFile.setContents(new java.io.ByteArrayInputStream(
- buf.toString().getBytes()), true, false,
- new org.eclipse.core.runtime.NullProgressMonitor());
- } catch(Exception e) {
- throw new GeneratorException("Failed to save JBM configuration", e);
- }
- }
-
- private static Logger logger = Logger.getLogger("org.jboss.tools.overlord.cdl.runtime.jbossesb.generator");
-}
Copied: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/JBMMessagingSystem.java (from rev 548, cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/JBMConfigurationGenerator.java)
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/JBMMessagingSystem.java (rev 0)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/JBMMessagingSystem.java 2009-03-25 11:36:27 UTC (rev 549)
@@ -0,0 +1,82 @@
+/*
+ * 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.runtime.jbossesb.generator;
+
+import java.util.logging.Logger;
+
+import org.jboss.tools.overlord.cdl.runtime.jbossesb.model.ESBLanguageModel;
+import org.jboss.tools.overlord.cdl.runtime.jbossesb.model.ESBService;
+
+/**
+ * This class provides the information related to the JBM
+ * messaging system.
+ */
+public class JBMMessagingSystem extends MessagingSystem {
+
+ private static final String JBOSS_MESSAGING = "JBoss Messaging";
+ private static final String JBM_CONFIG_FILE = "jbm-queue-service.xml";
+
+ /**
+ * The default constructor.
+ */
+ public JBMMessagingSystem() {
+ super(JBOSS_MESSAGING);
+ }
+
+ /**
+ * This method returns the configuration filename.
+ *
+ * @return The configuration filename
+ */
+ public String getConfigFileName() {
+ return(JBM_CONFIG_FILE);
+ }
+
+ /**
+ * This method returns the messaging configuration for the
+ * supplied service.
+ *
+ * @param model The model
+ * @param service The service
+ * @return The messaging configuration
+ */
+ protected String getServiceConfig(ESBLanguageModel model,
+ ESBService service) {
+ StringBuffer buf=new StringBuffer();
+
+ String dest=model.getJMSDefinition(service.getJMSBusIdRef());
+
+ if (dest != null) {
+ buf.append("\t<mbean code=\"org.jboss.jms.server.destination.QueueService\"\r\n");
+ buf.append("\t\t\tname=\""+service.getCategory()+".destination:service=Queue,name="+dest+"\"\r\n");
+ buf.append("\t\t\txmbean-dd=\"xmdesc/Queue-xmbean.xml\">\r\n");
+ buf.append("\t\t<depends optional-attribute-name=\"ServerPeer\">\r\n");
+ buf.append("\t\t\tjboss.messaging:service=ServerPeer\r\n");
+ buf.append("\t\t</depends>\r\n");
+ buf.append("\t\t<depends>jboss.messaging:service=PostOffice</depends>\r\n");
+ buf.append("\t</mbean>\r\n");
+ } else {
+ logger.severe("Failed to find destination for JMS bus id '"+
+ service.getJMSBusIdRef()+"'");
+ }
+
+ return(buf.toString());
+ }
+
+ private static Logger logger = Logger.getLogger("org.jboss.tools.overlord.cdl.runtime.jbossesb.generator");
+}
Property changes on: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/JBMMessagingSystem.java
___________________________________________________________________
Name: svn:mergeinfo
+
Deleted: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/JBMQConfigurationGenerator.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/JBMQConfigurationGenerator.java 2009-03-24 17:52:23 UTC (rev 548)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/JBMQConfigurationGenerator.java 2009-03-25 11:36:27 UTC (rev 549)
@@ -1,91 +0,0 @@
-/*
- * 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.runtime.jbossesb.generator;
-
-import java.util.logging.Logger;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IJavaProject;
-import org.jboss.tools.overlord.cdl.runtime.jbossesb.model.ESBLanguageModel;
-import org.jboss.tools.overlord.cdl.runtime.jbossesb.model.ESBService;
-
-/**
- * This class implements the model based generator to generate
- * the JBMQ configuration.
- */
-public class JBMQConfigurationGenerator implements ModelBasedGenerator {
-
- /**
- * This method generates the relevant artefacts based on
- * the supplied model, within the specified Java project.
- *
- * @param jproj The Java project
- * @param model The model
- * @param context The generator context
- * @throws GeneratorException Failed to generate
- */
- public void generate(IJavaProject jproj,
- ESBLanguageModel model, GeneratorContext context)
- throws GeneratorException {
- IPath buildConfigPath=jproj.getPath().append(
- new Path(context.getBuildSystem().getJBossMQConfigFilePath()));
-
- IFile jbmqConfigFile=jproj.getProject().getWorkspace().getRoot().getFile(buildConfigPath);
- GeneratorUtil.createParentFolder(jbmqConfigFile);
-
- try {
- jbmqConfigFile.create(null, true,
- new org.eclipse.core.runtime.NullProgressMonitor());
-
- StringBuffer buf=new StringBuffer();
- buf.append("<server>\r\n");
-
- java.util.Iterator<ESBService> iter=model.getServices().iterator();
-
- while (iter.hasNext()) {
- ESBService service=iter.next();
-
- String dest=model.getJMSDefinition(service.getJMSBusIdRef());
-
- if (dest != null) {
- buf.append("\t<mbean code=\"org.jboss.mq.server.jmx.Queue\"\r\n");
- buf.append("\t\t\tname=\""+service.getCategory()+".destination:service=Queue,name="+dest+"\">\r\n");
- buf.append("\t\t<depends optional-attribute-name=\"DestinationManager\">\r\n");
- buf.append("\t\t\tjboss.mq:service=DestinationManager\r\n");
- buf.append("\t\t</depends>\r\n");
- buf.append("\t</mbean>\r\n");
- } else {
- logger.severe("Failed to find destination for JMS bus id '"+
- service.getJMSBusIdRef()+"'");
- }
- }
-
- buf.append("</server>\r\n");
-
- jbmqConfigFile.setContents(new java.io.ByteArrayInputStream(
- buf.toString().getBytes()), true, false,
- new org.eclipse.core.runtime.NullProgressMonitor());
- } catch(Exception e) {
- throw new GeneratorException("Failed to save JBossMQ configuration", e);
- }
- }
-
- private static Logger logger = Logger.getLogger("org.jboss.tools.overlord.cdl.runtime.jbossesb.generator");
-}
Copied: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/JBossMQMessagingSystem.java (from rev 548, cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/JBMQConfigurationGenerator.java)
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/JBossMQMessagingSystem.java (rev 0)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/JBossMQMessagingSystem.java 2009-03-25 11:36:27 UTC (rev 549)
@@ -0,0 +1,84 @@
+/*
+ * 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.runtime.jbossesb.generator;
+
+import java.util.logging.Logger;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.core.IJavaProject;
+import org.jboss.tools.overlord.cdl.runtime.jbossesb.model.ESBLanguageModel;
+import org.jboss.tools.overlord.cdl.runtime.jbossesb.model.ESBService;
+
+/**
+ * This class provides the information related to the JBossMQ
+ * messaging system.
+ */
+public class JBossMQMessagingSystem extends MessagingSystem {
+
+ private static final String JBOSSMQ_MESSAGING = "JBossMQ";
+ private static final String JBOSSMQ_CONFIG_FILE = "jbmq-queue-service.xml";
+
+ /**
+ * The default constructor.
+ */
+ public JBossMQMessagingSystem() {
+ super(JBOSSMQ_MESSAGING);
+ }
+
+ /**
+ * This method returns the configuration filename.
+ *
+ * @return The configuration filename
+ */
+ public String getConfigFileName() {
+ return(JBOSSMQ_CONFIG_FILE);
+ }
+
+ /**
+ * This method returns the messaging configuration for the
+ * supplied service.
+ *
+ * @param model The model
+ * @param service The service
+ * @return The messaging configuration
+ */
+ protected String getServiceConfig(ESBLanguageModel model,
+ ESBService service) {
+ StringBuffer buf=new StringBuffer();
+
+ String dest=model.getJMSDefinition(service.getJMSBusIdRef());
+
+ if (dest != null) {
+ buf.append("\t<mbean code=\"org.jboss.mq.server.jmx.Queue\"\r\n");
+ buf.append("\t\t\tname=\""+service.getCategory()+".destination:service=Queue,name="+dest+"\">\r\n");
+ buf.append("\t\t<depends optional-attribute-name=\"DestinationManager\">\r\n");
+ buf.append("\t\t\tjboss.mq:service=DestinationManager\r\n");
+ buf.append("\t\t</depends>\r\n");
+ buf.append("\t</mbean>\r\n");
+ } else {
+ logger.severe("Failed to find destination for JMS bus id '"+
+ service.getJMSBusIdRef()+"'");
+ }
+
+ return(buf.toString());
+ }
+
+ private static Logger logger = Logger.getLogger("org.jboss.tools.overlord.cdl.runtime.jbossesb.generator");
+}
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/MavenBuildSystem.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/MavenBuildSystem.java 2009-03-24 17:52:23 UTC (rev 548)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/MavenBuildSystem.java 2009-03-25 11:36:27 UTC (rev 549)
@@ -20,25 +20,22 @@
/**
* This class represents the Ant build system.
*/
-public class MavenBuildSystem extends AbstractBuildSystem {
+public class MavenBuildSystem extends BuildSystem {
private static final String BUILD_FILE = "pom.xml";
private static final String MAVEN = "Maven";
private static final String ESB_CONFIG_PATH = "src/main/resources/META-INF/jboss-esb.xml";
private static final String DEPLOYMENT_PATH = "src/main/resources/META-INF/deployment.xml";
- private static final String JBOSSMQ_CONFIG_PATH = "src/main/resources/jbmq-queue-service.xml";
- private static final String JBM_CONFIG_PATH = "src/main/resources/jbm-queue-service.xml";
+ private static final String MESSAGING_CONFIG_PATH = "src/main/resources";
private static final String JAVA_SOURCE_PATH = "src/main/java";
private static final String LIBRARY_PATH = null;
/**
- * This method represents the name of the build
- * system.
- *
- * @return The name
+ * This is the default constructor for the Maven build
+ * system.
*/
- public String getName() {
- return(MAVEN);
+ public MavenBuildSystem() {
+ super(MAVEN);
}
/**
@@ -72,26 +69,16 @@
}
/**
- * This method returns the JBossMQ configuration file
+ * This method returns the messaging configuration
* path.
*
- * @return The JBossMQ configuration file path
+ * @return The messaging configuration path
*/
- public String getJBossMQConfigFilePath() {
- return(JBOSSMQ_CONFIG_PATH);
+ public String getMessagingConfigPath() {
+ return(MESSAGING_CONFIG_PATH);
}
/**
- * This method returns the JBM configuration file
- * path.
- *
- * @return The JBM configuration file path
- */
- public String getJBMConfigFilePath() {
- return(JBM_CONFIG_PATH);
- }
-
- /**
* This method returns the Java source path.
*
* @return The Java source path
Added: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/MessagingConfigurationGenerator.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/MessagingConfigurationGenerator.java (rev 0)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/MessagingConfigurationGenerator.java 2009-03-25 11:36:27 UTC (rev 549)
@@ -0,0 +1,67 @@
+/*
+ * 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.runtime.jbossesb.generator;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jdt.core.IJavaProject;
+import org.jboss.tools.overlord.cdl.runtime.jbossesb.model.ESBLanguageModel;
+
+/**
+ * This class implements the model based generator to generate
+ * the JBMQ configuration.
+ */
+public class MessagingConfigurationGenerator implements ModelBasedGenerator {
+
+ /**
+ * This method generates the relevant artefacts based on
+ * the supplied model, within the specified Java project.
+ *
+ * @param jproj The Java project
+ * @param model The model
+ * @param context The generator context
+ * @throws GeneratorException Failed to generate
+ */
+ public void generate(IJavaProject jproj,
+ ESBLanguageModel model, GeneratorContext context)
+ throws GeneratorException {
+ IPath buildConfigPath=jproj.getPath().append(
+ context.getBuildSystem().getMessagingConfigPath());
+
+ buildConfigPath = buildConfigPath.append(java.io.File.separator);
+ buildConfigPath = buildConfigPath.append(context.getMessagingSystem().getConfigFileName());
+
+ IFile configFile=jproj.getProject().getWorkspace().getRoot().getFile(buildConfigPath);
+ GeneratorUtil.createParentFolder(configFile);
+
+ try {
+ configFile.create(null, true,
+ new org.eclipse.core.runtime.NullProgressMonitor());
+
+ String config=context.getMessagingSystem().getFileContents(model);
+
+ if (config != null) {
+ configFile.setContents(new java.io.ByteArrayInputStream(
+ config.getBytes()), true, false,
+ new org.eclipse.core.runtime.NullProgressMonitor());
+ }
+ } catch(Exception e) {
+ throw new GeneratorException("Failed to save messaging configuration", e);
+ }
+ }
+}
Added: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/MessagingSystem.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/MessagingSystem.java (rev 0)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb/src/java/org/jboss/tools/overlord/cdl/runtime/jbossesb/generator/MessagingSystem.java 2009-03-25 11:36:27 UTC (rev 549)
@@ -0,0 +1,94 @@
+/*
+ * 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.runtime.jbossesb.generator;
+
+import org.jboss.tools.overlord.cdl.runtime.jbossesb.model.ESBLanguageModel;
+import org.jboss.tools.overlord.cdl.runtime.jbossesb.model.ESBService;
+
+/**
+ * This class represents an abstract messaging system.
+ */
+public abstract class MessagingSystem {
+
+ /**
+ * This is the constructor for the messaging system.
+ *
+ * @param name The name of the messaging system
+ */
+ public MessagingSystem(String name) {
+ m_name = name;
+ }
+ /**
+ * This method represents the name of the messaging
+ * system.
+ *
+ * @return The name
+ */
+ public String getName() {
+ return(m_name);
+ }
+
+ /**
+ * This method returns the configuration filename.
+ *
+ * @return The configuration filename
+ */
+ public abstract String getConfigFileName();
+
+ /**
+ * This method returns the contents for the messaging
+ * configuration file.
+ *
+ * @param jproj The Java project
+ * @param model The model
+ * @return The file contents
+ */
+ public String getFileContents(ESBLanguageModel model) {
+ StringBuffer buf=new StringBuffer();
+ buf.append("<server>\r\n");
+
+ java.util.Iterator<ESBService> iter=model.getServices().iterator();
+
+ while (iter.hasNext()) {
+ ESBService service=iter.next();
+
+ String serviceConfig=getServiceConfig(model, service);
+
+ if (serviceConfig != null) {
+ buf.append(serviceConfig);
+ }
+ }
+
+ buf.append("</server>\r\n");
+
+ return(buf.toString());
+ }
+
+ /**
+ * This method returns the messaging configuration for the
+ * supplied service.
+ *
+ * @param model The model
+ * @param service The service
+ * @return The messaging configuration
+ */
+ protected abstract String getServiceConfig(ESBLanguageModel model,
+ ESBService service);
+
+ private String m_name=null;
+}
More information about the overlord-commits
mailing list