Author: bbrodt
Date: 2011-02-17 18:28:03 -0500 (Thu, 17 Feb 2011)
New Revision: 29230
Added:
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.classpath
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.project
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.settings/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.settings/org.eclipse.jdt.core.prefs
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/META-INF/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/META-INF/MANIFEST.MF
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/build.properties
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/definition/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/definition/riftsaw.xml
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/obj16/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/obj16/riftsaw.gif
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.properties
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.xml
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RiftsawBPELPublisher.java
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RiftsawPlugin.java
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RiftsawServerRuntime.java
Modified:
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/
Log:
Property changes on: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime
___________________________________________________________________
Added: svn:ignore
+ bin
pom.xml
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.classpath
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.classpath
(rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.classpath 2011-02-17 23:28:03
UTC (rev 29230)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.project
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.project
(rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.project 2011-02-17 23:28:03
UTC (rev 29230)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.bpel.jboss.riftsaw.runtime</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
Added:
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/.settings/org.eclipse.jdt.core.prefs 2011-02-17
23:28:03 UTC (rev 29230)
@@ -0,0 +1,8 @@
+#Tue Oct 20 16:01:25 CST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/META-INF/MANIFEST.MF
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/META-INF/MANIFEST.MF
(rev 0)
+++
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/META-INF/MANIFEST.MF 2011-02-17
23:28:03 UTC (rev 29230)
@@ -0,0 +1,40 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.bpel.jboss.riftsaw.runtime;singleton:=true
+Bundle-Version: 0.5.0.qualifier
+Bundle-Activator: org.eclipse.bpel.jboss.riftsaw.runtime.RiftsawPlugin
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.wst.server.core,
+ org.eclipse.wst.web.ui,
+ org.eclipse.wst.common.project.facet.ui,
+ org.eclipse.wst.common.modulecore,
+ org.eclipse.wst.common.frameworks,
+ org.eclipse.wst.common.project.facet.core,
+ org.eclipse.wst.common.frameworks.ui,
+ org.eclipse.jst.server.generic.core,
+ org.eclipse.jst.server.core;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.jst.server.generic.ui;bundle-version="[1.0.305,2.0.0)",
+ org.eclipse.jst.server.ui;bundle-version="[1.0.303,2.0.0)",
+ org.eclipse.jst.common.project.facet.core;bundle-version="[1.3.0,2.0.0)",
+ org.eclipse.jem.util,
+ org.eclipse.debug.ui,
+ org.eclipse.bpel.model,
+ org.eclipse.emf.ecore,
+ org.eclipse.wst.wsdl,
+ javax.wsdl,
+ org.eclipse.jst.common.frameworks,
+ org.eclipse.wst.web,
+ org.jboss.ide.eclipse.as.core;resolution:=optional,
+ org.jboss.ide.eclipse.archives.webtools;resolution:=optional,
+ org.eclipse.wst.server.ui;resolution:=optional,
+ org.eclipse.ui.navigator,
+ org.eclipse.bpel.runtimes;bundle-version="0.5.0"
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.bpel.jboss.riftsaw.runtime
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/build.properties
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/build.properties
(rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/build.properties 2011-02-17
23:28:03 UTC (rev 29230)
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.*,\
+ icons/
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/definition/riftsaw.xml
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/definition/riftsaw.xml
(rev 0)
+++
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/definition/riftsaw.xml 2011-02-17
23:28:03 UTC (rev 29230)
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tns:ServerRuntime
+
xmlns:tns="http://eclipse.org/jst/server/generic/ServerTypeDefinitio...
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://eclipse.org/jst/server/generic/ServerType...
ServerTypeDefinitionSchema.xsd "
+ name="JBoss Riftsaw" version="v2.x">
+
+ <property id="jbossHome"
+ label="%jbossHome"
+ type="directory"
+ context="runtime"
+ default="/your_server_root" />
+
+ <property id="serverAddress"
+ label="%serverAddress"
+ type="string"
+ context="runtime"
+ default="localhost" />
+
+ <property id="port"
+ label="%port"
+ type="string"
+ context="runtime"
+ default="8080" />
+
+ <property id="serverConfig"
+ label="%jbossServerConfig"
+ type="combo"
+ context="runtime"
+ default="default,all,minimal,other - type your own here" />
+
+ <property id="vmArguments"
+ label="%vmArguments"
+ type="string"
+ context="runtime"
+ default="-Xms128m -Xmx512m -XX:MaxPermSize=256m" />
+
+ <port>
+ <no>${port}</no>
+ <name>Http</name>
+ <protocol>http</protocol>
+ </port>
+
+ <module>
+ <type>bpel.module</type>
+ <publishDir>${jbossHome}/server/${serverConfig}/deploy</publishDir>
+ <publisherReference>org.eclipse.bpel.jboss.riftsaw.runtime.publisher</publisherReference>
+ </module>
+
+ <project>
+ <classpathReference>riftsaw.project</classpathReference>
+ </project>
+
+ <start>
+ <mainClass>org.jboss.Main</mainClass>
+ <workingDirectory>${jbossHome}/bin</workingDirectory>
+ <programArguments>-c ${serverConfig}</programArguments>
+ <vmParameters>-Dprogram.name=run.bat
-Djava.endorsed.dirs=${jbossHome}/lib/endorsed ${vmArguments}</vmParameters>
+ <classpathReference>jboss.run</classpathReference>
+ </start>
+
+ <stop>
+ <mainClass>org.jboss.Shutdown</mainClass>
+ <workingDirectory>${jbossHome}/bin</workingDirectory>
+ <programArguments>-S</programArguments>
+ <vmParameters>-Djboss.boot.loader.name=shutdown.bat</vmParameters>
+ <classpathReference>jboss.shutdown</classpathReference>
+ </stop>
+
+ <classpath id="jboss.run" >
+ <archive path="${jbossHome}/bin/run.jar" />
+ </classpath>
+
+ <classpath id="jboss.shutdown" >
+ <archive path="${jbossHome}/bin/shutdown.jar" />
+ </classpath>
+
+ <classpath id="jboss.project" >
+
+
+ <fileset dir="${jbossHome}">
+ <include name="client/*.jar" />
+ <include name="server/default/lib/*.jar" />
+
+ <include name="server/default/deploy/jbossweb.sar/jsf-libs/*.jar"
/>
+
+ <!-- This will be ignored if EJB3 is not there 5.0 -->
+ <include name="lib/*.jar" />
+ <include name="server/default/deployers/jbossweb.deployer/*.jar"
/>
+ <include
name="server/default/deployers/jboss-aop-jboss5.deployer/*.jar" />
+ <include name="common/lib/*.jar" />
+ <include name="server/default/deploy/jbossweb.sar/*.jar" />
+
+ <!-- for validation to work this library is defined as an archive -->
+ <exclude name="lib/jboss-kernel.jar" />
+ </fileset>
+
+ <!-- leave one generic jar as an archive so that validation works -->
+ <archive path="${jbossHome}/lib/jboss-kernel.jar" />
+
+ </classpath>
+
+</tns:ServerRuntime>
\ No newline at end of file
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/obj16/riftsaw.gif
===================================================================
(Binary files differ)
Property changes on:
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/icons/obj16/riftsaw.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.properties
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.properties
(rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.properties 2011-02-17
23:28:03 UTC (rev 29230)
@@ -0,0 +1,33 @@
+###############################################################################
+# Copyright (c) 2010 JBoss by Red Hat and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+#
http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# University College London - initial API and implementation
+# JBoss by Red Hat - subsequent contributions and maintenance
+###############################################################################
+pluginName = Eclipse BPEL Designer Runtimes
+providerName = JBoss by Red Hat
+
+MODULE_TYPE_NAME=BPEL 2.0 Process
+MODULE_TYPE_DESCRIPTION=Module representing a BPEL process
+
+BPEL_CORE_FACET_LABEL=BPEL 2.0 Facet
+BPEL_CORE_FACET_DESCRIPTION=Enables modelling and deployment of BPEL processes.
+BPEL_FACET_CATEGORY_LABEL=BPEL 2.0
+BPEL_FACET_TEMPLATE_LABEL=BPEL 2.0 Project
+NEW_BPEL_CATEGORY=BPEL 2.0
+NEW_BPEL_PROJECT=BPEL Project
+NEW_BPEL_PROJECT_DESCRIPTION=Create a new BPEL project.
+
+# used by wizard definitions in definition/riftsaw.xml
+pluginName = JBoss Riftsaw Runtime Adapter
+providerName = JBoss by Red Hat
+jbossHome = JBoss App Server home directory:
+jbossServerConfig = Server configuration:
+serverAddress = Server address:
+port = Port:
+vmArguments = VM Arguments:
\ No newline at end of file
Added: workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.xml
===================================================================
--- workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.xml
(rev 0)
+++ workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/plugin.xml 2011-02-17 23:28:03
UTC (rev 29230)
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+ <extension
point="org.eclipse.jst.server.generic.core.genericpublisher">
+ <genericpublisher
+ class="org.eclipse.bpel.jboss.riftsaw.runtime.RiftsawBPELPublisher"
+ id="org.eclipse.bpel.jboss.riftsaw.runtime.publisher" />
+ </extension>
+
+ <extension point="org.eclipse.wst.server.core.runtimeTypes">
+ <runtimeType
+ id="org.eclipse.bpel.jboss.riftsaw.runtime.rt"
+ name="JBoss Riftsaw 2.x"
+ description="JBoss Riftsaw 2.x WS-BPEL execution engine - Runtime"
+ vendor="JBoss Community"
+ version="2.2"
+ class="org.eclipse.bpel.jboss.riftsaw.runtime.RiftsawServerRuntime">
+ <moduleType
+ types="bpel.module"
+ versions="1.1, 2.0"/>
+ </runtimeType>
+ </extension>
+
+ <extension point="org.eclipse.wst.server.core.serverTypes">
+ <serverType
+ runtime="true"
+ class="org.eclipse.jst.server.generic.core.internal.GenericServer"
+ id="org.eclipse.bpel.jboss.riftsaw.runtime.st"
+ initialState="stopped"
+ supportsRemoteHosts="true"
+ runtimeTypeId="org.eclipse.bpel.jboss.riftsaw.runtime.rt"
+ description="JBoss Riftsaw 2.x WS-BPEL execution engine - Server"
+ launchConfigId="org.eclipse.jst.server.generic.core.launchConfigurationType"
+ behaviourClass="org.eclipse.jst.server.generic.core.internal.GenericServerBehaviour"
+ name="JBoss Riftsaw 2.x Server"
+ hasConfiguration="false"
+ startTimeout="480000"
+ stopTimeout="60000"
+ launchModes="run, debug"
+ startBeforePublish="true">
+ </serverType>
+ </extension>
+
+ <extension point="org.eclipse.wst.server.ui.serverImages">
+ <image
+ id="org.eclipse.jst.server.generic.image"
+ icon="icons/obj16/riftsaw.gif"
+ typeIds="org.eclipse.bpel.jboss.riftsaw.runtime.rt"/>
+ <image
+ id="org.eclipse.jst.server.generic.image"
+ icon="icons/obj16/riftsaw.gif"
+ typeIds="org.eclipse.bpel.jboss.riftsaw.runtime.st" />
+ </extension>
+
+ <extension point="org.eclipse.wst.common.project.facet.core.runtimes">
+ <runtime-component-type
+ id="org.eclipse.bpel.jboss.riftsaw.runtime.rt"/>
+
+ <runtime-component-version
+ type="org.eclipse.bpel.jboss.riftsaw.runtime.rt"
+ version="2.0" />
+
+ <adapter>
+ <runtime-component
+ id="org.eclipse.bpel.jboss.riftsaw.runtime.rt"/>
+ <factory
+ class="org.eclipse.jst.server.core.internal.RuntimeClasspathProvider$Factory"
/>
+ <type
+ class="org.eclipse.jst.common.project.facet.core.IClasspathProvider" />
+ </adapter>
+
+ <supported>
+ <runtime-component
+ id="org.eclipse.bpel.jboss.riftsaw.runtime.rt"
+ version="2.0" />
+ <facet
+ id="bpel.facet.core"
+ version="2.0"/>
+ </supported>
+ </extension>
+ <extension point="org.eclipse.wst.common.project.facet.ui.images">
+ <image
+ runtime-component-type="org.eclipse.bpel.jboss.riftsaw.runtime.rt"
+ path="icons/obj16/riftsaw.gif"/>
+ </extension>
+
+ <extension point="org.eclipse.wst.common.project.facet.core.runtimes">
+ <adapter>
+ <runtime-component
+ id="org.eclipse.bpel.jboss.riftsaw.runtime.rt" />
+ <factory
+ class="org.eclipse.jst.server.ui.internal.RuntimeLabelProvider$Factory"
/>
+ <type
+ class="org.eclipse.wst.common.project.facet.ui.IRuntimeComponentLabelProvider"
/>
+ </adapter>
+ </extension>
+
+ <extension point="org.eclipse.jst.server.core.runtimeFacetMappings">
+ <runtimeFacetMapping
+ runtimeTypeId="org.eclipse.bpel.jboss.riftsaw.runtime.rt"
+ runtime-component="org.eclipse.bpel.jboss.riftsaw.runtime.rt"
+ version="2.0"/>
+ </extension>
+
+ <extension
point="org.eclipse.jst.server.generic.core.serverdefinition">
+ <serverdefinition
+ id="org.eclipse.bpel.jboss.riftsaw.runtime.rt"
+ definitionfile="definition/riftsaw.xml">
+ </serverdefinition>
+ </extension>
+
+ <extension point="org.eclipse.wst.server.ui.wizardFragments">
+ <fragment
+ id="org.eclipse.jst.server.generic.runtime"
+ typeIds="org.eclipse.bpel.jboss.riftsaw.runtime.rt"
+ class="org.eclipse.jst.server.generic.ui.internal.GenericServerRuntimeWizardFragment"
/>
+ <fragment
+ id="org.eclipse.jst.server.generic.server"
+ typeIds="org.eclipse.bpel.jboss.riftsaw.runtime.st"
+ class="org.eclipse.jst.server.generic.ui.internal.GenericServerWizardFragment"
/>
+ </extension>
+
+</plugin>
Added:
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RiftsawBPELPublisher.java
===================================================================
---
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RiftsawBPELPublisher.java
(rev 0)
+++
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RiftsawBPELPublisher.java 2011-02-17
23:28:03 UTC (rev 29230)
@@ -0,0 +1,82 @@
+package org.eclipse.bpel.jboss.riftsaw.runtime;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.bpel.runtimes.publishers.GenericBPELPublisher;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.server.core.PublishUtil;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IModuleArtifact;
+import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.model.IModuleResource;
+import org.eclipse.wst.server.core.model.ModuleDelegate;
+
+public class RiftsawBPELPublisher extends GenericBPELPublisher {
+
+ public RiftsawBPELPublisher() {
+ super();
+ }
+
+ @Override
+ public IStatus[] publish(IModuleArtifact[] artifacts, IProgressMonitor monitor) {
+ // resources will always be null for some weird reason :(
+ // therefore we generate a BPELModuleArtifact
+ // the module id value enables us to get BPEL file path relative to its project
+ IModule[] modules = super.getModule();
+
+ try {
+ IModule last = modules[modules.length-1];
+ IPath root = createDeploymentDestination(last);
+ ModuleDelegate delegate = (ModuleDelegate)last.loadAdapter(ModuleDelegate.class, new
NullProgressMonitor());
+ IModuleResource[] resources = delegate.members();
+ PublishUtil.publishFull(resources, root, monitor);
+ } catch( CoreException ce ) {
+ // TODO return bad status
+ }
+ return new IStatus[]{Status.OK_STATUS};
+
+ }
+
+ @Override
+ public IStatus[] unpublish(IProgressMonitor monitor) {
+ IModule[] modules = super.getModule();
+ IModule last = modules[modules.length - 1];
+ IStatus[] result = new Status[modules.length];
+ IPath root = createDeploymentDestination(last);
+ PublishUtil.deleteDirectory(root.toFile(), monitor);
+ return result;
+ }
+
+ /**
+ * This method will create a folder inside the WEB-INF\processes subfolder
+ * of the ODE installation
+ */
+ protected IPath createDeploymentDestination(IModule module) {
+ String moduleName = module.getName();
+ String deployAppName = moduleName;
+
+ // get RIFTSAW_HOME
+ IRuntime serverDef = getServerRuntime().getRuntime();
+ IPath jbossHome = serverDef.getLocation();
+ Map m = getServerRuntime().getServerInstanceProperties();
+ String config = (String)m.get("serverConfig");
+ String home = (String)m.get("jboss.home");
+
+ // append Process name
+ IPath deployTarget =
jbossHome.removeLastSegments(1).append("server").append(config).append("deploy").append(deployAppName);
+
+ File f = deployTarget.toFile();
+ if (!f.exists()) {
+ f.mkdir();
+ }
+
+ return deployTarget;
+ }
+}
Added:
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RiftsawPlugin.java
===================================================================
---
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RiftsawPlugin.java
(rev 0)
+++
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RiftsawPlugin.java 2011-02-17
23:28:03 UTC (rev 29230)
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * Copyright (c) 2006 University College London Software Systems Engineering
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Bruno Wassermann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpel.jboss.riftsaw.runtime;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.bpel.runtimes.IRuntimesUIConstants;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class RiftsawPlugin extends AbstractUIPlugin {
+
+ public static final String PLUGIN_ID =
"org.eclipse.bpel.jboss.riftsaw.runtime"; //$NON-NLS-1$
+
+ //The shared instance.
+ private static RiftsawPlugin plugin;
+
+ private boolean imagesInitialized = false;
+
+ /**
+ * The constructor.
+ */
+ public RiftsawPlugin() {
+ super();
+ plugin = this;
+ }
+
+ /**
+ * This method is called upon plug-in activation
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /**
+ * This method is called when the plug-in is stopped
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+ plugin = null;
+ }
+
+ /**
+ * Returns the shared instance.
+ *
+ * @return the shared instance.
+ */
+ public static RiftsawPlugin getPlugin() {
+ return plugin;
+ }
+
+ @Override
+ public ImageRegistry getImageRegistry() {
+ ImageRegistry result = super.getImageRegistry();
+ initialize();
+ return result;
+ }
+
+ /**
+ * Returns the image descriptor for the given image ID.
+ * Returns null if there is no such image.
+ */
+ public ImageDescriptor getImageDescriptor(String id) {
+ return getImageRegistry().getDescriptor(id);
+ }
+
+ public Image getImage(String id) {
+ return getImageRegistry().get(id);
+ }
+
+ /**
+ * Creates an image descriptor and places it in the image registry.
+ */
+ private void createImageDescriptor(String id, URL baseURL) {
+ URL url = null;
+ try {
+ url = new URL(baseURL, IRuntimesUIConstants.ICON_PATH + id);
+ } catch (MalformedURLException e) {
+ RiftsawPlugin.log(e);
+ }
+ ImageDescriptor desc = ImageDescriptor.createFromURL(url);
+ getImageRegistry().put(id, desc);
+ }
+
+ protected void initialize() {
+ if (!imagesInitialized) {
+ imagesInitialized = true;
+ initializeImages();
+ }
+ }
+
+ /**
+ * Initializes the table of images used in this plugin.
+ */
+ private void initializeImages() {
+ URL baseURL = getBundle().getEntry("/"); //$NON-NLS-1$
+
+ // TODO make sure you initialize all required icons here
+ createImageDescriptor(IRuntimesUIConstants.ICON_NEWPRJ_WIZARD_BANNER, baseURL);
+ createImageDescriptor(IRuntimesUIConstants.ICON_BPEL_NEW_PRJ, baseURL);
+ createImageDescriptor(IRuntimesUIConstants.ICON_BPEL_PRJ, baseURL);
+ }
+
+ /**
+ * Utility methods for logging exceptions.
+ */
+ public static void log(Exception e, int severity) {
+ IStatus status = null;
+ if (e instanceof CoreException) {
+ status = ((CoreException)e).getStatus();
+ } else {
+ String m = e.getMessage();
+ status = new Status(severity, PLUGIN_ID, 0, m==null? "<no message>" :
m, e); //$NON-NLS-1$
+ }
+ System.out.println(e.getClass().getName()+": "+status); //$NON-NLS-1$
+ RiftsawPlugin.getPlugin().getLog().log(status);
+ }
+
+ public static void log(Exception e) {
+ log(e, IStatus.ERROR);
+ }
+}
Added:
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RiftsawServerRuntime.java
===================================================================
---
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RiftsawServerRuntime.java
(rev 0)
+++
workspace/bbrodt/org.eclipse.bpel.jboss.riftsaw.runtime/src/org/eclipse/bpel/jboss/riftsaw/runtime/RiftsawServerRuntime.java 2011-02-17
23:28:03 UTC (rev 29230)
@@ -0,0 +1,26 @@
+package org.eclipse.bpel.jboss.riftsaw.runtime;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jst.server.generic.core.internal.GenericServerRuntime;
+import org.eclipse.bpel.runtimes.IBPELRuntimeDelegate;
+
+public class RiftsawServerRuntime extends GenericServerRuntime implements
IBPELRuntimeDelegate {
+
+ public String getServerAddress()
+ {
+ return "localhost";
+ }
+
+ public String getPort()
+ {
+ Map m = getAttribute("generic_server_attributes", new HashMap());
+ return (String)m.get("port");
+ }
+
+ public String getDeployDir()
+ {
+ return "";
+ }
+}