You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@taverna.apache.org by st...@apache.org on 2015/02/17 12:29:05 UTC

[01/50] [abbrv] incubator-taverna-server git commit: Expose delimiter control from the worker.

Repository: incubator-taverna-server
Updated Branches:
  refs/heads/master [created] 07d2ba426


Expose delimiter control from the worker.

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/974751ba
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/974751ba
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/974751ba

Branch: refs/heads/master
Commit: 974751babcda1875bb55a18ba25429f579dda828
Parents: 4715363
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Wed Mar 26 11:56:51 2014 +0000
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Wed Mar 26 11:56:51 2014 +0000

----------------------------------------------------------------------
 .../server/localworker/remote/RemoteInput.java  | 31 +++++++++++++---
 .../taverna/server/localworker/api/Worker.java  | 11 +++---
 .../server/localworker/impl/LocalWorker.java    | 37 +++++++++++++++++---
 .../server/localworker/impl/WorkerCore.java     | 25 +++++++++----
 .../localworker/impl/LocalWorkerTest.java       |  7 ++--
 5 files changed, 89 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/974751ba/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteInput.java
----------------------------------------------------------------------
diff --git a/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteInput.java b/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteInput.java
index 86eedeb..838f491 100644
--- a/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteInput.java
+++ b/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteInput.java
@@ -26,7 +26,7 @@ public interface RemoteInput extends Remote {
 	 *             If anything goes wrong with the communication.
 	 */
 	@Nullable
-	public String getFile() throws RemoteException;
+	String getFile() throws RemoteException;
 
 	/**
 	 * @return The name of this input port. This may not be changed.
@@ -34,7 +34,7 @@ public interface RemoteInput extends Remote {
 	 *             If anything goes wrong with the communication.
 	 */
 	@NonNull
-	public String getName() throws RemoteException;
+	String getName() throws RemoteException;
 
 	/**
 	 * @return The value currently assigned to this input port, or <tt>null</tt>
@@ -43,7 +43,17 @@ public interface RemoteInput extends Remote {
 	 *             If anything goes wrong with the communication.
 	 */
 	@Nullable
-	public String getValue() throws RemoteException;
+	String getValue() throws RemoteException;
+
+	/**
+	 * @return The delimiter currently used to split this input port's value
+	 *         into a list, or <tt>null</tt> if no delimiter is to be used
+	 *         (i.e., the value is a singleton).
+	 * @throws RemoteException
+	 *             If anything goes wrong with the communication.
+	 */
+	@Nullable
+	String getDelimiter() throws RemoteException;
 
 	/**
 	 * Sets the file to use for this input. This overrides the use of the
@@ -56,7 +66,7 @@ public interface RemoteInput extends Remote {
 	 * @throws RemoteException
 	 *             If anything goes wrong with the communication.
 	 */
-	public void setFile(@NonNull String file) throws RemoteException;
+	void setFile(@NonNull String file) throws RemoteException;
 
 	/**
 	 * Sets the value to use for this input. This overrides the use of the
@@ -67,5 +77,16 @@ public interface RemoteInput extends Remote {
 	 * @throws RemoteException
 	 *             If anything goes wrong with the communication.
 	 */
-	public void setValue(@NonNull String value) throws RemoteException;
+	void setValue(@NonNull String value) throws RemoteException;
+
+	/**
+	 * Sets the delimiter used to split this input port's value into a list.
+	 * 
+	 * @param delimiter
+	 *            The delimiter character, or <tt>null</tt> if no delimiter is
+	 *            to be used (i.e., the value is a singleton).
+	 * @throws RemoteException
+	 *             If anything goes wrong with the communication.
+	 */
+	void setDelimiter(@Nullable String delimiter) throws RemoteException;
 }

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/974751ba/server-worker/src/main/java/org/taverna/server/localworker/api/Worker.java
----------------------------------------------------------------------
diff --git a/server-worker/src/main/java/org/taverna/server/localworker/api/Worker.java b/server-worker/src/main/java/org/taverna/server/localworker/api/Worker.java
index c8f2491..7b9f012 100644
--- a/server-worker/src/main/java/org/taverna/server/localworker/api/Worker.java
+++ b/server-worker/src/main/java/org/taverna/server/localworker/api/Worker.java
@@ -44,6 +44,9 @@ public interface Worker {
 	 *            A mapping of input names to values to supply to them. Note
 	 *            that we assume that nothing mapped here will be mapped in
 	 *            <b>inputFiles</b>.
+	 * @param inputDelimiters
+	 *            A mapping of input names to characters used to split them into
+	 *            lists.
 	 * @param outputBaclavaFile
 	 *            What baclava file to write the output from the workflow into,
 	 *            or <tt>null</tt> to have it written into the <tt>out</tt>
@@ -70,10 +73,10 @@ public interface Worker {
 	boolean initWorker(LocalWorker local, String executeWorkflowCommand,
 			String workflow, File workingDir, File inputBaclavaFile,
 			Map<String, File> inputRealFiles, Map<String, String> inputValues,
-			File outputBaclavaFile, File contextDirectory,
-			char[] keystorePassword, boolean generateProvenance,
-			Map<String, String> environment, String masterToken,
-			List<String> runtimeSettings) throws Exception;
+			Map<String, String> inputDelimiters, File outputBaclavaFile,
+			File contextDirectory, char[] keystorePassword,
+			boolean generateProvenance, Map<String, String> environment,
+			String masterToken, List<String> runtimeSettings) throws Exception;
 
 	/**
 	 * Kills off the subprocess if it exists and is alive.

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/974751ba/server-worker/src/main/java/org/taverna/server/localworker/impl/LocalWorker.java
----------------------------------------------------------------------
diff --git a/server-worker/src/main/java/org/taverna/server/localworker/impl/LocalWorker.java b/server-worker/src/main/java/org/taverna/server/localworker/impl/LocalWorker.java
index d8b5821..5484ba9 100644
--- a/server-worker/src/main/java/org/taverna/server/localworker/impl/LocalWorker.java
+++ b/server-worker/src/main/java/org/taverna/server/localworker/impl/LocalWorker.java
@@ -109,6 +109,8 @@ public class LocalWorker extends UnicastRemoteObject implements RemoteSingleRun
 	final Map<String, File> inputRealFiles;
 	/** What inputs to pass as direct values. */
 	final Map<String, String> inputValues;
+	/** What delimiters to use. */
+	final Map<String, String> inputDelimiters;
 	/** The interface to the workflow engine subprocess. */
 	private final Worker core;
 	/** Our descriptor token (UUID). */
@@ -220,9 +222,10 @@ public class LocalWorker extends UnicastRemoteObject implements RemoteSingleRun
 					"problem creating run working directory", e);
 		}
 		baseDir = new DirectoryDelegate(base, null);
-		inputFiles = new HashMap<String, String>();
-		inputRealFiles = new HashMap<String, File>();
-		inputValues = new HashMap<String, String>();
+		inputFiles = new HashMap<>();
+		inputRealFiles = new HashMap<>();
+		inputValues = new HashMap<>();
+		inputDelimiters = new HashMap<>();
 		environment.putAll(seedEnvironment);
 		runtimeSettings.addAll(javaParams);
 		try {
@@ -546,6 +549,7 @@ public class LocalWorker extends UnicastRemoteObject implements RemoteSingleRun
 				inputFiles.put(name, null);
 				inputRealFiles.put(name, null);
 				inputValues.put(name, null);
+				inputDelimiters.put(name, null);
 			}
 		}
 
@@ -563,6 +567,11 @@ public class LocalWorker extends UnicastRemoteObject implements RemoteSingleRun
 		public String getValue() {
 			return inputValues.get(name);
 		}
+		
+		@Override
+		public String getDelimiter() throws RemoteException {
+			return inputDelimiters.get(name);
+		}
 
 		@Override
 		public void setFile(String file) throws RemoteException {
@@ -583,6 +592,26 @@ public class LocalWorker extends UnicastRemoteObject implements RemoteSingleRun
 			inputRealFiles.put(name, null);
 			inputBaclava = null;
 		}
+
+		@Override
+		public void setDelimiter(String delimiter) throws RemoteException {
+			if (status != Initialized)
+				throw new IllegalStateException("not initializing");
+			if (inputBaclava != null)
+				throw new IllegalStateException("input baclava file set");
+			if (delimiter!=null) {
+				if (delimiter.length() > 1)
+					throw new IllegalStateException(
+							"multi-character delimiter not permitted");
+				if (delimiter.charAt(0) == 0)
+					throw new IllegalStateException(
+							"may not use NUL for splitting");
+				if (delimiter.charAt(0) > 127)
+					throw new IllegalStateException(
+							"only ASCII characters supported for splitting");
+			}
+			inputDelimiters.put(name, delimiter);
+		}
 	}
 
 	@Override
@@ -715,7 +744,7 @@ public class LocalWorker extends UnicastRemoteObject implements RemoteSingleRun
 		 * clear it after use.
 		 */
 		return core.initWorker(this, executeWorkflowCommand, workflow, base,
-				inputBaclavaFile, inputRealFiles, inputValues,
+				inputBaclavaFile, inputRealFiles, inputValues, inputDelimiters,
 				outputBaclavaFile, securityDirectory, pw, doProvenance,
 				environment, masterToken, runtimeSettings);
 	}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/974751ba/server-worker/src/main/java/org/taverna/server/localworker/impl/WorkerCore.java
----------------------------------------------------------------------
diff --git a/server-worker/src/main/java/org/taverna/server/localworker/impl/WorkerCore.java b/server-worker/src/main/java/org/taverna/server/localworker/impl/WorkerCore.java
index 64bf9ac..09cb85b 100644
--- a/server-worker/src/main/java/org/taverna/server/localworker/impl/WorkerCore.java
+++ b/server-worker/src/main/java/org/taverna/server/localworker/impl/WorkerCore.java
@@ -207,6 +207,7 @@ public class WorkerCore extends UnicastRemoteObject implements Worker,
 			@Nullable final File inputBaclava,
 			@NonNull final Map<String, File> inputFiles,
 			@NonNull final Map<String, String> inputValues,
+			@NonNull final Map<String, String> inputDelimiters,
 			@Nullable final File outputBaclava,
 			@NonNull final File securityDir, @Nullable final char[] password,
 			final boolean generateProvenance,
@@ -220,9 +221,10 @@ public class WorkerCore extends UnicastRemoteObject implements Worker,
 					startExecutorSubprocess(
 							createProcessBuilder(local, executeWorkflowCommand,
 									workflow, workingDir, inputBaclava,
-									inputFiles, inputValues, outputBaclava,
-									securityDir, password, generateProvenance,
-									environment, token, runtime), password);
+									inputFiles, inputValues, inputDelimiters,
+									outputBaclava, securityDir, password,
+									generateProvenance, environment, token,
+									runtime), password);
 				}
 			}.doOrTimeOut(START_WAIT_TIME);
 		} catch (IOException e) {
@@ -289,11 +291,15 @@ public class WorkerCore extends UnicastRemoteObject implements Worker,
 	 *             If we can't write the workflow out (unlikely)
 	 */
 	@NonNull
-	ProcessBuilder createProcessBuilder(@NonNull LocalWorker local,
-			@NonNull String executeWorkflowCommand, @NonNull String workflow,
-			@NonNull File workingDir, @Nullable File inputBaclava,
+	ProcessBuilder createProcessBuilder(
+			@NonNull LocalWorker local,
+			@NonNull String executeWorkflowCommand,
+			@NonNull String workflow,
+			@NonNull File workingDir,
+			@Nullable File inputBaclava,
 			@NonNull Map<String, File> inputFiles,
 			@NonNull Map<String, String> inputValues,
+			@NonNull Map<String, String> inputDelimiters,
 			@Nullable File outputBaclava, @NonNull File securityDir,
 			@NonNull char[] password, boolean generateProvenance,
 			@NonNull Map<String, String> environment, @NonNull String token,
@@ -368,6 +374,13 @@ public class WorkerCore extends UnicastRemoteObject implements Worker,
 				pb.command().add(f.getAbsolutePath());
 				write(f, port.getValue(), "UTF-8");
 			}
+			for (Entry<String, String> delim : inputDelimiters.entrySet()) {
+				if (delim.getValue() == null)
+					continue;
+				pb.command().add("-inputdelimiter");
+				pb.command().add(delim.getKey());
+				pb.command().add(delim.getValue());
+			}
 		}
 
 		// Add arguments denoting outputs

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/974751ba/server-worker/src/test/java/org/taverna/server/localworker/impl/LocalWorkerTest.java
----------------------------------------------------------------------
diff --git a/server-worker/src/test/java/org/taverna/server/localworker/impl/LocalWorkerTest.java b/server-worker/src/test/java/org/taverna/server/localworker/impl/LocalWorkerTest.java
index 3a64ec4..b0d7f63 100644
--- a/server-worker/src/test/java/org/taverna/server/localworker/impl/LocalWorkerTest.java
+++ b/server-worker/src/test/java/org/taverna/server/localworker/impl/LocalWorkerTest.java
@@ -96,9 +96,9 @@ public class LocalWorkerTest {
 				String executeWorkflowCommand, String workflow,
 				File workingDir, File inputBaclava,
 				Map<String, File> inputFiles, Map<String, String> inputValues,
-				File outputBaclava, File cmdir, char[] cmpass, boolean doprov,
-				Map<String, String> env, String id, List<String> conf)
-				throws Exception {
+				Map<String, String> delimiters, File outputBaclava, File cmdir,
+				char[] cmpass, boolean doprov, Map<String, String> env,
+				String id, List<String> conf) throws Exception {
 			events.add("init[");
 			events.add(executeWorkflowCommand);
 			events.add(workflow);
@@ -118,6 +118,7 @@ public class LocalWorkerTest {
 			// TODO: check cmdir and cmpass
 			// TODO: check doprov
 			// TODO: log env
+			// TODO: check delimiters
 			events.add("]");
 			return true;
 		}


[49/50] [abbrv] incubator-taverna-server git commit: Merge branch '2.5' into taverna-3

Posted by st...@apache.org.
Merge branch '2.5' into taverna-3

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/f03ad0ed
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/f03ad0ed
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/f03ad0ed

Branch: refs/heads/master
Commit: f03ad0ed65014b81fb7e525fa1e52c48072c344d
Parents: 7c0134d 0a242e7
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Wed Sep 3 15:28:25 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Wed Sep 3 15:28:25 2014 +0100

----------------------------------------------------------------------
 pom.xml                                         |   5 +-
 server-client/pom.xml                           | 123 ++++
 .../uk/org/taverna/server/client/Connected.java |  20 +
 .../uk/org/taverna/server/client/DirEntry.java  |  39 ++
 .../uk/org/taverna/server/client/Directory.java |  94 +++
 .../java/uk/org/taverna/server/client/File.java |  95 +++
 .../uk/org/taverna/server/client/Property.java  |  18 +
 .../java/uk/org/taverna/server/client/Run.java  | 215 +++++++
 .../uk/org/taverna/server/client/Status.java    |  36 ++
 .../taverna/server/client/TavernaServer.java    | 128 ++++
 .../client/TavernaServerConnectionFactory.java  |  23 +
 .../org/taverna/server/client/package-info.java |   5 +
 server-client/src/main/wadl/tavserv.wadl        | 591 +++++++++++++++++++
 .../localworker/remote/RemoteSingleRun.java     |   6 +-
 .../main/java/org/ogf/usage/JobUsageRecord.java |  23 +-
 server-webapp/pom.xml                           |  67 +++
 .../master/ContentsDescriptorBuilder.java       |   4 +-
 .../taverna/server/master/DirectoryREST.java    |   4 +-
 .../server/master/ListenerPropertyREST.java     |   4 +-
 .../java/org/taverna/server/master/RunREST.java |   4 +-
 .../taverna/server/master/TavernaServer.java    |   2 +-
 .../server/master/TavernaServerSupport.java     |   2 +-
 .../server/master/identity/UserStore.java       |   2 +-
 .../identity/WorkflowInternalAuthProvider.java  |   4 +-
 .../interaction/InteractionFeedSupport.java     |  42 ++
 .../localworker/AbstractRemoteRunFactory.java   |  59 +-
 .../master/localworker/ForkRunFactory.java      | 122 +---
 .../localworker/IdAwareForkRunFactory.java      |  90 +--
 .../server/master/localworker/StreamLogger.java |  62 ++
 .../master/notification/atom/EventDAO.java      |  41 +-
 .../master/rest/handler/FileMessageHandler.java |   4 +-
 .../server/master/rest/handler/HandlerCore.java |   4 +-
 .../master/usage/UsageRecordRecorder.java       |   6 +-
 .../master/utils/CertificateChainFetcher.java   |  14 +-
 .../taverna/server/master/utils/DerbyUtils.java |  27 +-
 .../taverna/server/master/utils/JDOSupport.java |  82 ++-
 .../master/utils/LoggingDerbyAdapter.java       |   6 +-
 .../server/master/utils/OneShotThread.java      |  10 +
 .../master/utils/WebappAwareDataSource.java     |  22 +
 .../main/replacementscripts/executeworkflow.sh  |   7 +-
 server-webapp/src/main/resources/admin.html     |   2 +-
 .../src/main/resources/static/admin.js          |  24 +-
 server-webapp/src/main/webapp/WEB-INF/beans.xml |  54 +-
 .../src/main/webapp/WEB-INF/web-nosec.xml       |  79 +++
 .../src/main/webapp/WEB-INF/web-partsec.xml     |  79 +++
 .../src/main/webapp/WEB-INF/web-sec.xml         |  79 +++
 server-webapp/src/main/webapp/WEB-INF/web.xml   |  80 ---
 .../src/main/webapp/WEB-INF/webappBeans.xml     |   3 +
 .../server/localworker/impl/LocalWorker.java    |   4 +-
 .../server/localworker/impl/WorkerCore.java     |  22 +
 50 files changed, 2178 insertions(+), 360 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/f03ad0ed/pom.xml
----------------------------------------------------------------------
diff --cc pom.xml
index 1e38f26,10df511..fc7b0c9
--- a/pom.xml
+++ b/pom.xml
@@@ -552,8 -543,8 +552,9 @@@
  		<module>server-unix-forker</module>
  		<module>server-usagerecord</module>
  		<module>server-port-description</module>
 +		<module>server-execution-delegate</module>
  		<module>server-rmidaemon</module>
+ 		<module>server-client</module>
+ 		<module>server-distribution</module>
  	</modules>
  </project>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/f03ad0ed/server-client/pom.xml
----------------------------------------------------------------------
diff --cc server-client/pom.xml
index 0000000,4cc0492..e62978a
mode 000000,100644..100644
--- a/server-client/pom.xml
+++ b/server-client/pom.xml
@@@ -1,0 -1,123 +1,123 @@@
+ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ 	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 	<modelVersion>4.0.0</modelVersion>
+ 	<parent>
+ 		<groupId>uk.org.taverna.server</groupId>
+ 		<artifactId>server</artifactId>
 -		<version>2.5.5-SNAPSHOT</version>
++		<version>3.0-SNAPSHOT</version>
+ 	</parent>
+ 	<artifactId>server-client</artifactId>
+ 	<packaging>bundle</packaging>
+ 
+ 	<dependencies>
+ 		<dependency>
+ 			<groupId>org.jvnet.ws.wadl</groupId>
+ 			<artifactId>wadl-core</artifactId>
+ 			<version>1.1.6</version>
+ 		</dependency>
+ 		<dependency>
+ 			<groupId>com.sun.jersey</groupId>
+ 			<artifactId>jersey-client</artifactId>
+ 			<version>1.8</version>
+ 		</dependency>
+ 		<dependency>
+ 			<groupId>commons-io</groupId>
+ 			<artifactId>commons-io</artifactId>
+ 			<version>2.4</version>
+ 		</dependency>
+ 		<dependency>
+ 			<groupId>org.apache.tika</groupId>
+ 			<artifactId>tika-core</artifactId>
+ 			<version>1.5</version>
+ 		</dependency>
+ 		<dependency>
+ 			<groupId>uk.org.taverna.server</groupId>
+ 			<artifactId>server-usagerecord</artifactId>
+ 			<version>${project.version}</version>
+ 		</dependency>
+ 	</dependencies>
+ 
+ 	<build>
+ 		<plugins>
+ 			<plugin>
+ 				<groupId>org.apache.felix</groupId>
+ 				<artifactId>maven-bundle-plugin</artifactId>
+ 				<extensions>true</extensions>
+ 				<configuration>
+ 					<instructions>
+ 						<Export-Package>uk.org.taverna.server.client</Export-Package>
+ 						<Private-Package>uk.org.taverna.server.client.*</Private-Package>
+ 					</instructions>
+ 				</configuration>
+ 			</plugin>
+ 			<plugin>
+ 				<groupId>org.apache.maven.plugins</groupId>
+ 				<artifactId>maven-compiler-plugin</artifactId>
+ 				<configuration>
+ 					<source>1.7</source>
+ 					<target>1.7</target>
+ 				</configuration>
+ 			</plugin>
+ 			<plugin>
+ 				<groupId>org.jvnet.ws.wadl</groupId>
+ 				<artifactId>wadl-client-plugin</artifactId>
+ 				<version>1.1.6</version>
+ 				<executions>
+ 					<execution>
+ 						<goals>
+ 							<goal>generate</goal>
+ 						</goals>
+ 					</execution>
+ 				</executions>
+ 				<configuration>
+ 					<packageName>org.taverna.server.client.wadl</packageName>
+ 					<includes>*.wadl</includes>
+ 					<customClassNames>
+ 						<property>
+ 							<name>http://example.com/taverna/rest</name>
+ 							<value>TavernaServer</value>
+ 						</property>
+ 					</customClassNames>
+ 				</configuration>
+ 			</plugin>
+ 		</plugins>
+ 		<pluginManagement>
+ 			<plugins>
+ 				<!--This plugin's configuration is used to store Eclipse m2e settings 
+ 					only. It has no influence on the Maven build itself. -->
+ 				<plugin>
+ 					<groupId>org.eclipse.m2e</groupId>
+ 					<artifactId>lifecycle-mapping</artifactId>
+ 					<version>1.0.0</version>
+ 					<configuration>
+ 						<lifecycleMappingMetadata>
+ 							<pluginExecutions>
+ 								<pluginExecution>
+ 									<pluginExecutionFilter>
+ 										<groupId>
+ 											org.jvnet.ws.wadl
+ 										</groupId>
+ 										<artifactId>
+ 											wadl-client-plugin
+ 										</artifactId>
+ 										<versionRange>
+ 											[1.1.6,)
+ 										</versionRange>
+ 										<goals>
+ 											<goal>generate</goal>
+ 										</goals>
+ 									</pluginExecutionFilter>
+ 									<action>
+ 										<execute />
+ 									</action>
+ 								</pluginExecution>
+ 							</pluginExecutions>
+ 						</lifecycleMappingMetadata>
+ 					</configuration>
+ 				</plugin>
+ 			</plugins>
+ 		</pluginManagement>
+ 	</build>
+ 	<inceptionYear>2014</inceptionYear>
+ 	<name>Server Client OSGi Module</name>
+ </project>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/f03ad0ed/server-webapp/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/f03ad0ed/server-webapp/src/main/java/org/taverna/server/master/ContentsDescriptorBuilder.java
----------------------------------------------------------------------
diff --cc server-webapp/src/main/java/org/taverna/server/master/ContentsDescriptorBuilder.java
index ab43827,8b4b947..f5259bd
--- a/server-webapp/src/main/java/org/taverna/server/master/ContentsDescriptorBuilder.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/ContentsDescriptorBuilder.java
@@@ -8,7 -8,9 +8,7 @@@ package org.taverna.server.master
  import static eu.medsea.util.MimeUtil.getMimeType;
  import static javax.ws.rs.core.MediaType.APPLICATION_OCTET_STREAM_TYPE;
  import static javax.ws.rs.core.UriBuilder.fromUri;
- import static org.taverna.server.master.TavernaServerSupport.log;
 -import static javax.xml.xpath.XPathConstants.NODE;
 -import static javax.xml.xpath.XPathConstants.NODESET;
+ import static org.apache.commons.logging.LogFactory.getLog;
  import static org.taverna.server.master.common.Uri.secure;
  
  import java.io.ByteArrayInputStream;
@@@ -20,8 -23,14 +20,9 @@@ import java.util.Set
  
  import javax.ws.rs.core.UriBuilder;
  import javax.ws.rs.core.UriInfo;
 -import javax.xml.xpath.XPath;
 -import javax.xml.xpath.XPathExpression;
 -import javax.xml.xpath.XPathExpressionException;
 -import javax.xml.xpath.XPathFactory;
  
+ import org.apache.commons.logging.Log;
  import org.springframework.beans.factory.annotation.Required;
 -import org.springframework.util.xml.SimpleNamespaceContext;
  import org.taverna.server.master.exceptions.FilesystemAccessException;
  import org.taverna.server.master.exceptions.NoDirectoryEntryException;
  import org.taverna.server.master.interfaces.Directory;
@@@ -53,8 -59,68 +54,9 @@@ import uk.org.taverna.scufl2.api.port.O
   * @author Donal Fellows
   */
  public class ContentsDescriptorBuilder {
+ 	private Log log = getLog("Taverna.Server.Webapp");
 -	/** Namespace for use when pulling apart a .t2flow document. */
 -	private static final String T2FLOW_NS = "http://taverna.sf.net/2008/xml/t2flow";
 -	/** Prefix for t2flow namespace. */
 -	private static final String T2FLOW_PFX = "t2";
 -
  	private FilenameUtils fileUtils;
  	private UriBuilderFactory uriBuilderFactory;
 -	private XPathExpression inputPorts;
 -	private XPathExpression outputPorts;
 -	private XPathExpression portName;
 -	private XPathExpression portDepth;
 -	private XPathExpression dataflow;
 -
 -	public ContentsDescriptorBuilder() throws XPathExpressionException {
 -		XPath xp = XPathFactory.newInstance().newXPath();
 -		SimpleNamespaceContext ctxt = new SimpleNamespaceContext();
 -		ctxt.bindNamespaceUri(T2FLOW_PFX, T2FLOW_NS);
 -		xp.setNamespaceContext(ctxt);
 -
 -		dataflow = xp.compile("//t2:dataflow[1]");
 -		inputPorts = xp.compile("./t2:inputPorts/t2:port");
 -		outputPorts = xp.compile("./t2:outputPorts/t2:port");
 -		portName = xp.compile("./t2:name/text()");
 -		portDepth = xp.compile("./t2:depth/text()");
 -	}
 -
 -	private Element dataflow(Element root) throws XPathExpressionException {
 -		return (Element) dataflow.evaluate(root, NODE);
 -	}
 -
 -	private List<Element> inputPorts(Element dataflow)
 -			throws XPathExpressionException {
 -		List<Element> result = new ArrayList<>();
 -		if (dataflow == null)
 -			return result;
 -		NodeList nl = (NodeList) inputPorts.evaluate(dataflow, NODESET);
 -		// Wrap as a list so we can iterate over it <sigh>
 -		for (int i = 0; i < nl.getLength(); i++)
 -			result.add((Element) nl.item(i));
 -		return result;
 -	}
 -
 -	private List<Element> outputPorts(Element dataflow)
 -			throws XPathExpressionException {
 -		List<Element> result = new ArrayList<>();
 -		if (dataflow == null)
 -			return result;
 -		NodeList nl = (NodeList) outputPorts.evaluate(dataflow, NODESET);
 -		// Wrap as a list so we can iterate over it <sigh>
 -		for (int i = 0; i < nl.getLength(); i++)
 -			result.add((Element) nl.item(i));
 -		return result;
 -	}
 -
 -	private String portName(Element port) throws XPathExpressionException {
 -		return portName.evaluate(port);
 -	}
 -
 -	private String portDepth(Element port) throws XPathExpressionException {
 -		return portDepth.evaluate(port);
 -	}
  
  	@Required
  	public void setUriBuilderFactory(UriBuilderFactory uriBuilderFactory) {

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/f03ad0ed/server-webapp/src/main/java/org/taverna/server/master/DirectoryREST.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/f03ad0ed/server-webapp/src/main/java/org/taverna/server/master/RunREST.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/f03ad0ed/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/f03ad0ed/server-webapp/src/main/java/org/taverna/server/master/TavernaServerSupport.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/f03ad0ed/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java
----------------------------------------------------------------------
diff --cc server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java
index d2c9c91,f1dec3c..fc7f881
--- a/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java
@@@ -376,16 -387,16 +389,22 @@@ public abstract class AbstractRemoteRun
  	 * @throws JAXBException
  	 *             If serialization fails.
  	 */
 -	protected String serializeWorkflow(Workflow workflow) throws JAXBException {
 -		return workflow.marshal();
 +	protected byte[] serializeWorkflow(Workflow workflow) throws JAXBException {
 +		try {
 +			return workflow.getScufl2Bytes();
 +		} catch (IOException e) {
 +			throw new JAXBException("problem converting to scufl2", e);
 +		} catch (WriterException e) {
 +			throw new JAXBException("problem converting to scufl2", e);
 +		}
  	}
  
+ 	private void acceptUsageRecord(String usageRecord) {
+ 		if (usageRecordSink != null)
+ 			usageRecordSink.storeUsageRecord(usageRecord);
+ 		runDB.checkForFinishNow();
+ 	}
+ 
  	/**
  	 * Make a Remote object that can act as a consumer for usage records.
  	 * 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/f03ad0ed/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
----------------------------------------------------------------------
diff --cc server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
index dccfeac,b8746bc..b67e121
--- a/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
@@@ -346,7 -282,8 +282,8 @@@ public class ForkRunFactory extends Abs
  	 *             If anything fails (communications error, etc.)
  	 */
  	private RemoteSingleRun getRealRun(@Nonnull UsernamePrincipal creator,
 -			@Nonnull String wf, UUID id) throws RemoteException {
 +			@Nonnull byte[] wf, UUID id) throws RemoteException {
+ 		@Nonnull
  		String globaluser = "Unknown Person";
  		if (creator != null)
  			globaluser = creator.getName();
@@@ -359,7 -296,8 +296,8 @@@
  	@Override
  	protected RemoteSingleRun getRealRun(UsernamePrincipal creator,
  			Workflow workflow, UUID id) throws Exception {
+ 		@Nonnull
 -		String wf = serializeWorkflow(workflow);
 +		byte[] wf = serializeWorkflow(workflow);
  		for (int i = 0; i < 3; i++) {
  			initFactory();
  			try {

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/f03ad0ed/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/f03ad0ed/server-webapp/src/main/replacementscripts/executeworkflow.sh
----------------------------------------------------------------------
diff --cc server-webapp/src/main/replacementscripts/executeworkflow.sh
index e698aa1,8885cb1..10d73b2
--- a/server-webapp/src/main/replacementscripts/executeworkflow.sh
+++ b/server-webapp/src/main/replacementscripts/executeworkflow.sh
@@@ -60,9 -63,14 +63,9 @@@ MainClass=net.sf.taverna.t2.commandline
  
  echo "pid:$$"
  exec "$javabin" $memlimit $permsize \
 -  "-Dcom.sun.net.ssl.enableECC=false" \
 -  "-Djsse.enableSNIExtension=false" \
 -  "-Draven.profile=file://$taverna_home/conf/current-profile.xml" \
 -  "-Dtaverna.startup=$taverna_home" $RAVEN_APPHOME_PROP $RUNID_PROP \
 -  $INTERACTION_PROPS $pre \
 -  -Djava.system.class.loader=net.sf.taverna.raven.prelauncher.BootstrapClassLoader \
 -  -Draven.launcher.app.main=$MainClass \
 -  -Draven.launcher.show_splashscreen=false \
 -  -Djava.awt.headless=true -Dtaverna.interaction.ignore_requests=true \
 -  -jar "$taverna_home/lib/"prelauncher-*.jar \
 -  "$@"
 +  "-Dlog4j.configuration=file://$taverna_home/conf/log4j.properties " \
 +  "-Djava.util.logging.config.file=$taverna_home/conf/logging.properties " \
-   "-Dtaverna.app.startup=$taverna_home" \
-   $APPHOME_PROP $RUNID_PROP $INTERACTION_PROPS $pre \
++  "-Dtaverna.app.startup=$taverna_home" -Dtaverna.interaction.ignore_requests=true \
++  $APPHOME_PROP $RUNID_PROP $INTERACTION_PROPS -Djava.awt.headless=true $pre \
 +  -jar "$taverna_home/lib/taverna-command-line-0.1.1.jar" \
 +  ${1+"$@"}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/f03ad0ed/server-webapp/src/main/webapp/WEB-INF/webappBeans.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/f03ad0ed/server-worker/src/main/java/org/taverna/server/localworker/impl/LocalWorker.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/f03ad0ed/server-worker/src/main/java/org/taverna/server/localworker/impl/WorkerCore.java
----------------------------------------------------------------------


[32/50] [abbrv] incubator-taverna-server git commit: 2.6-SNAPSHOT command line

Posted by st...@apache.org.
2.6-SNAPSHOT command line


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/ce509f7a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/ce509f7a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/ce509f7a

Branch: refs/heads/master
Commit: ce509f7a506a83e9c8f63f64d847ff868c4727b4
Parents: b7c1a1a
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Authored: Fri May 30 16:08:17 2014 +0100
Committer: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Committed: Fri May 30 16:08:17 2014 +0100

----------------------------------------------------------------------
 server-webapp/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ce509f7a/server-webapp/pom.xml
----------------------------------------------------------------------
diff --git a/server-webapp/pom.xml b/server-webapp/pom.xml
index 0a6b22b..5179fb3 100644
--- a/server-webapp/pom.xml
+++ b/server-webapp/pom.xml
@@ -20,7 +20,7 @@
 		<version.spring-security>3.1.4.RELEASE</version.spring-security>
 		<version.asm>3.3.1</version.asm>
 		<version.smack>3.2.1</version.smack>
-		<version.commandline>2.5.1-SNAPSHOT</version.commandline>
+		<version.commandline>2.6-SNAPSHOT</version.commandline>
 		<edition.commandline>enterprise</edition.commandline>
 		<version.jdoapi>3.0.1</version.jdoapi>
 		<forker.module>server-unix-forker</forker.module>


[34/50] [abbrv] incubator-taverna-server git commit: Update admin.html

Posted by st...@apache.org.
Update admin.html

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/183c7856
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/183c7856
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/183c7856

Branch: refs/heads/master
Commit: 183c7856895d6410c680f37b530fa6c3b8d41587
Parents: 0b6e8e8
Author: Giancarlo <gi...@gmail.com>
Authored: Thu Jun 5 10:45:31 2014 +0200
Committer: Giancarlo <gi...@gmail.com>
Committed: Thu Jun 5 10:45:31 2014 +0200

----------------------------------------------------------------------
 server-webapp/src/main/resources/admin.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/183c7856/server-webapp/src/main/resources/admin.html
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/resources/admin.html b/server-webapp/src/main/resources/admin.html
index 8ebbd7e..a80a783 100644
--- a/server-webapp/src/main/resources/admin.html
+++ b/server-webapp/src/main/resources/admin.html
@@ -94,7 +94,7 @@
 <br>
 <textarea title="Workflow URIs to limit execution to." rows="5" cols="60" id="workflows"></textarea>
 <p>
-<button id="saveWorkflows">Save</button> <button id="refreshWorkflows">Refresh</button>
+<button id="saveWorkflows">Save</button> <button id="refreshWorkflows">Refresh</button> <button id="emptyWorkflows">Empty URIs list</button>
 </div>
 
 <div id="t-usage">


[39/50] [abbrv] incubator-taverna-server git commit: Implementation of a client for Taverna Server. Still experimental.

Posted by st...@apache.org.
Implementation of a client for Taverna Server. Still experimental.

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/f769f201
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/f769f201
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/f769f201

Branch: refs/heads/master
Commit: f769f201c262282af4662cf645a411788304b80f
Parents: 72ca37b
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Fri Jun 27 14:17:31 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Fri Jun 27 14:17:31 2014 +0100

----------------------------------------------------------------------
 pom.xml                                         |   3 +-
 server-client/pom.xml                           | 104 ++++
 .../taverna/server/client/TavernaServer.java    | 517 +++++++++++++++++
 .../org/taverna/server/client/package-info.java |   5 +
 server-client/src/main/wadl/tavserv.wadl        | 563 +++++++++++++++++++
 5 files changed, 1191 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/f769f201/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 4bb31dc..10df511 100644
--- a/pom.xml
+++ b/pom.xml
@@ -540,10 +540,11 @@
 		<module>server-webapp</module>
 		<module>server-runinterface</module>
 		<module>server-worker</module>
-		<module>server-distribution</module>
 		<module>server-unix-forker</module>
 		<module>server-usagerecord</module>
 		<module>server-port-description</module>
 		<module>server-rmidaemon</module>
+		<module>server-client</module>
+		<module>server-distribution</module>
 	</modules>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/f769f201/server-client/pom.xml
----------------------------------------------------------------------
diff --git a/server-client/pom.xml b/server-client/pom.xml
new file mode 100644
index 0000000..93665f8
--- /dev/null
+++ b/server-client/pom.xml
@@ -0,0 +1,104 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>uk.org.taverna.server</groupId>
+		<artifactId>server</artifactId>
+		<version>2.5.5-SNAPSHOT</version>
+	</parent>
+	<artifactId>server-client</artifactId>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.jvnet.ws.wadl</groupId>
+			<artifactId>wadl-core</artifactId>
+			<version>1.1.6</version>
+		</dependency>
+		<dependency>
+			<groupId>com.sun.jersey</groupId>
+			<artifactId>jersey-client</artifactId>
+			<version>1.8</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-io</groupId>
+			<artifactId>commons-io</artifactId>
+			<version>2.4</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.tika</groupId>
+			<artifactId>tika-core</artifactId>
+			<version>1.5</version>
+		</dependency>
+	</dependencies>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<configuration>
+					<source>1.7</source>
+					<target>1.7</target>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.jvnet.ws.wadl</groupId>
+				<artifactId>wadl-client-plugin</artifactId>
+				<version>1.1.6</version>
+				<executions>
+					<execution>
+						<goals>
+							<goal>generate</goal>
+						</goals>
+					</execution>
+				</executions>
+				<configuration>
+					<packageName>org.taverna.server.client.wadl</packageName>
+					<includes>*.wadl</includes>
+					<customClassNames>
+						<property>
+							<name>http://example.com/taverna/rest</name>
+							<value>TavernaServer</value>
+						</property>
+					</customClassNames>
+				</configuration>
+			</plugin>
+		</plugins>
+		<pluginManagement>
+			<plugins>
+				<!--This plugin's configuration is used to store Eclipse m2e settings 
+					only. It has no influence on the Maven build itself. -->
+				<plugin>
+					<groupId>org.eclipse.m2e</groupId>
+					<artifactId>lifecycle-mapping</artifactId>
+					<version>1.0.0</version>
+					<configuration>
+						<lifecycleMappingMetadata>
+							<pluginExecutions>
+								<pluginExecution>
+									<pluginExecutionFilter>
+										<groupId>
+											org.jvnet.ws.wadl
+										</groupId>
+										<artifactId>
+											wadl-client-plugin
+										</artifactId>
+										<versionRange>
+											[1.1.6,)
+										</versionRange>
+										<goals>
+											<goal>generate</goal>
+										</goals>
+									</pluginExecutionFilter>
+									<action>
+										<execute />
+									</action>
+								</pluginExecution>
+							</pluginExecutions>
+						</lifecycleMappingMetadata>
+					</configuration>
+				</plugin>
+			</plugins>
+		</pluginManagement>
+	</build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/f769f201/server-client/src/main/java/uk/org/taverna/server/client/TavernaServer.java
----------------------------------------------------------------------
diff --git a/server-client/src/main/java/uk/org/taverna/server/client/TavernaServer.java b/server-client/src/main/java/uk/org/taverna/server/client/TavernaServer.java
new file mode 100644
index 0000000..5a66256
--- /dev/null
+++ b/server-client/src/main/java/uk/org/taverna/server/client/TavernaServer.java
@@ -0,0 +1,517 @@
+package uk.org.taverna.server.client;
+
+import static java.io.File.createTempFile;
+import static java.nio.file.Files.readAllBytes;
+import static javax.ws.rs.client.Entity.entity;
+import static javax.ws.rs.core.MediaType.APPLICATION_OCTET_STREAM_TYPE;
+import static org.apache.commons.io.IOUtils.copy;
+import static org.apache.tika.mime.MimeTypes.getDefaultMimeTypes;
+import static org.joda.time.format.ISODateTimeFormat.dateTime;
+import static org.joda.time.format.ISODateTimeFormat.dateTimeParser;
+import static org.taverna.server.client.wadl.TavernaServer.createClient;
+import static org.taverna.server.client.wadl.TavernaServer.root;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URI;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.zip.ZipFile;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.tika.mime.MimeTypeException;
+import org.joda.time.DateTime;
+import org.taverna.server.client.wadl.TavernaServer.Root;
+import org.taverna.server.client.wadl.TavernaServer.Root.RunsRunName;
+import org.w3c.dom.Element;
+
+import uk.org.taverna.ns._2010.port.InputPort;
+import uk.org.taverna.ns._2010.port.OutputPort;
+import uk.org.taverna.ns._2010.xml.server.Capability;
+import uk.org.taverna.ns._2010.xml.server.DirectoryEntry;
+import uk.org.taverna.ns._2010.xml.server.DirectoryReference;
+import uk.org.taverna.ns._2010.xml.server.FileReference;
+import uk.org.taverna.ns._2010.xml.server.KeyPairCredential;
+import uk.org.taverna.ns._2010.xml.server.PasswordCredential;
+import uk.org.taverna.ns._2010.xml.server.TavernaRun;
+import uk.org.taverna.ns._2010.xml.server.VersionedElement;
+import uk.org.taverna.ns._2010.xml.server.rest.DirectoryContents;
+import uk.org.taverna.ns._2010.xml.server.rest.InputDescription;
+import uk.org.taverna.ns._2010.xml.server.rest.InputDescription.Value;
+import uk.org.taverna.ns._2010.xml.server.rest.MakeDirectory;
+import uk.org.taverna.ns._2010.xml.server.rest.UploadFile;
+
+import com.sun.jersey.api.client.Client;
+import com.sun.jersey.api.client.ClientHandlerException;
+import com.sun.jersey.api.client.ClientResponse;
+import com.sun.jersey.api.client.UniformInterfaceException;
+import com.sun.jersey.api.client.filter.HTTPBasicAuthFilter;
+
+public class TavernaServer {
+	private Root root;
+
+	/**
+	 * States of a workflow run. They are {@link #Initialized Initialized},
+	 * {@link #Operating Operating}, {@link #Stopped Stopped}, and
+	 * {@link #Finished Finished}. Conceptually, there is also a
+	 * <tt>Destroyed</tt> state, but the workflow run does not exist (and hence
+	 * can't have its state queried or set) in that case.
+	 * 
+	 * @author Donal Fellows
+	 */
+	public static enum Status {
+		/**
+		 * The workflow run has been created, but is not yet running. The run
+		 * will need to be manually moved to {@link #Operating Operating} when
+		 * ready.
+		 */
+		Initialized,
+		/**
+		 * The workflow run is going, reading input, generating output, etc.
+		 * Will eventually either move automatically to {@link #Finished
+		 * Finished} or can be moved manually to {@link #Stopped Stopped} (where
+		 * supported).
+		 */
+		Operating,
+		/**
+		 * The workflow run is paused, and will need to be moved back to
+		 * {@link #Operating Operating} manually.
+		 */
+		Stopped,
+		/**
+		 * The workflow run has ceased; data files will continue to exist until
+		 * the run is destroyed (which may be manual or automatic).
+		 */
+		Finished
+	}
+
+	public static enum Property {
+		STDOUT("stdout"), STDERR("stderr"), EXIT_CODE("exitcode"), READY_TO_NOTIFY(
+				"readyToNotify"), EMAIL("notificationAddress"), USAGE(
+				"usageRecord");
+
+		private String s;
+
+		private Property(String s) {
+			this.s = s;
+		}
+
+		@Override
+		public String toString() {
+			return s;
+		}
+	}
+
+	public class Run {
+		private RunsRunName run;
+
+		Run(String value) {
+			run = root.runsRunName(value);
+		}
+
+		public String getName() {
+			return run.name().getAsTextPlain(String.class);
+		}
+
+		public void setName(String name) {
+			run.name().putTextPlain(name, String.class);
+		}
+
+		public Date getExpiry() {
+			return dateTimeParser().parseDateTime(
+					run.expiry().getAsTextPlain(String.class)).toDate();
+		}
+
+		public void setExpiry(Date expiryTimestamp) {
+			run.expiry().putTextPlain(
+					dateTime().print(new DateTime(expiryTimestamp)),
+					String.class);
+		}
+
+		public Date getCreate() {
+			String timestamp = run.createTime().getAsTextPlain(String.class);
+			if (timestamp == null || timestamp.trim().isEmpty())
+				return null;
+			return dateTimeParser().parseDateTime(timestamp).toDate();
+		}
+
+		public Date getStart() {
+			String timestamp = run.startTime().getAsTextPlain(String.class);
+			if (timestamp == null || timestamp.trim().isEmpty())
+				return null;
+			return dateTimeParser().parseDateTime(timestamp).toDate();
+		}
+
+		public Date getFinish() {
+			String timestamp = run.finishTime().getAsTextPlain(String.class);
+			if (timestamp == null || timestamp.trim().isEmpty())
+				return null;
+			return dateTimeParser().parseDateTime(timestamp).toDate();
+		}
+
+		public Status getStatus() {
+			return Status.valueOf(run.status().getAsTextPlain(String.class));
+		}
+
+		public void setStatus(Status status) {
+			run.status().putTextPlain(status, String.class);
+		}
+
+		public void start() {
+			setStatus(Status.Operating);
+		}
+
+		public void kill() {
+			setStatus(Status.Finished);
+		}
+
+		public boolean isRunning() {
+			return getStatus() == Status.Operating;
+		}
+
+		public String getStandardOutput() {
+			return run.stdout().getAsTextPlain(String.class);
+		}
+
+		public String getStandardError() {
+			return run.stderr().getAsTextPlain(String.class);
+		}
+
+		public String getLog() {
+			return run.log().getAsTextPlain(String.class);
+		}
+
+		public Integer getExitCode() {
+			String code = run.listeners().name("io")
+					.propertiesPropertyName("exitCode")
+					.getAsTextPlain(String.class);
+			if (code == null || code.trim().isEmpty())
+				return null;
+			return Integer.parseInt(code);
+		}
+
+		public String getProperty(Property prop) {
+			return run.listeners().name("io")
+					.propertiesPropertyName(prop.toString())
+					.getAsTextPlain(String.class);
+		}
+
+		public void setGenerateRunBundle(boolean generateRunBundle) {
+			run.generateProvenance().putTextPlain(generateRunBundle,
+					String.class);
+		}
+
+		public byte[] getRunBundle() {
+			return run.runBundle().getAsVndWf4everRobundleZip(byte[].class);
+		}
+
+		public List<InputPort> getInputs() {
+			return run.input().expected().getAsInputDescriptionXml().getInput();
+		}
+
+		public List<OutputPort> getOutputs() {
+			return run.output().getAsOutputDescriptionXml().getOutput();
+		}
+
+		public void setInput(String name, String value) {
+			Value v = new Value();
+			v.setValue(value);
+			InputDescription idesc = new InputDescription();
+			idesc.setValue(v);
+			run.input().inputName(name).putXmlAsInputDescription(idesc);
+		}
+
+		public void setInput(String name, String value, char listSeparator) {
+			Value v = new Value();
+			v.setValue(value);
+			InputDescription idesc = new InputDescription();
+			idesc.setValue(v);
+			idesc.setListDelimiter(new String(new char[] { listSeparator }));
+			run.input().inputName(name).putXmlAsInputDescription(idesc);
+		}
+
+		public byte[] getWorkflow() {
+			return run.workflow().getAsVndTavernaT2flowXml(byte[].class);
+		}
+
+		// TODO Consider better ways to do this
+		public Element getInteractionFeed() {
+			return run.interaction().getAsAtomXml(Element.class);
+		}
+
+		public Element getInteractionEntry(String id) {
+			return run.interaction().id(id).getAsAtomXml(Element.class);
+		}
+
+		public Element getUsageRecord() {
+			return run.usage().getAsXml(Element.class);
+		}
+
+		public Directory getWorkingDirectory() {
+			return new Directory();
+		}
+
+		public abstract class DirEntry {
+			final String path;
+
+			protected DirEntry(String path) {
+				this.path = path.replaceFirst("/+$", "");
+			}
+
+			public void delete() {
+				run.wd().path2(path).deleteAsXml(ClientResponse.class);
+			}
+
+			String path(ClientResponse response) {
+				String[] bits = response.getLocation().getPath().split("/");
+				return concat(bits[bits.length - 1]);
+			}
+
+			String localName() {
+				String[] bits = path.split("/");
+				return bits[bits.length - 1];
+			}
+
+			String concat(String name) {
+				return path + "/" + name.split("/", 2)[0];
+			}
+		}
+
+		public class Directory extends DirEntry {
+			Directory() {
+				super("");
+			}
+
+			Directory(String path) {
+				super(path);
+			}
+
+			public List<DirEntry> list() {
+				List<DirEntry> result = new ArrayList<>();
+				for (DirectoryEntry de : run.wd().path3(path)
+						.getAsXml(DirectoryContents.class).getDirOrFile())
+					if (de instanceof DirectoryReference)
+						result.add(new Directory(de.getValue()));
+					else if (de instanceof FileReference)
+						result.add(new File(de.getValue()));
+				return result;
+			}
+
+			public File createFile(String name, byte[] content) {
+				UploadFile uf = new UploadFile();
+				uf.setName(name);
+				uf.setValue(content);
+				return new File(path(run.wd().path(path)
+						.putAsXml(uf, ClientResponse.class)));
+			}
+
+			public File createFile(String name, java.io.File content) {
+				return new File(path(run
+						.wd()
+						.path(concat(name))
+						.putOctetStreamAsXml(
+								entity(content, APPLICATION_OCTET_STREAM_TYPE),
+								ClientResponse.class)));
+			}
+
+			public File createFile(String name, URI source) {
+				return new File(path(run
+						.wd()
+						.path(concat(name))
+						.postTextUriListAsXml(source.toString(),
+								ClientResponse.class)));
+			}
+
+			public Directory createDirectory(String name) {
+				MakeDirectory mkdir = new MakeDirectory();
+				mkdir.setName(name);
+				return new Directory(path(run.wd().path(path)
+						.putAsXml(mkdir, ClientResponse.class)));
+			}
+
+			public byte[] getZippedContents() {
+				return run.wd().path3(path).getAsZip(byte[].class);
+			}
+
+			public ZipFile getZip() throws IOException {
+				byte[] contents = getZippedContents();
+				java.io.File tmp = createTempFile(localName(), ".zip");
+				try (OutputStream os = new FileOutputStream(tmp)) {
+					os.write(contents);
+				}
+				return new ZipFile(tmp);
+			}
+		}
+
+		public class File extends DirEntry {
+			File(String path) {
+				super(path);
+			}
+
+			public InputStream getAsStream() {
+				return run.wd().path3(path).getAsOctetStream(InputStream.class);
+			}
+
+			public byte[] get() {
+				return run.wd().path3(path).getAsOctetStream(byte[].class);
+			}
+
+			public String get(Charset encoding) {
+				return new String(run.wd().path3(path)
+						.getAsOctetStream(byte[].class), encoding);
+			}
+
+			public java.io.File getAsFile() throws ClientHandlerException,
+					UniformInterfaceException, IOException, MimeTypeException {
+				ClientResponse cr = run.wd().path3(path)
+						.getAsOctetStream(ClientResponse.class);
+				String[] bits = localName().split("[.]");
+				String ext = getDefaultMimeTypes().forName(
+						cr.getHeaders().getFirst("Content-Type"))
+						.getExtension();
+				if (ext == null)
+					ext = bits[bits.length-1];
+				java.io.File tmp = createTempFile(bits[0], ext);
+				try (OutputStream os = new FileOutputStream(tmp);
+						InputStream is = cr.getEntity(InputStream.class)) {
+					copy(is, os);
+				}
+				return tmp;
+			}
+
+			public void setContents(byte[] newContents) {
+				run.wd().path(path)
+						.putOctetStreamAsXml(newContents, ClientResponse.class);
+			}
+
+			public void setContents(String newContents) {
+				run.wd().path(path)
+						.putOctetStreamAsXml(newContents, ClientResponse.class);
+			}
+
+			public void setContents(String newContents, Charset encoding) {
+				run.wd()
+						.path(path)
+						.putOctetStreamAsXml(newContents.getBytes(encoding),
+								ClientResponse.class);
+			}
+
+			public void setContents(InputStream newContents) {
+				run.wd().path(path)
+						.putOctetStreamAsXml(newContents, ClientResponse.class);
+			}
+
+			public void setContents(java.io.File newContents)
+					throws IOException {
+				run.wd()
+						.path(path)
+						.putOctetStreamAsXml(
+								entity(newContents,
+										APPLICATION_OCTET_STREAM_TYPE),
+								ClientResponse.class);
+			}
+		}
+
+		public String getOwner() {
+			return run.security().owner().getAsTextPlain(String.class);
+		}
+
+		// TODO permissions
+
+		public void grantPasswordCredential(URI contextService,
+				String username, String password) {
+			PasswordCredential pc = new PasswordCredential();
+			pc.setServiceURI(contextService.toString());
+			pc.setUsername(username);
+			pc.setPassword(password);
+			run.security().credentials()
+					.postXmlAsOctetStream(pc, ClientResponse.class);
+		}
+
+		public void grantKeyCredential(URI contextService, java.io.File source,
+				String unlockPassword, String aliasEntry) throws IOException {
+			KeyPairCredential kpc = new KeyPairCredential();
+			kpc.setServiceURI(contextService.toString());
+			try (InputStream in = new FileInputStream(source)) {
+				byte[] buffer = new byte[(int) source.length()];
+				IOUtils.read(in, buffer);
+				kpc.setCredentialBytes(buffer);
+			}
+			if (source.getName().endsWith(".p12"))
+				kpc.setFileType("PKCS12");
+			else
+				kpc.setFileType("JKS");
+			kpc.setCredentialName(aliasEntry);
+			kpc.setUnlockPassword(unlockPassword);
+			run.security().credentials()
+					.postXmlAsOctetStream(kpc, ClientResponse.class);
+		}
+	}
+
+	public TavernaServer(URI serviceRoot) {
+		root = root(createClient(), serviceRoot);
+	}
+
+	public TavernaServer(URI serviceRoot, String username, String password) {
+		Client client = createClient();
+		client.addFilter(new HTTPBasicAuthFilter(username, password));
+		root = root(client, serviceRoot);
+	}
+
+	public List<Capability> getCapabilities() {
+		return root.policy().capabilities().getAsCapabilitiesXml()
+				.getCapability();
+	}
+
+	public int getRunLimit() {
+		return root.policy().runLimit().getAsTextPlain(Integer.class);
+	}
+
+	public int getOperatingLimit() {
+		return root.policy().operatingLimit().getAsTextPlain(Integer.class);
+	}
+
+	public List<String> getPermittedWorkflows() {
+		return root.policy().permittedWorkflows().getAsPermittedWorkflowsXml()
+				.getWorkflow();
+	}
+
+	public List<Run> getExistingRuns() {
+		List<Run> runs = new ArrayList<>();
+		for (TavernaRun run : root.runs().getAsRunListXml().getRun())
+			runs.add(new Run(run.getValue()));
+		return runs;
+	}
+
+	public VersionedElement getServerVersionInfo() {
+		return root.getAsServerDescriptionXml();
+	}
+
+	private Run response2run(ClientResponse response) {
+		if (response.getClientResponseStatus().getStatusCode() == 201) {
+			String[] path = response.getLocation().getPath().split("/");
+			return new Run(path[path.length - 1]);
+		}
+		return null;
+	}
+
+	public Run createWorkflowRun(byte[] t2flowBytes) {
+		return response2run(root.runs().postVndTavernaT2flowXmlAsOctetStream(
+				t2flowBytes, ClientResponse.class));
+	}
+
+	public Run createWorkflowRun(File t2flowFile) throws IOException {
+		return createWorkflowRun(readAllBytes(t2flowFile.toPath()));
+	}
+
+	public Run createWorkflowRun(URI t2flowUri) {
+		return response2run(root.runs().postTextUriListAsOctetStream(
+				t2flowUri.toString(), ClientResponse.class));
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/f769f201/server-client/src/main/java/uk/org/taverna/server/client/package-info.java
----------------------------------------------------------------------
diff --git a/server-client/src/main/java/uk/org/taverna/server/client/package-info.java b/server-client/src/main/java/uk/org/taverna/server/client/package-info.java
new file mode 100644
index 0000000..59e809d
--- /dev/null
+++ b/server-client/src/main/java/uk/org/taverna/server/client/package-info.java
@@ -0,0 +1,5 @@
+/**
+ * Implementation of a basic client for Taverna Server.
+ * @author Donal Fellows
+ */
+package uk.org.taverna.server.client;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/f769f201/server-client/src/main/wadl/tavserv.wadl
----------------------------------------------------------------------
diff --git a/server-client/src/main/wadl/tavserv.wadl b/server-client/src/main/wadl/tavserv.wadl
new file mode 100644
index 0000000..564864f
--- /dev/null
+++ b/server-client/src/main/wadl/tavserv.wadl
@@ -0,0 +1,563 @@
+<application xmlns="http://wadl.dev.java.net/2009/02" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:prefix1="http://ns.taverna.org.uk/2010/xml/server/rest/" xmlns:prefix3="http://ns.taverna.org.uk/2010/xml/server/" xmlns:prefix10="http://ns.taverna.org.uk/2010/port/"><grammars><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:admin="http://ns.taverna.org.uk/2010/xml/server/admin/" xmlns:feed="http://ns.taverna.org.uk/2010/xml/server/feed/" xmlns:port="http://ns.taverna.org.uk/2010/port/" xmlns:tns="http://ns.taverna.org.uk/2010/xml/server/rest/" xmlns:ts="http://ns.taverna.org.uk/2010/xml/server/" xmlns:ts-rest="http://ns.taverna.org.uk/2010/xml/server/rest/" xmlns:ts-soap="http://ns.taverna.org.uk/2010/xml/server/soap/" xmlns:xlink="http://www.w3.org/1999/xlink" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://ns.taverna.org.uk/2010/xml/server/rest/">
+    <xs:import namespace="http://ns.taverna.org.uk/2010/xml/server/"/>
+    <xs:import namespace="http://www.w3.org/1999/xlink"/>
+    <xs:element name="capabilities">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element maxOccurs="unbounded" minOccurs="0" name="capability" type="ts:Capability"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="credential" type="ts-rest:Credential"/>
+    <xs:element name="credentials" type="ts-rest:credentialList"/>
+    <xs:element name="directoryContents" type="ts-rest:DirectoryContents"/>
+    <xs:element name="enabledNotificationFabrics">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element maxOccurs="unbounded" minOccurs="0" name="notifier" type="xs:string"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="filesystemOperation" type="ts-rest:FilesystemCreationOperation"/>
+    <xs:element name="listenerDefinition" type="ts-rest:ListenerDefinition"/>
+    <xs:element name="listenerDescription" type="ts-rest:ListenerDescription"/>
+    <xs:element name="listeners">
+        <xs:complexType>
+            <xs:complexContent>
+                <xs:extension base="ts:VersionedElement">
+                    <xs:sequence>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="listener" type="ts-rest:ListenerDescription"/>
+                    </xs:sequence>
+                </xs:extension>
+            </xs:complexContent>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="mkdir" type="ts-rest:MakeDirectory"/>
+    <xs:element name="permissionUpdate" type="ts-rest:permissionDescription"/>
+    <xs:element name="permissionsDescriptor" type="ts-rest:permissionsDescription"/>
+    <xs:element name="permittedListeners">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element maxOccurs="unbounded" minOccurs="0" name="type" type="xs:string"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="permittedWorkflows">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element maxOccurs="unbounded" minOccurs="0" name="workflow" type="xs:string"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="policyDescription">
+        <xs:complexType>
+            <xs:complexContent>
+                <xs:extension base="ts:VersionedElement">
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="runLimit" type="ts:Location"/>
+                        <xs:element minOccurs="0" name="operatingLimit" type="ts:Location"/>
+                        <xs:element minOccurs="0" name="permittedWorkflows" type="ts:Location"/>
+                        <xs:element minOccurs="0" name="permittedListenerTypes" type="ts:Location"/>
+                        <xs:element minOccurs="0" name="enabledNotificationFabrics" type="ts:Location"/>
+                        <xs:element minOccurs="0" name="capabilities" type="ts:Location"/>
+                    </xs:sequence>
+                </xs:extension>
+            </xs:complexContent>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="properties">
+        <xs:complexType>
+            <xs:complexContent>
+                <xs:extension base="ts:VersionedElement">
+                    <xs:sequence>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="property" type="ts-rest:PropertyDescription"/>
+                    </xs:sequence>
+                </xs:extension>
+            </xs:complexContent>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="runDescription">
+        <xs:complexType>
+            <xs:complexContent>
+                <xs:extension base="ts:VersionedElement">
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="expiry">
+                            <xs:complexType>
+                                <xs:simpleContent>
+                                    <xs:extension base="xs:string">
+                                        <xs:attribute ref="xlink:href"/>
+                                    </xs:extension>
+                                </xs:simpleContent>
+                            </xs:complexType>
+                        </xs:element>
+                        <xs:element minOccurs="0" name="creationWorkflow" type="ts:Location"/>
+                        <xs:element minOccurs="0" name="createTime" type="ts:Location"/>
+                        <xs:element minOccurs="0" name="startTime" type="ts:Location"/>
+                        <xs:element minOccurs="0" name="finishTime" type="ts:Location"/>
+                        <xs:element minOccurs="0" name="status" type="ts:Location"/>
+                        <xs:element minOccurs="0" name="workingDirectory" type="ts:Location"/>
+                        <xs:element minOccurs="0" name="inputs" type="ts:Location"/>
+                        <xs:element minOccurs="0" name="output" type="ts:Location"/>
+                        <xs:element minOccurs="0" name="securityContext" type="ts:Location"/>
+                        <xs:element minOccurs="0" name="listeners">
+                            <xs:complexType>
+                                <xs:complexContent>
+                                    <xs:extension base="ts:Location">
+                                        <xs:sequence>
+                                            <xs:element maxOccurs="unbounded" minOccurs="0" name="listener" nillable="true" type="ts:Location"/>
+                                        </xs:sequence>
+                                    </xs:extension>
+                                </xs:complexContent>
+                            </xs:complexType>
+                        </xs:element>
+                        <xs:element minOccurs="0" name="interaction" type="ts:Location"/>
+                        <xs:element minOccurs="0" name="name" type="ts:Location"/>
+                        <xs:element minOccurs="0" name="stdout" type="ts:Location"/>
+                        <xs:element minOccurs="0" name="stderr" type="ts:Location"/>
+                        <xs:element minOccurs="0" name="usage" type="ts:Location"/>
+                        <xs:element minOccurs="0" name="log" type="ts:Location"/>
+                        <xs:element minOccurs="0" name="run-bundle" type="ts:Location"/>
+                        <xs:element minOccurs="0" name="generate-provenance" type="ts:Location"/>
+                    </xs:sequence>
+                    <xs:attribute ref="ts-rest:owner"/>
+                </xs:extension>
+            </xs:complexContent>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="runInput" type="ts-rest:InputDescription"/>
+    <xs:element name="runInputs" type="ts-rest:TavernaRunInputs"/>
+    <xs:element name="runList">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element maxOccurs="unbounded" minOccurs="0" name="run" type="ts:TavernaRun"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="securityDescriptor" type="ts-rest:SecurityDescriptor"/>
+    <xs:element name="serverDescription">
+        <xs:complexType>
+            <xs:complexContent>
+                <xs:extension base="ts:VersionedElement">
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="runs" type="ts:Location"/>
+                        <xs:element minOccurs="0" name="policy" type="ts:Location"/>
+                        <xs:element minOccurs="0" name="feed" type="ts:Location"/>
+                        <xs:element minOccurs="0" name="interactionFeed" type="ts:Location"/>
+                    </xs:sequence>
+                </xs:extension>
+            </xs:complexContent>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="trustedIdentities" type="ts-rest:trustList"/>
+    <xs:element name="upload" type="ts-rest:UploadFile"/>
+    <xs:element name="userPermission" type="ts-rest:linkedPermissionDescription"/>
+    <xs:complexType name="InputDescription">
+        <xs:complexContent>
+            <xs:extension base="ts:VersionedElement">
+                <xs:sequence>
+                    <xs:choice minOccurs="0">
+                        <xs:element name="file">
+                            <xs:complexType>
+                                <xs:simpleContent>
+                                    <xs:extension base="ts-rest:InputContents"/>
+                                </xs:simpleContent>
+                            </xs:complexType>
+                        </xs:element>
+                        <xs:element name="reference">
+                            <xs:complexType>
+                                <xs:simpleContent>
+                                    <xs:extension base="ts-rest:InputContents"/>
+                                </xs:simpleContent>
+                            </xs:complexType>
+                        </xs:element>
+                        <xs:element name="value">
+                            <xs:complexType>
+                                <xs:simpleContent>
+                                    <xs:extension base="ts-rest:InputContents"/>
+                                </xs:simpleContent>
+                            </xs:complexType>
+                        </xs:element>
+                    </xs:choice>
+                </xs:sequence>
+                <xs:attribute ref="ts-rest:name"/>
+                <xs:attribute ref="ts-rest:descriptorRef"/>
+                <xs:attribute ref="ts-rest:listDelimiter"/>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+    <xs:simpleType name="InputContents">
+        <xs:restriction base="xs:string"/>
+    </xs:simpleType>
+    <xs:complexType name="ListenerDescription">
+        <xs:complexContent>
+            <xs:extension base="ts:VersionedElement">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="configuration" type="ts:Location"/>
+                    <xs:element minOccurs="0" name="properties">
+                        <xs:complexType>
+                            <xs:sequence>
+                                <xs:element maxOccurs="unbounded" minOccurs="0" name="property" type="ts-rest:PropertyDescription"/>
+                            </xs:sequence>
+                        </xs:complexType>
+                    </xs:element>
+                </xs:sequence>
+                <xs:attribute ref="xlink:href"/>
+                <xs:attribute ref="ts-rest:name"/>
+                <xs:attribute ref="ts-rest:type"/>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+    <xs:complexType name="PropertyDescription">
+        <xs:complexContent>
+            <xs:extension base="ts:Location">
+                <xs:sequence/>
+                <xs:attribute ref="ts-rest:name"/>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+    <xs:complexType name="TavernaRunInputs">
+        <xs:complexContent>
+            <xs:extension base="ts:VersionedElement">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="expected" type="ts:Location"/>
+                    <xs:element minOccurs="0" name="baclava" type="ts:Location"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="input" nillable="true" type="ts:Location"/>
+                </xs:sequence>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+    <xs:complexType final="extension restriction" name="Credential">
+        <xs:choice>
+            <xs:element ref="ts:keypair"/>
+            <xs:element ref="ts:userpass"/>
+        </xs:choice>
+    </xs:complexType>
+    <xs:complexType name="DirectoryContents">
+        <xs:sequence>
+            <xs:choice maxOccurs="unbounded" minOccurs="0">
+                <xs:element ref="ts:dir"/>
+                <xs:element ref="ts:file"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="FilesystemCreationOperation">
+        <xs:simpleContent>
+            <xs:extension base="xs:base64Binary">
+                <xs:attribute ref="ts-rest:name"/>
+            </xs:extension>
+        </xs:simpleContent>
+    </xs:complexType>
+    <xs:complexType name="MakeDirectory">
+        <xs:simpleContent>
+            <xs:extension base="ts-rest:FilesystemCreationOperation"/>
+        </xs:simpleContent>
+    </xs:complexType>
+    <xs:complexType name="UploadFile">
+        <xs:simpleContent>
+            <xs:extension base="ts-rest:FilesystemCreationOperation"/>
+        </xs:simpleContent>
+    </xs:complexType>
+    <xs:complexType name="permissionsDescription">
+        <xs:complexContent>
+            <xs:extension base="ts:VersionedElement">
+                <xs:sequence>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="permission" type="ts-rest:linkedPermissionDescription"/>
+                </xs:sequence>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+    <xs:complexType name="linkedPermissionDescription">
+        <xs:complexContent>
+            <xs:extension base="ts:Location">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="userName" type="xs:string"/>
+                    <xs:element minOccurs="0" name="permission" type="ts:Permission"/>
+                </xs:sequence>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+    <xs:complexType final="extension restriction" name="trustList">
+        <xs:complexContent>
+            <xs:extension base="ts:VersionedElement">
+                <xs:sequence>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="trust" type="ts:TrustDescriptor"/>
+                </xs:sequence>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+    <xs:complexType name="permissionDescription">
+        <xs:sequence>
+            <xs:element minOccurs="0" name="userName" type="xs:string"/>
+            <xs:element minOccurs="0" name="permission" type="ts:Permission"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType final="extension restriction" name="SecurityDescriptor">
+        <xs:complexContent>
+            <xs:extension base="ts:VersionedElement">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="owner" type="xs:string"/>
+                    <xs:element minOccurs="0" name="permissions" type="ts:Location"/>
+                    <xs:element minOccurs="0" name="credentials" type="ts-rest:CredentialCollection"/>
+                    <xs:element minOccurs="0" name="trusts" type="ts-rest:TrustCollection"/>
+                </xs:sequence>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+    <xs:complexType final="extension restriction" name="CredentialCollection">
+        <xs:sequence>
+            <xs:element maxOccurs="unbounded" minOccurs="0" ref="ts-rest:credential"/>
+        </xs:sequence>
+        <xs:attribute ref="xlink:href"/>
+    </xs:complexType>
+    <xs:complexType final="extension restriction" name="TrustCollection">
+        <xs:sequence>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="trust" type="ts:TrustDescriptor"/>
+        </xs:sequence>
+        <xs:attribute ref="xlink:href"/>
+    </xs:complexType>
+    <xs:complexType final="extension restriction" name="credentialList">
+        <xs:complexContent>
+            <xs:extension base="ts:VersionedElement">
+                <xs:sequence>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" ref="ts-rest:credential"/>
+                </xs:sequence>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+    <xs:complexType name="ListenerDefinition">
+        <xs:simpleContent>
+            <xs:extension base="xs:string">
+                <xs:attribute ref="ts-rest:type"/>
+            </xs:extension>
+        </xs:simpleContent>
+    </xs:complexType>
+    <xs:attribute name="descriptorRef" type="xs:anyURI"/>
+    <xs:attribute name="listDelimiter" type="xs:string"/>
+    <xs:attribute name="name" type="xs:string"/>
+    <xs:attribute name="owner" type="xs:string"/>
+    <xs:attribute name="type" type="xs:string"/>
+</xs:schema>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/1999/xlink" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://www.w3.org/1999/xlink">
+    <xs:attribute name="href" type="xs:string"/>
+</xs:schema>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:port="http://ns.taverna.org.uk/2010/port/" xmlns:run="http://ns.taverna.org.uk/2010/run/" xmlns:tns="http://ns.taverna.org.uk/2010/port/" xmlns:xlink="http://www.w3.org/1999/xlink" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://ns.taverna.org.uk/2010/port/">
+    <xs:import namespace="http://www.w3.org/1999/xlink"/>
+    <xs:element name="inputDescription" type="port:inputDescription"/>
+    <xs:element name="workflowOutputs" type="port:outputDescription"/>
+    <xs:complexType name="outputDescription">
+        <xs:complexContent>
+            <xs:extension base="port:PortDescription">
+                <xs:sequence>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="output" type="port:OutputPort"/>
+                </xs:sequence>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+    <xs:complexType abstract="true" name="PortDescription">
+        <xs:sequence/>
+        <xs:attribute ref="port:workflowId"/>
+        <xs:attribute ref="port:workflowRun"/>
+        <xs:attribute ref="port:workflowRunId"/>
+    </xs:complexType>
+    <xs:complexType name="OutputPort">
+        <xs:complexContent>
+            <xs:extension base="port:Port">
+                <xs:choice>
+                    <xs:element name="value" type="port:LeafValue"/>
+                    <xs:element name="list" type="port:ListValue"/>
+                    <xs:element name="error" type="port:ErrorValue"/>
+                    <xs:element name="absent" type="port:AbsentValue"/>
+                </xs:choice>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+    <xs:complexType name="Port">
+        <xs:sequence/>
+        <xs:attribute ref="port:name" use="required"/>
+        <xs:attribute ref="port:depth"/>
+    </xs:complexType>
+    <xs:complexType name="LeafValue">
+        <xs:complexContent>
+            <xs:extension base="port:Value">
+                <xs:sequence/>
+                <xs:attribute ref="port:contentFile"/>
+                <xs:attribute ref="port:contentType"/>
+                <xs:attribute ref="port:contentByteLength"/>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+    <xs:complexType abstract="true" name="Value">
+        <xs:sequence/>
+        <xs:attribute ref="xlink:href"/>
+    </xs:complexType>
+    <xs:complexType name="ErrorValue">
+        <xs:complexContent>
+            <xs:extension base="port:Value">
+                <xs:sequence/>
+                <xs:attribute ref="port:depth"/>
+                <xs:attribute ref="port:errorFile"/>
+                <xs:attribute ref="port:errorByteLength"/>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+    <xs:complexType name="ListValue">
+        <xs:complexContent>
+            <xs:extension base="port:Value">
+                <xs:sequence>
+                    <xs:choice maxOccurs="unbounded" minOccurs="0">
+                        <xs:element name="value" type="port:LeafValue"/>
+                        <xs:element name="list" type="port:ListValue"/>
+                        <xs:element name="error" type="port:ErrorValue"/>
+                        <xs:element name="absent" type="port:AbsentValue"/>
+                    </xs:choice>
+                </xs:sequence>
+                <xs:attribute ref="port:length"/>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+    <xs:complexType name="AbsentValue">
+        <xs:complexContent>
+            <xs:extension base="port:Value">
+                <xs:sequence/>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+    <xs:complexType name="inputDescription">
+        <xs:complexContent>
+            <xs:extension base="port:PortDescription">
+                <xs:sequence>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="input" type="port:InputPort"/>
+                </xs:sequence>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+    <xs:complexType name="InputPort">
+        <xs:complexContent>
+            <xs:extension base="port:Port">
+                <xs:sequence/>
+                <xs:attribute ref="xlink:href"/>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+    <xs:attribute name="contentByteLength" type="xs:long"/>
+    <xs:attribute name="contentFile" type="xs:string"/>
+    <xs:attribute name="contentType" type="xs:string"/>
+    <xs:attribute name="depth" type="xs:int"/>
+    <xs:attribute name="errorByteLength" type="xs:long"/>
+    <xs:attribute name="errorFile" type="xs:string"/>
+    <xs:attribute name="length" type="xs:int"/>
+    <xs:attribute name="name" type="xs:ID"/>
+    <xs:attribute name="workflowId" type="xs:string"/>
+    <xs:attribute name="workflowRun" type="xs:anyURI"/>
+    <xs:attribute name="workflowRunId" type="xs:string"/>
+</xs:schema>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:admin="http://ns.taverna.org.uk/2010/xml/server/admin/" xmlns:feed="http://ns.taverna.org.uk/2010/xml/server/feed/" xmlns:tns="http://ns.taverna.org.uk/2010/xml/server/" xmlns:ts="http://ns.taverna.org.uk/2010/xml/server/" xmlns:ts-rest="http://ns.taverna.org.uk/2010/xml/server/rest/" xmlns:ts-soap="http://ns.taverna.org.uk/2010/xml/server/soap/" xmlns:xlink="http://www.w3.org/1999/xlink" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://ns.taverna.org.uk/2010/xml/server/">
+    <xs:import namespace="http://www.w3.org/1999/xlink"/>
+    <xs:element name="capability" type="ts:Capability"/>
+    <xs:element name="dir" type="ts:DirectoryReference"/>
+    <xs:element name="file" type="ts:FileReference"/>
+    <xs:element name="keypair" type="ts:KeyPairCredential"/>
+    <xs:element name="runReference" type="ts:TavernaRun"/>
+    <xs:element name="trustedIdentity" type="ts:TrustDescriptor"/>
+    <xs:element name="userpass" type="ts:PasswordCredential"/>
+    <xs:element name="workflow" type="ts:Workflow"/>
+    <xs:complexType abstract="true" name="VersionedElement">
+        <xs:sequence/>
+        <xs:attribute ref="ts:serverVersion"/>
+        <xs:attribute ref="ts:serverRevision"/>
+        <xs:attribute ref="ts:serverBuildTimestamp"/>
+    </xs:complexType>
+    <xs:complexType name="Location">
+        <xs:sequence/>
+        <xs:attribute ref="xlink:href"/>
+    </xs:complexType>
+    <xs:complexType name="Capability">
+        <xs:sequence/>
+        <xs:attribute ref="ts:capability"/>
+        <xs:attribute ref="ts:version"/>
+    </xs:complexType>
+    <xs:complexType name="KeyPairCredential">
+        <xs:complexContent>
+            <xs:extension base="ts:CredentialDescriptor">
+                <xs:sequence>
+                    <xs:element name="credentialName" type="xs:string"/>
+                    <xs:element minOccurs="0" name="credentialFile" type="xs:string"/>
+                    <xs:element minOccurs="0" name="fileType" type="xs:string"/>
+                    <xs:element minOccurs="0" name="unlockPassword" type="xs:string"/>
+                    <xs:element minOccurs="0" name="credentialBytes" type="xs:base64Binary"/>
+                </xs:sequence>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+    <xs:complexType abstract="true" name="CredentialDescriptor">
+        <xs:sequence>
+            <xs:element minOccurs="0" name="serviceURI" type="xs:anyURI"/>
+        </xs:sequence>
+        <xs:attribute ref="xlink:href"/>
+    </xs:complexType>
+    <xs:complexType name="PasswordCredential">
+        <xs:complexContent>
+            <xs:extension base="ts:CredentialDescriptor">
+                <xs:sequence>
+                    <xs:element name="username" type="xs:string"/>
+                    <xs:element name="password" type="xs:string"/>
+                </xs:sequence>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+    <xs:complexType name="DirectoryEntry">
+        <xs:simpleContent>
+            <xs:extension base="xs:string">
+                <xs:attribute ref="xlink:href"/>
+                <xs:attribute ref="ts:name"/>
+            </xs:extension>
+        </xs:simpleContent>
+    </xs:complexType>
+    <xs:complexType name="DirectoryReference">
+        <xs:simpleContent>
+            <xs:extension base="ts:DirectoryEntry"/>
+        </xs:simpleContent>
+    </xs:complexType>
+    <xs:complexType name="FileReference">
+        <xs:simpleContent>
+            <xs:extension base="ts:DirectoryEntry"/>
+        </xs:simpleContent>
+    </xs:complexType>
+    <xs:complexType name="TavernaRun">
+        <xs:simpleContent>
+            <xs:extension base="xs:string">
+                <xs:attribute ref="xlink:href"/>
+                <xs:attribute ref="ts:serverVersion"/>
+            </xs:extension>
+        </xs:simpleContent>
+    </xs:complexType>
+    <xs:complexType name="Workflow">
+        <xs:sequence>
+            <xs:any maxOccurs="unbounded" minOccurs="0" namespace="##other" processContents="lax"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType final="extension restriction" name="TrustDescriptor">
+        <xs:sequence>
+            <xs:element minOccurs="0" name="certificateFile" type="xs:string"/>
+            <xs:element minOccurs="0" name="fileType" type="xs:string"/>
+            <xs:element minOccurs="0" name="certificateBytes" type="xs:base64Binary"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="serverName" type="xs:string"/>
+        </xs:sequence>
+        <xs:attribute ref="xlink:href"/>
+    </xs:complexType>
+    <xs:simpleType name="Permission">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="none"/>
+            <xs:enumeration value="read"/>
+            <xs:enumeration value="update"/>
+            <xs:enumeration value="destroy"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:attribute name="capability" type="xs:anyURI"/>
+    <xs:attribute name="name" type="xs:string"/>
+    <xs:attribute name="serverBuildTimestamp" type="xs:string"/>
+    <xs:attribute name="serverRevision" type="xs:string"/>
+    <xs:attribute name="serverVersion" type="xs:string"/>
+    <xs:attribute name="version" type="xs:string"/>
+</xs:schema>
+</grammars><resources base="http://example.com/taverna/rest"><resource path="/"><method name="GET"><doc>Produces the description of the service.</doc><request></request><response><representation mediaType="application/xml" element="prefix1:serverDescription"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of the service.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><resource path="runs"><method name="GET"><doc>Produces a list of all runs visible to the user.</doc><request></request><response><representation mediaType="application/xml" element="prefix1:runList"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of the operations on the collection of runs.</doc><response><representation mediaType="application/octet-stream"><
 /representation></response></method><method name="POST"><doc>Accepts (or not) a request to create a new run executing the given workflow.</doc><request><representation mediaType="application/vnd.taverna.t2flow+xml" element="prefix3:workflow"><doc>Accepts (or not) a request to create a new run executing the given workflow.</doc></representation><representation mediaType="application/xml" element="prefix3:workflow"><doc>Accepts (or not) a request to create a new run executing the given workflow.</doc></representation></request><response><representation mediaType="application/octet-stream"></representation></response></method><method name="POST"><doc>Accepts a URL to a workflow to download and run. The URL must be hosted on a publicly-accessible service.</doc><request><representation mediaType="text/uri-list"><doc>Accepts a URL to a workflow to download and run. The URL must be hosted on a publicly-accessible service.</doc></representation></request><response><representation mediaType=
 "application/octet-stream"></representation></response></method></resource><resource path="/policy"><method name="GET"><doc>Describe the parts of this policy.</doc><request></request><response><representation mediaType="application/xml" element="prefix1:policyDescription"></representation><representation mediaType="application/json"></representation></response></method><resource path="/capabilities"><method name="GET"><doc>Gets a description of the capabilities supported by this installation of Taverna Server.</doc><response><representation mediaType="application/xml" element="prefix1:capabilities"></representation><representation mediaType="application/json"></representation></response></method></resource><resource path="/enabledNotificationFabrics"><method name="GET"><doc>Gets the list of supported, enabled notification fabrics. Each corresponds (approximately) to a protocol, e.g., email.</doc><response><representation mediaType="application/xml" element="prefix1:enabledNotificati
 onFabrics"></representation><representation mediaType="application/json"></representation></response></method></resource><resource path="/operatingLimit"><method name="GET"><doc>Gets the maximum number of simultaneously operating runs that the user may have. Note that this is often a global limit; it does not represent a promise that a particular user may be able to have that many operating runs at once.</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:int"><doc>Gets the maximum number of simultaneously operating runs that the user may have. Note that this is often a global limit; it does not represent a promise that a particular user may be able to have that many operating runs at once.</doc></param></representation></response></method></resource><resource path="/permittedListenerTypes"><method name="GET"><doc>Gets the list of permitted event listener types.</doc><response><representation mediaType="application/xml" element="prefix1:
 permittedListeners"></representation><representation mediaType="application/json"></representation></response></method></resource><resource path="/permittedWorkflows"><method name="GET"><doc>Gets the list of permitted workflows.</doc><response><representation mediaType="application/xml" element="prefix1:permittedWorkflows"></representation><representation mediaType="application/json"></representation></response></method></resource><resource path="/runLimit"><method name="GET"><doc>Gets the maximum number of simultaneous runs in any state that the user may create.</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:int"><doc>Gets the maximum number of simultaneous runs in any state that the user may create.</doc></param></representation></response></method></resource></resource><resource path="/runs/{runName}"><doc>This represents how a Taverna Server workflow run looks to a RESTful API.</doc><param name="runName" style="template" type="x
 s:string"/><method name="DELETE"><doc>Deletes a workflow run.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><method name="GET"><doc>Describes a workflow run.</doc><request></request><response><representation mediaType="application/xml" element="prefix1:runDescription"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of the run.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><resource path="/createTime"><method name="GET"><doc>Gives the time when the workflow run was first submitted to the server.</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Gives the time when the workflow run was first submitted to the server.</doc></param></representation></response></method><method name="OPTIONS"><doc>Produces the d
 escription of the run create time.</doc><response><representation mediaType="application/octet-stream"></representation></response></method></resource><resource path="/expiry"><method name="GET"><doc>Gives the time when the workflow run becomes eligible for automatic deletion.</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Gives the time when the workflow run becomes eligible for automatic deletion.</doc></param></representation></response></method><method name="OPTIONS"><doc>Produces the description of the run expiry.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><method name="PUT"><doc>Sets the time when the workflow run becomes eligible for automatic deletion.</doc><request><representation mediaType="text/plain"><param name="request" style="plain" type="xs:string"><doc>Sets the time when the workflow run becomes eligible for automatic deletion.</doc></param><
 /representation></request><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Sets the time when the workflow run becomes eligible for automatic deletion.</doc></param></representation></response></method></resource><resource path="/finishTime"><method name="GET"><doc>Gives the time when the workflow run was first detected as finished, or an empty string if it has not yet finished (including if it has never started).</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Gives the time when the workflow run was first detected as finished, or an empty string if it has not yet finished (including if it has never started).</doc></param></representation></response></method><method name="OPTIONS"><doc>Produces the description of the run finish time.</doc><response><representation mediaType="application/octet-stream"></representation></response></method></resource><resource path="
 /generate-provenance"><method name="GET"><doc>Whether to create the run bundle for the workflow run.</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:boolean"><doc>Whether to create the run bundle for the workflow run.</doc></param></representation></response></method><method name="OPTIONS"><doc>Whether to create the run bundle for the workflow run.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><method name="PUT"><doc>Whether to create the run bundle for the workflow run.</doc><request><representation mediaType="text/plain"><param name="request" style="plain" type="xs:boolean"><doc>Whether to create the run bundle for the workflow run.</doc></param></representation></request><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:boolean"><doc>Whether to create the run bundle for the workflow run.</doc></param></representation></response></
 method></resource><resource path="/log"><method name="GET"><doc>Return the log for the workflow run.</doc><response><representation mediaType="text/plain"></representation></response></method><method name="OPTIONS"><doc>Return the log for the workflow run.</doc><response><representation mediaType="application/octet-stream"></representation></response></method></resource><resource path="/name"><method name="GET"><doc>Gives the descriptive name of the workflow run.</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Gives the descriptive name of the workflow run.</doc></param></representation></response></method><method name="OPTIONS"><doc>Produces the description of the operations on the run&apos;s descriptive name.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><method name="PUT"><doc>Set the descriptive name of the workflow run. Note that this value may be arbitraril
 y truncated by the implementation.</doc><request><representation mediaType="text/plain"><param name="request" style="plain" type="xs:string"><doc>Set the descriptive name of the workflow run. Note that this value may be arbitrarily truncated by the implementation.</doc></param></representation></request><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Set the descriptive name of the workflow run. Note that this value may be arbitrarily truncated by the implementation.</doc></param></representation></response></method></resource><resource path="/output"><method name="GET"><doc>Gives the Baclava file where output will be written; empty means use multiple simple files in the out directory.</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Gives the Baclava file where output will be written; empty means use multiple simple files in the out directory.</doc></param></repre
 sentation></response></method><method name="GET"><doc>Gives a description of the outputs, as currently understood</doc><request></request><response><representation mediaType="application/xml" element="prefix10:workflowOutputs"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of the run output.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><method name="PUT"><doc>Sets the Baclava file where output will be written; empty means use multiple simple files in the out directory.</doc><request><representation mediaType="text/plain"><param name="request" style="plain" type="xs:string"><doc>Sets the Baclava file where output will be written; empty means use multiple simple files in the out directory.</doc></param></representation></request><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:st
 ring"><doc>Sets the Baclava file where output will be written; empty means use multiple simple files in the out directory.</doc></param></representation></response></method></resource><resource path="/run-bundle"><method name="GET"><doc>Return the run bundle for the workflow run.</doc><response><representation mediaType="application/vnd.wf4ever.robundle+zip"></representation></response></method><method name="OPTIONS"><doc>Return the run bundle for the workflow run.</doc><response><representation mediaType="application/octet-stream"></representation></response></method></resource><resource path="/startTime"><method name="GET"><doc>Gives the time when the workflow run was started, or an empty string if the run has not yet started.</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Gives the time when the workflow run was started, or an empty string if the run has not yet started.</doc></param></representation></response></met
 hod><method name="OPTIONS"><doc>Produces the description of the run start time.</doc><response><representation mediaType="application/octet-stream"></representation></response></method></resource><resource path="/status"><method name="GET"><doc>Gives the current status of the workflow run.</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Gives the current status of the workflow run.</doc></param></representation></response></method><method name="OPTIONS"><doc>Produces the description of the run status.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><method name="PUT"><doc>Attempts to update the status of the workflow run.</doc><request><representation mediaType="text/plain"><param name="request" style="plain" type="xs:string"><doc>Attempts to update the status of the workflow run.</doc></param></representation></request><response><representation mediaType="text/pla
 in"></representation></response></method></resource><resource path="/stderr"><method name="GET"><doc>Return the stderr for the workflow run.</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Return the stderr for the workflow run.</doc></param></representation></response></method><method name="OPTIONS"><doc>Return the stderr for the workflow run.</doc><response><representation mediaType="application/octet-stream"></representation></response></method></resource><resource path="/stdout"><method name="GET"><doc>Return the stdout for the workflow run.</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Return the stdout for the workflow run.</doc></param></representation></response></method><method name="OPTIONS"><doc>Return the stdout for the workflow run.</doc><response><representation mediaType="application/octet-stream"></representation></response></method></resour
 ce><resource path="/usage"><method name="GET"><doc>Return the usage record for the workflow run.</doc><response><representation mediaType="application/xml"></representation></response></method><method name="OPTIONS"><doc>Return the usage record for the workflow run.</doc><response><representation mediaType="application/octet-stream"></representation></response></method></resource><resource path="/workflow"><method name="GET"><doc>Gives the workflow document used to create the workflow run.</doc><response><representation mediaType="application/vnd.taverna.t2flow+xml" element="prefix3:workflow"></representation><representation mediaType="application/xml" element="prefix3:workflow"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of the run workflow.</doc><response><representation mediaType="application/octet-stream"></representation></response></method></resource><resource path="/inp
 ut"><doc>This represents how a Taverna Server workflow run&apos;s inputs looks to a RESTful API.</doc><method name="GET"><doc>Describe the sub-URIs of this resource.</doc><response><representation mediaType="application/xml" element="prefix1:runInputs"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of one run&apos;s inputs&apos; operations.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><resource path="/baclava"><method name="GET"><doc>Gives the Baclava file describing the inputs, or empty if individual files are used.</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Gives the Baclava file describing the inputs, or empty if individual files are used.</doc></param></representation></response></method><method name="OPTIONS"><doc>Produces the description of the inp
 uts&apos; baclava operations.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><method name="PUT"><doc>Sets the Baclava file describing the inputs.</doc><request><representation mediaType="text/plain"><param name="request" style="plain" type="xs:string"><doc>Sets the Baclava file describing the inputs.</doc></param></representation></request><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Sets the Baclava file describing the inputs.</doc></param></representation></response></method></resource><resource path="/expected"><method name="GET"><doc>Describe the expected inputs of this workflow run.</doc><response><representation mediaType="application/xml" element="prefix10:inputDescription"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of the expected inputs&apos; operati
 ons.</doc><response><representation mediaType="application/octet-stream"></representation></response></method></resource><resource path="/input/{name}"><param name="name" style="template" type="xs:string"/><method name="GET"><doc>Gives a description of what is used to supply a particular input.</doc><request></request><response><representation mediaType="application/xml" element="prefix1:runInput"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of the one input&apos;s operations.</doc><request></request><response><representation mediaType="application/octet-stream"></representation></response></method><method name="PUT"><doc>Sets the source for a particular input port.</doc><request><representation mediaType="application/xml" element="prefix1:runInput"><doc>Sets the source for a particular input port.</doc></representation><representation mediaType="application/json"><doc>Sets the
  source for a particular input port.</doc></representation></request><response><representation mediaType="application/xml" element="prefix1:runInput"></representation><representation mediaType="application/json"></representation></response></method></resource></resource><resource path="/interaction"><method name="GET"><doc>Get the feed document for this ATOM feed.</doc><response><representation mediaType="application/atom+xml"></representation></response></method><method name="OPTIONS"><doc>Describes what HTTP operations are supported on the feed.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><method name="POST"><doc>Adds an entry to this ATOM feed.</doc><request><representation mediaType="application/atom+xml"><doc>Adds an entry to this ATOM feed.</doc></representation></request><response><representation mediaType="application/atom+xml"></representation></response></method><resource path="/{id}"><param name="id" style="temp
 late" type="xs:string"/><method name="DELETE"><doc>Deletes an entry from this ATOM feed.</doc><request></request><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Deletes an entry from this ATOM feed.</doc></param></representation></response></method><method name="GET"><doc>Get the entry with a particular ID within this ATOM feed.</doc><request></request><response><representation mediaType="application/atom+xml"></representation></response></method><method name="OPTIONS"><doc>Describes what HTTP operations are supported on an entry.</doc><request></request><response><representation mediaType="application/octet-stream"></representation></response></method></resource></resource><resource path="/listeners"><doc>This represents all the event listeners attached to a workflow run.</doc><method name="GET"><doc>Get the listeners installed in the workflow run.</doc><request></request><response><representation mediaType="application/xml"
  element="prefix1:listeners"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of the run listeners&apos; operations.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><method name="POST"><doc>Add a new event listener to the named workflow run.</doc><request><representation mediaType="application/xml" element="prefix1:listenerDefinition"><doc>Add a new event listener to the named workflow run.</doc></representation><representation mediaType="application/json"><doc>Add a new event listener to the named workflow run.</doc></representation></request><response><representation mediaType="application/octet-stream"></representation></response></method><resource path="/{name}"><doc>This represents a single event listener attached to a workflow run.</doc><param name="name" style="template" type="xs:string"/><method name="GET"><doc>Get th
 e description of this listener.</doc><request></request><response><representation mediaType="application/xml" element="prefix1:listenerDescription"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of one run listener&apos;s operations.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><resource path="/configuration"><method name="GET"><doc>Get the configuration for the given event listener that is attached to a workflow run.</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Get the configuration for the given event listener that is attached to a workflow run.</doc></param></representation></response></method><method name="OPTIONS"><doc>Produces the description of one run listener&apos;s configuration&apos;s operations.</doc><response><representation mediaType="applica
 tion/octet-stream"></representation></response></method></resource><resource path="/properties"><method name="GET"><doc>Get the list of properties supported by a given event listener attached to a workflow run.</doc><request></request><response><representation mediaType="application/xml" element="prefix1:properties"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of one run listener&apos;s properties&apos; operations.</doc><response><representation mediaType="application/octet-stream"></representation></response></method></resource><resource path="/properties/{propertyName}"><doc>This represents a single property attached of an event listener.</doc><param name="propertyName" style="template" type="xs:string"/><method name="GET"><doc>Get the value of the particular property of an event listener attached to a workflow run.</doc><response><representation mediaType="text/plain"><param
  name="result" style="plain" type="xs:string"><doc>Get the value of the particular property of an event listener attached to a workflow run.</doc></param></representation></response></method><method name="OPTIONS"><doc>Produces the description of one run listener&apos;s property&apos;s operations.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><method name="PUT"><doc>Set the value of the particular property of an event listener attached to a workflow run.</doc><request><representation mediaType="text/plain"><param name="request" style="plain" type="xs:string"><doc>Set the value of the particular property of an event listener attached to a workflow run.</doc></param></representation></request><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Set the value of the particular property of an event listener attached to a workflow run.</doc></param></representation></response><
 /method></resource></resource></resource><resource path="/security"><doc>Manages the security of the workflow run. In general, only the owner of a run may access this resource.</doc><method name="GET"><doc>Gives a description of the security information supported by the workflow run.</doc><request></request><response><representation mediaType="application/xml" element="prefix1:securityDescriptor"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of the run security.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><resource path="/credentials"><method name="DELETE"><doc>Deletes all credentials.</doc><request></request><response><representation mediaType="application/octet-stream"></representation></response></method><method name="GET"><doc>Gives a list of credentials supplied to this workflow run.</doc><response><representation
  mediaType="application/xml" element="prefix1:credentials"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of the run credentials&apos; operations.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><method name="POST"><doc>Creates a new credential.</doc><request><representation mediaType="application/xml" element="prefix1:credential"><doc>Creates a new credential.</doc></representation><representation mediaType="application/json"><doc>Creates a new credential.</doc></representation></request><response><representation mediaType="application/octet-stream"></representation></response></method></resource><resource path="/credentials/{id}"><param name="id" style="template" type="xs:string"/><method name="DELETE"><doc>Deletes a particular credential.</doc><request></request><response><representation mediaType="application/octet-stre
 am"></representation></response></method><method name="GET"><doc>Describes a particular credential.</doc><request></request><response><representation mediaType="application/xml" element="prefix1:credential"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of one run credential&apos;s operations.</doc><request></request><response><representation mediaType="application/octet-stream"></representation></response></method><method name="PUT"><doc>Updates a particular credential.</doc><request><representation mediaType="application/xml" element="prefix1:credential"><doc>Updates a particular credential.</doc></representation><representation mediaType="application/json"><doc>Updates a particular credential.</doc></representation></request><response><representation mediaType="application/xml" element="prefix1:credential"></representation><representation mediaType="application/json"></represe
 ntation></response></method></resource><resource path="/owner"><method name="GET"><doc>Gives the identity of who owns the workflow run.</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Gives the identity of who owns the workflow run.</doc></param></representation></response></method><method name="OPTIONS"><doc>Produces the description of the run owner.</doc><response><representation mediaType="application/octet-stream"></representation></response></method></resource><resource path="/permissions"><method name="GET"><doc>Gives a list of all non-default permissions associated with the enclosing workflow run. By default, nobody has any access at all except for the owner of the run.</doc><request></request><response><representation mediaType="application/xml" element="prefix1:permissionsDescriptor"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Pro
 duces the description of the run permissions&apos; operations.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><method name="POST"><doc>Creates a new assignment of permissions to a particular user.</doc><request><representation mediaType="application/xml" element="prefix1:permissionUpdate"><doc>Creates a new assignment of permissions to a particular user.</doc></representation><representation mediaType="application/json"><doc>Creates a new assignment of permissions to a particular user.</doc></representation></request><response><representation mediaType="application/octet-stream"></representation></response></method></resource><resource path="/permissions/{id}"><param name="id" style="template" type="xs:string"/><method name="DELETE"><doc>Deletes (by resetting to default) the permissions associated with a particular user.</doc><request></request><response><representation mediaType="application/octet-stream"></representation></
 response></method><method name="GET"><doc>Describes the permission granted to a particular user.</doc><request></request><response><representation mediaType="text/plain"></representation></response></method><method name="OPTIONS"><doc>Produces the description of one run permission&apos;s operations.</doc><request></request><response><representation mediaType="application/octet-stream"></representation></response></method><method name="PUT"><doc>Updates the permissions granted to a particular user.</doc><request><representation mediaType="text/plain"><doc>Updates the permissions granted to a particular user.</doc></representation></request><response><representation mediaType="text/plain"></representation></response></method></resource><resource path="/trusts"><method name="DELETE"><doc>Deletes all trusted identities.</doc><request></request><response><representation mediaType="application/octet-stream"></representation></response></method><method name="GET"><doc>Gives a list of trust
 ed identities supplied to this workflow run.</doc><response><representation mediaType="application/xml" element="prefix1:trustedIdentities"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of the run trusted certificates&apos; operations.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><method name="POST"><doc>Adds a new trusted identity.</doc><request><representation mediaType="application/xml" element="prefix3:trustedIdentity"><doc>Adds a new trusted identity.</doc></representation><representation mediaType="application/json"><doc>Adds a new trusted identity.</doc></representation></request><response><representation mediaType="application/octet-stream"></representation></response></method></resource><resource path="/trusts/{id}"><param name="id" style="template" type="xs:string"/><method name="DELETE"><doc>Deletes a particu
 lar trusted identity.</doc><request></request><response><representation mediaType="application/octet-stream"></representation></response></method><method name="GET"><doc>Describes a particular trusted identity.</doc><request></request><response><representation mediaType="application/xml" element="prefix3:trustedIdentity"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of one run trusted certificate&apos;s operations.</doc><request></request><response><representation mediaType="application/octet-stream"></representation></response></method><method name="PUT"><doc>Updates a particular trusted identity.</doc><request><representation mediaType="application/xml" element="prefix3:trustedIdentity"><doc>Updates a particular trusted identity.</doc></representation><representation mediaType="application/json"><doc>Updates a particular trusted identity.</doc></representation></request><respo
 nse><representation mediaType="application/xml" element="prefix3:trustedIdentity"></representation><representation mediaType="application/json"></representation></response></method></resource></resource><resource path="/wd"><doc>Representation of how a workflow run&apos;s working directory tree looks.</doc><method name="GET"><doc>Describes the working directory of the workflow run.</doc><request></request><response><representation mediaType="application/xml" element="prefix1:directoryContents"></representation><representation mediaType="application/json"></representation></response></method><resource path="/{path:(.*)}"><param name="path" style="template" repeating="true"/><method name="POST"><doc>Creates or updates a file in a particular location beneath the working directory of the workflow run with the contents of a publicly readable URL.</doc><request><representation mediaType="text/uri-list"><doc>Creates or updates a file in a particular location beneath the working directory o
 f the workflow run with the contents of a publicly readable URL.</doc></representation></request><response><representation mediaType="application/xml"></representation><representation mediaType="application/json"></representation></response></method><method name="PUT"><doc>Creates or updates a file in a particular location beneath the working directory of the workflow run.</doc><request><representation mediaType="application/octet-stream"><doc>Creates or updates a file in a particular location beneath the working directory of the workflow run.</doc></representation><representation mediaType="*/*"><doc>Creates or updates a file in a particular location beneath the working directory of the workflow run.</doc></representation></request><response><representation mediaType="application/xml"></representation><representation mediaType="application/json"></representation></response></method></resource><resource path="/{path:.*}"><param name="path" style="template" repeating="true"/><method 
 name="DELETE"><doc>Deletes a file or directory that is in or below the working directory of a workflow run.</doc><request></request><response><representation mediaType="application/xml"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of the files/directories&apos; baclava operations.</doc><request></request><response><representation mediaType="application/xml"></representation><representation mediaType="application/json"></representation></response></method><method name="POST"><doc>Creates a directory in the filesystem beneath the working directory of the workflow run, or creates or updates a file&apos;s contents, where that file is in or below the working directory of a workflow run.</doc><request><representation mediaType="application/xml" element="prefix1:filesystemOperation"><doc>Creates a directory in the filesystem beneath the working directory of the workflow run, or create
 s or updates a file&apos;s contents, where that file is in or below the working directory of a workflow run.</doc></representation><representation mediaType="application/json"><doc>Creates a directory in the filesystem beneath the working directory of the workflow run, or creates or updates a file&apos;s contents, where that file is in or below the working directory of a workflow run.</doc></representation></request><response><representation mediaType="application/xml"></representation><representation mediaType="application/json"></representation></response></method></resource><resource path="/{path:.+}"><param name="path" style="template" repeating="true"/><method name="GET"><doc>Gives a description of the named entity in or beneath the working directory of the workflow run (either a Directory or File).</doc><request></request><response><representation mediaType="application/xml"></representation><representation mediaType="application/json"></representation><representation mediaTyp
 e="application/octet-stream"></representation><representation mediaType="application/zip"></representation><representation mediaType="*/*"></representation></response></method></resource></resource></resource></resource></resources></application>
\ No newline at end of file


[21/50] [abbrv] incubator-taverna-server git commit: Feature was implemented, but not listed in release notes (forgot to close issue)

Posted by st...@apache.org.
Feature was implemented, but not listed in release notes (forgot to
close issue)

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/e20667db
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/e20667db
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/e20667db

Branch: refs/heads/master
Commit: e20667dbb062b87be8f170c2be8ea4347e3be79c
Parents: feaa3ad
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Thu Apr 24 10:20:44 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Thu Apr 24 10:20:44 2014 +0100

----------------------------------------------------------------------
 release-notes.txt | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/e20667db/release-notes.txt
----------------------------------------------------------------------
diff --git a/release-notes.txt b/release-notes.txt
index ba878f3..362545a 100644
--- a/release-notes.txt
+++ b/release-notes.txt
@@ -89,6 +89,7 @@ TAVSERV-332 Massively degraded performance of 2.5.2
     Updated to use Taverna 2.5.0 Enterprise Execution Core
 TAVSERV-331 Add an option for the provenance export using the new -provbundle
             command line tool switch
+TAVSERV-336 Support splitting inputs 
 TAVSERV-337 RMI registry subprocess race condition
 SERVINF-395 Fix race condition in XML parsing
 ---- 2.5.4 release ----
\ No newline at end of file


[17/50] [abbrv] incubator-taverna-server git commit: Update version numbers and release notes.

Posted by st...@apache.org.
Update version numbers and release notes.

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/9299a522
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/9299a522
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/9299a522

Branch: refs/heads/master
Commit: 9299a522397ff98a00dd87c7de005f32c1cf1e19
Parents: 0802c0f
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Tue Apr 22 15:29:05 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Tue Apr 22 15:29:05 2014 +0100

----------------------------------------------------------------------
 release-notes.txt                                     | 14 ++++++++++----
 .../taverna/server/master/common/version/Version.java |  2 +-
 server-webapp/src/main/resources/welcome.html         |  2 +-
 server-webapp/src/main/webapp/WEB-INF/web.xml         |  6 +++---
 4 files changed, 15 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/9299a522/release-notes.txt
----------------------------------------------------------------------
diff --git a/release-notes.txt b/release-notes.txt
index cee6da4..ba878f3 100644
--- a/release-notes.txt
+++ b/release-notes.txt
@@ -1,7 +1,7 @@
-Taverna 2.5.3 Server Release Notes
+Taverna 2.5.4 Server Release Notes
 ==================================
 
-This is the third public release of Taverna 2.5 Server. We welcome feedback
+This is the fourth public release of Taverna 2.5 Server. We welcome feedback
 on both the things that are there and the things that are not.
 
 Key Features
@@ -45,13 +45,13 @@ Key Features
 
 Significant Changes
 -------------------
+ * Supports full Taverna 2.5.0 Enterprise execution platform
  * Now requires Java 7
 
 Planned Future Features
 -----------------------
  * Support for Cluster Deployment
  * Full WebDAV access to run working directory
- * Access to Provenance
 
 Specific Issues Addressed in This Release
 -----------------------------------------
@@ -85,4 +85,10 @@ TAVSERV-297 Running instance of Taverna Server 2.4.1 hangs after a while;
 ---- 2.5.2 release ----
 TAVSERV-329 Master feed broken
 TAVSERV-332 Massively degraded performance of 2.5.2
----- 2.5.3 release ----
\ No newline at end of file
+---- 2.5.3 release ----
+    Updated to use Taverna 2.5.0 Enterprise Execution Core
+TAVSERV-331 Add an option for the provenance export using the new -provbundle
+            command line tool switch
+TAVSERV-337 RMI registry subprocess race condition
+SERVINF-395 Fix race condition in XML parsing
+---- 2.5.4 release ----
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/9299a522/server-webapp/src/main/java/org/taverna/server/master/common/version/Version.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/common/version/Version.java b/server-webapp/src/main/java/org/taverna/server/master/common/version/Version.java
index 88a3faa..e9c58a9 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/common/version/Version.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/common/version/Version.java
@@ -27,7 +27,7 @@ public interface Version {
 interface Constants {
 	static final String MAJOR = "2";
 	static final String MINOR = "5";
-	static final String PATCH = "3";
+	static final String PATCH = "4";
 
 	static final char alphaChar = '\u03b1';
 	static final char betaChar = '\u03b2';

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/9299a522/server-webapp/src/main/resources/welcome.html
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/resources/welcome.html b/server-webapp/src/main/resources/welcome.html
index 856f3e2..81b3b06 100644
--- a/server-webapp/src/main/resources/welcome.html
+++ b/server-webapp/src/main/resources/welcome.html
@@ -108,7 +108,7 @@ simple guide just discusses the REST API.</p>
 
 <div>
 <hr>
-<p><small>Copyright &copy; 2010&ndash;2013. The University of Manchester.</small></p>
+<p><small>Copyright &copy; 2010&ndash;2014. The University of Manchester.</small></p>
 <p><small>Software Release ID: ${project.version} (commit: ${git.branch})</small></p>
 </div>
 </body>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/9299a522/server-webapp/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/webapp/WEB-INF/web.xml b/server-webapp/src/main/webapp/WEB-INF/web.xml
index 599c0e9..335a5d3 100644
--- a/server-webapp/src/main/webapp/WEB-INF/web.xml
+++ b/server-webapp/src/main/webapp/WEB-INF/web.xml
@@ -5,9 +5,9 @@
 
 <!-- Copyright (C) 2010-2011 The University of Manchester See the file "LICENSE" 
 	for license terms. -->
-<web-app id="TAVSERV-2.5.3">
-	<display-name>Taverna 2.5.3 Server</display-name>
-	<description>This is the front-end engine for Taverna 2.5.3 Server.</description>
+<web-app id="TAVSERV-2.5.4">
+	<display-name>Taverna 2.5.4 Server</display-name>
+	<description>This is the front-end engine for Taverna 2.5.4 Server.</description>
 	<context-param>
 		<param-name>contextConfigLocation</param-name>
 		<param-value>WEB-INF/secure.xml</param-value>


[09/50] [abbrv] incubator-taverna-server git commit: Bump the version numbers.

Posted by st...@apache.org.
Bump the version numbers.

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/91f7bcf8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/91f7bcf8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/91f7bcf8

Branch: refs/heads/master
Commit: 91f7bcf8897ad3a7c613de5cff9701b1b0c73ce4
Parents: 61996cc
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Fri Apr 11 13:52:52 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Fri Apr 11 13:52:52 2014 +0100

----------------------------------------------------------------------
 pom.xml                         | 2 +-
 server-distribution/pom.xml     | 2 +-
 server-port-description/pom.xml | 2 +-
 server-rmidaemon/pom.xml        | 2 +-
 server-runinterface/pom.xml     | 2 +-
 server-unix-forker/pom.xml      | 2 +-
 server-usagerecord/pom.xml      | 2 +-
 server-webapp/pom.xml           | 2 +-
 server-worker/pom.xml           | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/91f7bcf8/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index b6be865..e00f579 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
 	<groupId>uk.org.taverna.server</groupId>
 	<artifactId>server</artifactId>
 	<packaging>pom</packaging>
-	<version>2.5.3</version>
+	<version>2.5.4-SNAPSHOT</version>
 	<name>Taverna Server</name>
 	<description>Taverna Server is a service that provides execution of Taverna Workflows, provided they do not access the user interface while executing.</description>
 	<url>http://www.taverna.org.uk/</url>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/91f7bcf8/server-distribution/pom.xml
----------------------------------------------------------------------
diff --git a/server-distribution/pom.xml b/server-distribution/pom.xml
index 7a1f52d..f09facf 100644
--- a/server-distribution/pom.xml
+++ b/server-distribution/pom.xml
@@ -4,7 +4,7 @@
 	<parent>
 		<artifactId>server</artifactId>
 		<groupId>uk.org.taverna.server</groupId>
-		<version>2.5.3</version>
+		<version>2.5.4-SNAPSHOT</version>
 		<relativePath>..</relativePath>
 	</parent>
 	<artifactId>server-distribution</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/91f7bcf8/server-port-description/pom.xml
----------------------------------------------------------------------
diff --git a/server-port-description/pom.xml b/server-port-description/pom.xml
index 1ae4f26..3170b27 100644
--- a/server-port-description/pom.xml
+++ b/server-port-description/pom.xml
@@ -3,7 +3,7 @@
 	<parent>
 		<artifactId>server</artifactId>
 		<groupId>uk.org.taverna.server</groupId>
-		<version>2.5.3</version>
+		<version>2.5.4-SNAPSHOT</version>
 	</parent>
 	<artifactId>server-port-description</artifactId>
 	<name>Workflow Port Descriptor Types</name>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/91f7bcf8/server-rmidaemon/pom.xml
----------------------------------------------------------------------
diff --git a/server-rmidaemon/pom.xml b/server-rmidaemon/pom.xml
index b86235c..f3020fa 100644
--- a/server-rmidaemon/pom.xml
+++ b/server-rmidaemon/pom.xml
@@ -4,7 +4,7 @@
 	<parent>
 		<groupId>uk.org.taverna.server</groupId>
 		<artifactId>server</artifactId>
-		<version>2.5.3</version>
+		<version>2.5.4-SNAPSHOT</version>
 	</parent>
 	<artifactId>server-rmidaemon</artifactId>
 	<name>RMI registry daemon</name>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/91f7bcf8/server-runinterface/pom.xml
----------------------------------------------------------------------
diff --git a/server-runinterface/pom.xml b/server-runinterface/pom.xml
index b68a487..973c518 100644
--- a/server-runinterface/pom.xml
+++ b/server-runinterface/pom.xml
@@ -6,7 +6,7 @@
 	<parent>
 		<groupId>uk.org.taverna.server</groupId>
 		<artifactId>server</artifactId>
-		<version>2.5.3</version>
+		<version>2.5.4-SNAPSHOT</version>
 		<relativePath>..</relativePath>
 	</parent>
 	<scm>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/91f7bcf8/server-unix-forker/pom.xml
----------------------------------------------------------------------
diff --git a/server-unix-forker/pom.xml b/server-unix-forker/pom.xml
index d85eaaf..098d09e 100644
--- a/server-unix-forker/pom.xml
+++ b/server-unix-forker/pom.xml
@@ -4,7 +4,7 @@
 	<parent>
 		<artifactId>server</artifactId>
 		<groupId>uk.org.taverna.server</groupId>
-		<version>2.5.3</version>
+		<version>2.5.4-SNAPSHOT</version>
 	</parent>
 	<artifactId>server-unix-forker</artifactId>
 	<scm>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/91f7bcf8/server-usagerecord/pom.xml
----------------------------------------------------------------------
diff --git a/server-usagerecord/pom.xml b/server-usagerecord/pom.xml
index 1d582c2..5bb0e3d 100644
--- a/server-usagerecord/pom.xml
+++ b/server-usagerecord/pom.xml
@@ -3,7 +3,7 @@
 	<parent>
 		<artifactId>server</artifactId>
 		<groupId>uk.org.taverna.server</groupId>
-		<version>2.5.3</version>
+		<version>2.5.4-SNAPSHOT</version>
 		<relativePath>..</relativePath>
 	</parent>
 	<artifactId>server-usagerecord</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/91f7bcf8/server-webapp/pom.xml
----------------------------------------------------------------------
diff --git a/server-webapp/pom.xml b/server-webapp/pom.xml
index 2f5ca7b..ef4c82f 100644
--- a/server-webapp/pom.xml
+++ b/server-webapp/pom.xml
@@ -7,7 +7,7 @@
 	<parent>
 		<groupId>uk.org.taverna.server</groupId>
 		<artifactId>server</artifactId>
-		<version>2.5.3</version>
+		<version>2.5.4-SNAPSHOT</version>
 		<relativePath>..</relativePath>
 	</parent>
 	<scm>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/91f7bcf8/server-worker/pom.xml
----------------------------------------------------------------------
diff --git a/server-worker/pom.xml b/server-worker/pom.xml
index bd17d3a..532e37f 100644
--- a/server-worker/pom.xml
+++ b/server-worker/pom.xml
@@ -6,7 +6,7 @@
 	<parent>
 		<groupId>uk.org.taverna.server</groupId>
 		<artifactId>server</artifactId>
-		<version>2.5.3</version>
+		<version>2.5.4-SNAPSHOT</version>
 		<relativePath>..</relativePath>
 	</parent>
 	<scm>


[24/50] [abbrv] incubator-taverna-server git commit: Merge branch '2.5-branch' into taverna-3

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-webapp/src/test/java/org/taverna/server/master/WorkflowSerializationTest.java
----------------------------------------------------------------------
diff --cc server-webapp/src/test/java/org/taverna/server/master/WorkflowSerializationTest.java
index 117f637,4d49d17..0450317
--- a/server-webapp/src/test/java/org/taverna/server/master/WorkflowSerializationTest.java
+++ b/server-webapp/src/test/java/org/taverna/server/master/WorkflowSerializationTest.java
@@@ -29,22 -27,20 +29,23 @@@ public class WorkflowSerializationTest 
  				.newDocumentBuilder();
  		Document doc = db.getDOMImplementation().createDocument(null, null,
  				null);
 -		w.content[0] = doc.createElement("foo");
 -		w.content[0].setTextContent("bar");
 -		w.content[0].setAttribute("xyz", "abc");
 +		Element workflow = doc.createElementNS(T2FLOW_NS, T2FLOW_ROOTNAME);
 +		Element foo = doc.createElementNS("urn:foo:bar", "pqr:foo");
 +		foo.setTextContent("bar");
 +		foo.setAttribute("xyz", "abc");
 +		workflow.appendChild(foo);
 +		Workflow w = new Workflow(workflow);
  
  		ByteArrayOutputStream baos = new ByteArrayOutputStream();
- 		ObjectOutputStream oos = new ObjectOutputStream(baos);
- 		oos.writeObject(w);
- 		oos.close();
+ 		try (ObjectOutputStream oos = new ObjectOutputStream(baos)) {
+ 			oos.writeObject(w);
+ 		}
  
- 		ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
- 		ObjectInputStream ois = new ObjectInputStream(bais);
- 		Object o = ois.readObject();
- 		ois.close();
+ 		Object o;
+ 		try (ObjectInputStream ois = new ObjectInputStream(
+ 				new ByteArrayInputStream(baos.toByteArray()))) {
+ 			o = ois.readObject();
+ 		}
  
  		Assert.assertNotNull(o);
  		Assert.assertEquals(w.getClass(), o.getClass());

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-worker/pom.xml
----------------------------------------------------------------------
diff --cc server-worker/pom.xml
index df01a00,42270ff..70239a2
--- a/server-worker/pom.xml
+++ b/server-worker/pom.xml
@@@ -44,25 -40,7 +41,24 @@@
  		<dependency>
  			<groupId>commons-io</groupId>
  			<artifactId>commons-io</artifactId>
- 			<version>2.1</version>
  		</dependency>
 +		<dependency>
 +			<groupId>uk.org.taverna.scufl2</groupId>
 +			<artifactId>scufl2-api</artifactId>
 +			<version>${scufl2.version}</version>
 +		</dependency>
 +		<dependency>
 +			<groupId>uk.org.taverna.scufl2</groupId>
 +			<artifactId>scufl2-t2flow</artifactId>
 +			<version>${scufl2.version}</version>
 +			<scope>runtime</scope>
 +		</dependency>
 +		<dependency>
 +			<groupId>uk.org.taverna.scufl2</groupId>
 +			<artifactId>scufl2-rdfxml</artifactId>
 +			<version>${scufl2.version}</version>
 +			<scope>runtime</scope>
 +		</dependency>
  	</dependencies>
  
  	<build>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-worker/src/main/java/org/taverna/server/localworker/api/Worker.java
----------------------------------------------------------------------
diff --cc server-worker/src/main/java/org/taverna/server/localworker/api/Worker.java
index 0000000,7b9f012..c513ed8
mode 000000,100644..100644
--- a/server-worker/src/main/java/org/taverna/server/localworker/api/Worker.java
+++ b/server-worker/src/main/java/org/taverna/server/localworker/api/Worker.java
@@@ -1,0 -1,135 +1,135 @@@
+ /*
+  * Copyright (C) 2010-2012 The University of Manchester
+  * 
+  * See the file "LICENSE" for license terms.
+  */
+ package org.taverna.server.localworker.api;
+ 
+ import java.io.File;
+ import java.util.List;
+ import java.util.Map;
+ 
+ import org.taverna.server.localworker.impl.LocalWorker;
+ import org.taverna.server.localworker.remote.ImplementationException;
+ import org.taverna.server.localworker.remote.RemoteListener;
+ import org.taverna.server.localworker.remote.RemoteStatus;
+ import org.taverna.server.localworker.server.UsageRecordReceiver;
+ 
+ /**
+  * The interface between the connectivity layer and the thunk to the
+  * subprocesses.
+  * 
+  * @author Donal Fellows
+  */
+ public interface Worker {
+ 	/**
+ 	 * Fire up the workflow. This causes a transition into the operating state.
+ 	 * 
+ 	 * @param local
+ 	 *            The reference to the factory class for this worker.
+ 	 * @param executeWorkflowCommand
+ 	 *            The command to run to execute the workflow.
+ 	 * @param workflow
+ 	 *            The workflow document to execute.
+ 	 * @param workingDir
+ 	 *            What directory to use as the working directory.
+ 	 * @param inputBaclavaFile
+ 	 *            The baclava file to use for inputs, or <tt>null</tt> to use
+ 	 *            the other <b>input*</b> arguments' values.
+ 	 * @param inputRealFiles
+ 	 *            A mapping of input names to files that supply them. Note that
+ 	 *            we assume that nothing mapped here will be mapped in
+ 	 *            <b>inputValues</b>.
+ 	 * @param inputValues
+ 	 *            A mapping of input names to values to supply to them. Note
+ 	 *            that we assume that nothing mapped here will be mapped in
+ 	 *            <b>inputFiles</b>.
+ 	 * @param inputDelimiters
+ 	 *            A mapping of input names to characters used to split them into
+ 	 *            lists.
+ 	 * @param outputBaclavaFile
+ 	 *            What baclava file to write the output from the workflow into,
+ 	 *            or <tt>null</tt> to have it written into the <tt>out</tt>
+ 	 *            subdirectory.
+ 	 * @param contextDirectory
+ 	 *            The directory containing the keystore and truststore. <i>Must
+ 	 *            not be <tt>null</tt>.</i>
+ 	 * @param keystorePassword
+ 	 *            The password to the keystore and truststore. <i>Must not be
+ 	 *            <tt>null</tt>.</i>
+ 	 * @param generateProvenance
+ 	 *            Whether to generate a run bundle containing provenance data.
+ 	 * @param environment
+ 	 *            Any environment variables that need to be added to the
+ 	 *            invokation.
+ 	 * @param masterToken
+ 	 *            The internal name of the workflow run.
+ 	 * @param runtimeSettings
+ 	 *            List of configuration details for the forked runtime.
+ 	 * @return Whether a successful start happened.
+ 	 * @throws Exception
+ 	 *             If any of quite a large number of things goes wrong.
+ 	 */
+ 	boolean initWorker(LocalWorker local, String executeWorkflowCommand,
 -			String workflow, File workingDir, File inputBaclavaFile,
++			byte[] workflow, File workingDir, File inputBaclavaFile,
+ 			Map<String, File> inputRealFiles, Map<String, String> inputValues,
+ 			Map<String, String> inputDelimiters, File outputBaclavaFile,
+ 			File contextDirectory, char[] keystorePassword,
+ 			boolean generateProvenance, Map<String, String> environment,
+ 			String masterToken, List<String> runtimeSettings) throws Exception;
+ 
+ 	/**
+ 	 * Kills off the subprocess if it exists and is alive.
+ 	 * 
+ 	 * @throws Exception
+ 	 *             if anything goes badly wrong when the worker is being killed
+ 	 *             off.
+ 	 */
+ 	void killWorker() throws Exception;
+ 
+ 	/**
+ 	 * Move the worker out of the stopped state and back to operating.
+ 	 * 
+ 	 * @throws Exception
+ 	 *             if it fails (which it always does; operation currently
+ 	 *             unsupported).
+ 	 */
+ 	void startWorker() throws Exception;
+ 
+ 	/**
+ 	 * Move the worker into the stopped state from the operating state.
+ 	 * 
+ 	 * @throws Exception
+ 	 *             if it fails (which it always does; operation currently
+ 	 *             unsupported).
+ 	 */
+ 	void stopWorker() throws Exception;
+ 
+ 	/**
+ 	 * @return The status of the workflow run. Note that this can be an
+ 	 *         expensive operation.
+ 	 */
+ 	RemoteStatus getWorkerStatus();
+ 
+ 	/**
+ 	 * @return The listener that is registered by default, in addition to all
+ 	 *         those that are explicitly registered by the user.
+ 	 */
+ 	RemoteListener getDefaultListener();
+ 
+ 	/**
+ 	 * @param receiver
+ 	 *            The destination where any final usage records are to be
+ 	 *            written in order to log them back to the server.
+ 	 */
+ 	void setURReceiver(UsageRecordReceiver receiver);
+ 
+ 	/**
+ 	 * Arrange for the deletion of any resources created during worker process
+ 	 * construction. Guaranteed to be the last thing done before finalization.
+ 	 * 
+ 	 * @throws ImplementationException
+ 	 *             If anything goes wrong.
+ 	 */
+ 	void deleteLocalResources() throws ImplementationException;
+ }

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-worker/src/main/java/org/taverna/server/localworker/impl/LocalWorker.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-worker/src/main/java/org/taverna/server/localworker/impl/TavernaRunManager.java
----------------------------------------------------------------------
diff --cc server-worker/src/main/java/org/taverna/server/localworker/impl/TavernaRunManager.java
index 19e1150,a4c9a7e..03ee69d
--- a/server-worker/src/main/java/org/taverna/server/localworker/impl/TavernaRunManager.java
+++ b/server-worker/src/main/java/org/taverna/server/localworker/impl/TavernaRunManager.java
@@@ -12,9 -12,15 +12,15 @@@ import static java.lang.System.out
  import static java.lang.System.setProperty;
  import static java.lang.System.setSecurityManager;
  import static java.rmi.registry.LocateRegistry.getRegistry;
+ import static org.taverna.server.localworker.api.Constants.DEATH_DELAY;
+ import static org.taverna.server.localworker.api.Constants.LOCALHOST;
+ import static org.taverna.server.localworker.api.Constants.RMI_HOST_PROP;
+ import static org.taverna.server.localworker.api.Constants.SECURITY_POLICY_FILE;
+ import static org.taverna.server.localworker.api.Constants.SEC_POLICY_PROP;
+ import static org.taverna.server.localworker.api.Constants.UNSECURE_PROP;
  
 -import java.io.StringReader;
 -import java.io.StringWriter;
 +import java.io.ByteArrayInputStream;
 +import java.net.URI;
  import java.rmi.RMISecurityManager;
  import java.rmi.RemoteException;
  import java.rmi.registry.Registry;
@@@ -25,15 -31,24 +31,17 @@@ import java.util.List
  import java.util.Map;
  import java.util.UUID;
  
- import org.taverna.server.localworker.remote.ImplementationException;
 -import javax.xml.parsers.DocumentBuilderFactory;
 -import javax.xml.transform.TransformerFactory;
 -import javax.xml.transform.dom.DOMSource;
 -import javax.xml.transform.stream.StreamResult;
 -import javax.xml.ws.Holder;
 -
+ import org.taverna.server.localworker.api.RunAccounting;
+ import org.taverna.server.localworker.api.Worker;
+ import org.taverna.server.localworker.api.WorkerFactory;
  import org.taverna.server.localworker.remote.RemoteRunFactory;
  import org.taverna.server.localworker.remote.RemoteSingleRun;
  import org.taverna.server.localworker.server.UsageRecordReceiver;
+ import org.w3c.dom.Document;
+ import org.w3c.dom.Element;
 -import org.w3c.dom.Node;
 -import org.w3c.dom.NodeList;
 -import org.xml.sax.InputSource;
 +
 +import uk.org.taverna.scufl2.api.io.WorkflowBundleIO;
  
- import edu.umd.cs.findbugs.annotations.SuppressWarnings;
- 
  /**
   * The registered factory for runs, this class is responsible for constructing
   * runs that are suitable for particular users. It is also the entry point for
@@@ -42,20 -57,34 +50,33 @@@
   * @author Donal Fellows
   * @see LocalWorker
   */
- @SuppressWarnings({ "SE_BAD_FIELD", "SE_NO_SERIALVERSIONID" })
 -@java.lang.SuppressWarnings("serial")
++@SuppressWarnings("serial")
  public class TavernaRunManager extends UnicastRemoteObject implements
  		RemoteRunFactory, RunAccounting, WorkerFactory {
 -	DocumentBuilderFactory dbf;
 -	TransformerFactory tf;
  	String command;
- 	Map<String, String> seedEnvironment = new HashMap<String, String>();
- 	List<String> javaInitParams = new ArrayList<String>();
++	Map<String, String> seedEnvironment = new HashMap<>();
++	List<String> javaInitParams = new ArrayList<>();
 +	private WorkflowBundleIO io;
 +	private int activeRuns = 0;
  	// Hacks!
  	public static String interactionHost;
  	public static String interactionPort;
  	public static String interactionWebdavPath;
  	public static String interactionFeedPath;
 -	Map<String, String> seedEnvironment = new HashMap<>();
 -	List<String> javaInitParams = new ArrayList<>();
 -	private int activeRuns = 0;
  
+ 	/**
+ 	 * How to get the actual workflow document from the XML document that it is
+ 	 * contained in.
+ 	 * 
+ 	 * @param containerDocument
+ 	 *            The document sent from the web interface.
+ 	 * @return The element describing the workflow, as expected by the Taverna
+ 	 *         command line executor.
+ 	 */
+ 	protected Element unwrapWorkflow(Document containerDocument) {
+ 		return (Element) containerDocument.getDocumentElement().getFirstChild();
+ 	}
+ 
  	private static final String usage = "java -jar server.worker.jar workflowExecScript ?-Ekey=val...? ?-Jconfig? UUID";
  
  	/**
@@@ -149,35 -227,14 +182,15 @@@
  		if (!getProperty(UNSECURE_PROP, "no").equals("yes")) {
  			setProperty(SEC_POLICY_PROP, LocalWorker.class.getClassLoader()
  					.getResource(SECURITY_POLICY_FILE).toExternalForm());
- 			setProperty(RMI_HOST_PROP, "127.0.0.1");
+ 			setProperty(RMI_HOST_PROP, LOCALHOST);
  		}
  		setSecurityManager(new RMISecurityManager());
- 		String command = args[0];
  		factoryName = args[args.length - 1];
- 		registry = getRegistry();
- 		TavernaRunManager man = new TavernaRunManager(command);
- 		for (int i = 1; i < args.length - 1; i++) {
- 			if (args[i].startsWith("-E")) {
- 				String arg = args[i].substring(2);
- 				int idx = arg.indexOf('=');
- 				if (idx > 0) {
- 					man.addEnvironmentDefinition(arg.substring(0, idx),
- 							arg.substring(idx + 1));
- 					continue;
- 				}
- 			} else if (args[i].startsWith("-D")) {
- 				if (args[i].indexOf('=') > 0) {
- 					man.addJavaParameter(args[i]);
- 					continue;
- 				}
- 			} else if (args[i].startsWith("-J")) {
- 				man.addJavaParameter(args[i].substring(2));
- 				continue;
- 			}
- 			throw new IllegalArgumentException("argument \"" + args[i]
- 					+ "\" must start with -D, -E or -J; "
- 					+ "-D and -E must contain a \"=\"");
- 		}
+ 		TavernaRunManager man = new TavernaRunManager(args[0]);
+ 		for (int i = 1; i < args.length - 1; i++)
+ 			man.addArgument(args[i]);
+ 		registry = getRegistry(LOCALHOST);
++
  		registry.bind(factoryName, man);
  		getRuntime().addShutdownHook(new Thread() {
  			@Override

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-worker/src/main/java/org/taverna/server/localworker/impl/WorkerCore.java
----------------------------------------------------------------------
diff --cc server-worker/src/main/java/org/taverna/server/localworker/impl/WorkerCore.java
index 0e88b47,9c96859..7a24cd5
--- a/server-worker/src/main/java/org/taverna/server/localworker/impl/WorkerCore.java
+++ b/server-worker/src/main/java/org/taverna/server/localworker/impl/WorkerCore.java
@@@ -27,12 -39,14 +39,15 @@@ import static org.taverna.server.localw
  import static org.taverna.server.localworker.remote.RemoteStatus.Finished;
  import static org.taverna.server.localworker.remote.RemoteStatus.Initialized;
  import static org.taverna.server.localworker.remote.RemoteStatus.Operating;
+ import static org.taverna.server.localworker.remote.RemoteStatus.Stopped;
  
+ import java.io.BufferedReader;
  import java.io.File;
  import java.io.FileNotFoundException;
 +import java.io.FileOutputStream;
  import java.io.IOException;
  import java.io.InputStream;
+ import java.io.InputStreamReader;
  import java.io.OutputStream;
  import java.io.OutputStreamWriter;
  import java.io.PrintWriter;
@@@ -233,52 -198,37 +199,40 @@@ public class WorkerCore extends Unicast
  	 *             If any of quite a large number of things goes wrong.
  	 */
  	@Override
- 	public boolean initWorker(final String executeWorkflowCommand,
- 			final byte[] workflow, final File workingDir,
- 			final File inputBaclava, final Map<String, File> inputFiles,
- 			final Map<String, String> inputValues, final File outputBaclava,
- 			final File securityDir, final char[] password,
- 			final Map<String, String> environment, final String token,
- 			final List<String> runtime) throws IOException {
- 		final Holder<IOException> h = new Holder<IOException>();
- 		Thread t = new Thread(new Runnable() {
- 			@Override
- 			public void run() {
- 				try {
- 					ProcessBuilder pb = createProcessBuilder(
- 							executeWorkflowCommand, workflow, workingDir,
- 							inputBaclava, inputFiles, inputValues,
- 							outputBaclava, securityDir, password, environment,
- 							token, runtime);
- 
- 					// Start the subprocess
- 					out.println("starting " + pb.command() + " in directory "
- 							+ workingDir);
- 					subprocess = pb.start();
- 					if (subprocess == null)
- 						throw new IOException(
- 								"unknown failure creating process");
- 					start = new Date();
- 					accounting.runStarted();
- 
- 					// Capture its stdout and stderr
- 					new AsyncCopy(subprocess.getInputStream(), stdout);
- 					new AsyncCopy(subprocess.getErrorStream(), stderr);
- 					if (password != null)
- 						new AsyncPrint(subprocess.getOutputStream(), password);
- 				} catch (IOException e) {
- 					h.value = e;
- 				}
- 			}
- 		});
- 		t.start();
 -	public boolean initWorker(@Nonnull final LocalWorker local,
++	public boolean initWorker(
++			@Nonnull final LocalWorker local,
+ 			@Nonnull final String executeWorkflowCommand,
 -			@Nonnull final String workflow, @Nonnull final File workingDir,
++			@Nonnull final byte[] workflow,
++			@Nonnull final File workingDir,
+ 			@Nullable final File inputBaclava,
+ 			@Nonnull final Map<String, File> inputFiles,
 -			@Nonnull final Map<String, String> inputValues,
++			@Nonnull final Map<String, String> inputValues, 
+ 			@Nonnull final Map<String, String> inputDelimiters,
+ 			@Nullable final File outputBaclava,
 -			@Nonnull final File securityDir, @Nullable final char[] password,
++			@Nonnull final File securityDir,
++			@Nullable final char[] password,
+ 			final boolean generateProvenance,
+ 			@Nonnull final Map<String, String> environment,
 -			@Nonnull final String token, @Nonnull final List<String> runtime)
 -			throws IOException {
++			@Nullable final String token,
++			@Nonnull final List<String> runtime) throws IOException {
  		try {
- 			t.join(START_WAIT_TIME);
- 		} catch (InterruptedException e) {
- 			// Won't happen
+ 			new TimingOutTask() {
+ 				@Override
+ 				public void doIt() throws IOException {
+ 					startExecutorSubprocess(
+ 							createProcessBuilder(local, executeWorkflowCommand,
+ 									workflow, workingDir, inputBaclava,
+ 									inputFiles, inputValues, inputDelimiters,
+ 									outputBaclava, securityDir, password,
+ 									generateProvenance, environment, token,
+ 									runtime), password);
+ 				}
+ 			}.doOrTimeOut(START_WAIT_TIME);
+ 		} catch (IOException e) {
+ 			throw e;
+ 		} catch (Exception e) {
+ 			throw new IOException(e);
  		}
- 		if (h.value != null)
- 			throw h.value;
  		return subprocess != null;
  	}
  
@@@ -317,14 -287,20 +291,20 @@@
  	 * @throws FileNotFoundException
  	 *             If we can't write the workflow out (unlikely)
  	 */
- 	ProcessBuilder createProcessBuilder(String executeWorkflowCommand,
- 			byte[] workflow, File workingDir, File inputBaclava,
- 			Map<String, File> inputFiles, Map<String, String> inputValues,
- 			File outputBaclava, File securityDir, char[] password,
- 			Map<String, String> environment, String token, List<String> runtime)
- 			throws IOException, UnsupportedEncodingException,
- 			FileNotFoundException {
+ 	@Nonnull
+ 	ProcessBuilder createProcessBuilder(@Nonnull LocalWorker local,
 -			@Nonnull String executeWorkflowCommand, @Nonnull String workflow,
++			@Nonnull String executeWorkflowCommand, @Nonnull byte[] workflow,
+ 			@Nonnull File workingDir, @Nullable File inputBaclava,
+ 			@Nonnull Map<String, File> inputFiles,
+ 			@Nonnull Map<String, String> inputValues,
+ 			@Nonnull Map<String, String> inputDelimiters,
+ 			@Nullable File outputBaclava, @Nonnull File securityDir,
+ 			@Nonnull char[] password, boolean generateProvenance,
+ 			@Nonnull Map<String, String> environment, @Nonnull String token,
+ 			@Nonnull List<String> runtime) throws IOException,
+ 			UnsupportedEncodingException, FileNotFoundException {
  		ProcessBuilder pb = new ProcessBuilder();
+ 		pb.command().add(TIME);
  		/*
  		 * WARNING! HERE THERE BE DRAGONS! BE CAREFUL HERE!
  		 * 
@@@ -416,13 -405,11 +409,10 @@@
  		}
  
  		// Add an argument holding the workflow
- 		File tmp = createTempFile("taverna", ".t2flow");
- 		OutputStream os = new FileOutputStream(tmp);
- 		try {
 -		workflowFile = createTempFile(".wf_", ".t2flow", workingDir);
 -		write(workflowFile, workflow, "UTF-8");
 -		if (!workflowFile.exists())
 -			throw new IOException("failed to instantiate workflow file at "
 -					+ workflowFile);
++		File tmp = createTempFile(".wf_", ".scufl2", workingDir);
++		try (OutputStream os = new FileOutputStream(tmp)) {
 +			os.write(workflow);
- 		} finally {
- 			os.close();
 +		}
  		pb.command().add(workflowFile.getAbsolutePath());
  
  		// Indicate what working directory to use
@@@ -439,14 -428,17 +431,17 @@@
  		env.put("PATH", new File(System.getProperty("java.home"), "bin")
  				+ pathSeparator + env.get("PATH"));
  		// Patch the environment to deal with TAVSERV-189
 -		env.put("RAVEN_APPHOME", workingDir.getCanonicalPath());
 +		env.put("TAVERNA_APPHOME", workingDir.getCanonicalPath());
  		// Patch the environment to deal with TAVSERV-224
  		env.put("TAVERNA_RUN_ID", token);
- 		if (interactionHost != null) {
- 			env.put("INTERACTION_HOST", interactionHost);
- 			env.put("INTERACTION_PORT", interactionPort);
- 			env.put("INTERACTION_WEBDAV", interactionWebdavPath);
- 			env.put("INTERACTION_FEED", interactionFeedPath);
+ 		if (interactionHost != null || local.interactionFeedURL != null
+ 				|| local.webdavURL != null) {
+ 			env.put("INTERACTION_HOST", makeInterHost(local.interactionFeedURL));
+ 			env.put("INTERACTION_PORT", makeInterPort(local.interactionFeedURL));
+ 			env.put("INTERACTION_FEED", makeInterPath(local.interactionFeedURL));
+ 			env.put("INTERACTION_WEBDAV",
+ 					local.webdavURL != null ? local.webdavURL.getPath()
+ 							: interactionWebdavPath);
  		}
  		return pb;
  	}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-worker/src/test/java/org/taverna/server/localworker/impl/LocalWorkerTest.java
----------------------------------------------------------------------
diff --cc server-worker/src/test/java/org/taverna/server/localworker/impl/LocalWorkerTest.java
index 591eb08,ef92cc5..7bcd92e
--- a/server-worker/src/test/java/org/taverna/server/localworker/impl/LocalWorkerTest.java
+++ b/server-worker/src/test/java/org/taverna/server/localworker/impl/LocalWorkerTest.java
@@@ -90,15 -89,16 +89,16 @@@ public class LocalWorkerTest 
  		}
  
  		@Override
- 		public boolean initWorker(String executeWorkflowCommand,
- 				byte[] workflow, File workingDir, File inputBaclava,
+ 		public boolean initWorker(LocalWorker local,
 -				String executeWorkflowCommand, String workflow,
++				String executeWorkflowCommand, byte[] workflow,
+ 				File workingDir, File inputBaclava,
  				Map<String, File> inputFiles, Map<String, String> inputValues,
- 				File outputBaclava, File cmdir, char[] cmpass,
- 				Map<String, String> env, String id, List<String> conf)
- 				throws Exception {
+ 				Map<String, String> delimiters, File outputBaclava, File cmdir,
+ 				char[] cmpass, boolean doprov, Map<String, String> env,
+ 				String id, List<String> conf) throws Exception {
  			events.add("init[");
  			events.add(executeWorkflowCommand);
 -			events.add(workflow);
 +			events.add(new String(workflow, "UTF-8"));
  			int dirLen = workingDir.getName().length();
  			events.add(Integer.toString(dirLen));
  			events.add(inputBaclava == null ? "<null>" : inputBaclava
@@@ -153,9 -154,9 +154,9 @@@
  
  	@Before
  	public void setUp() throws Exception {
 -		lw = new LocalWorker("XWC", "WF", null, randomUUID(),
 +		lw = new LocalWorker("XWC", "WF".getBytes("UTF-8"), null, randomUUID(),
  				new HashMap<String, String>(), new ArrayList<String>(), factory);
- 		events = new ArrayList<String>();
+ 		events = new ArrayList<>();
  		returnThisStatus = RemoteStatus.Operating;
  	}
  
@@@ -547,4 -548,4 +548,4 @@@
  						"{bar=<null>, foo=foofile}",
  						"{bar=barvalue, foo=null}", "boo", "]", "kill"), events);
  	}
--}
++}


[42/50] [abbrv] incubator-taverna-server git commit: Minify the admin interface.

Posted by st...@apache.org.
Minify the admin interface.

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/bc262f67
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/bc262f67
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/bc262f67

Branch: refs/heads/master
Commit: bc262f67489399e123b9b5ca16e6bd7a8d44b694
Parents: a1c27cd
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Thu Jul 3 14:44:10 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Thu Jul 3 14:44:10 2014 +0100

----------------------------------------------------------------------
 server-webapp/pom.xml | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/bc262f67/server-webapp/pom.xml
----------------------------------------------------------------------
diff --git a/server-webapp/pom.xml b/server-webapp/pom.xml
index db34e9f..719da86 100644
--- a/server-webapp/pom.xml
+++ b/server-webapp/pom.xml
@@ -496,6 +496,19 @@
 										<ignore />
 									</action>
 								</pluginExecution>
+								<pluginExecution>
+									<pluginExecutionFilter>
+										<groupId>net.alchim31.maven</groupId>
+										<artifactId>yuicompressor-maven-plugin</artifactId>
+										<versionRange>[1.0.0,)</versionRange>
+										<goals>
+											<goal>compress</goal>
+										</goals>
+									</pluginExecutionFilter>
+									<action>
+										<execute/>
+									</action>
+								</pluginExecution>
 							</pluginExecutions>
 						</lifecycleMappingMetadata>
 					</configuration>
@@ -718,6 +731,24 @@
 				</configuration>
 			</plugin>
 			<plugin>
+				<groupId>net.alchim31.maven</groupId>
+				<artifactId>yuicompressor-maven-plugin</artifactId>
+				<version>1.4.0</version>
+				<executions>
+					<execution>
+						<goals>
+							<goal>compress</goal>
+						</goals>
+					</execution>
+				</executions>
+				<configuration>
+					<excludes>
+						<exclude>**/*.min.js</exclude>
+					</excludes>
+					<nosuffix>true</nosuffix>
+				</configuration>
+			</plugin>
+			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-resources-plugin</artifactId>
 				<executions>


[41/50] [abbrv] incubator-taverna-server git commit: Rewrite code, pass back parsed URs.

Posted by st...@apache.org.
Rewrite code, pass back parsed URs.

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/a1c27cd9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/a1c27cd9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/a1c27cd9

Branch: refs/heads/master
Commit: a1c27cd94e45bde58693df30472e2b34fcf1e07b
Parents: e5bc8be
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Tue Jul 1 14:18:21 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Tue Jul 1 14:18:21 2014 +0100

----------------------------------------------------------------------
 server-client/pom.xml                           |   5 +
 .../uk/org/taverna/server/client/Connected.java |  20 +
 .../uk/org/taverna/server/client/DirEntry.java  |  39 ++
 .../uk/org/taverna/server/client/Directory.java |  94 ++++
 .../java/uk/org/taverna/server/client/File.java |  95 ++++
 .../uk/org/taverna/server/client/Property.java  |  18 +
 .../java/uk/org/taverna/server/client/Run.java  | 215 ++++++++
 .../uk/org/taverna/server/client/Status.java    |  36 ++
 .../taverna/server/client/TavernaServer.java    | 493 ++-----------------
 .../client/TavernaServerConnectionFactory.java  |  23 +
 .../main/java/org/ogf/usage/JobUsageRecord.java |  23 +-
 11 files changed, 617 insertions(+), 444 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/a1c27cd9/server-client/pom.xml
----------------------------------------------------------------------
diff --git a/server-client/pom.xml b/server-client/pom.xml
index 397f102..bac3ea5 100644
--- a/server-client/pom.xml
+++ b/server-client/pom.xml
@@ -30,6 +30,11 @@
 			<artifactId>tika-core</artifactId>
 			<version>1.5</version>
 		</dependency>
+		<dependency>
+			<groupId>uk.org.taverna.server</groupId>
+			<artifactId>server-usagerecord</artifactId>
+			<version>${project.version}</version>
+		</dependency>
 	</dependencies>
 
 	<build>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/a1c27cd9/server-client/src/main/java/uk/org/taverna/server/client/Connected.java
----------------------------------------------------------------------
diff --git a/server-client/src/main/java/uk/org/taverna/server/client/Connected.java b/server-client/src/main/java/uk/org/taverna/server/client/Connected.java
new file mode 100644
index 0000000..263034c
--- /dev/null
+++ b/server-client/src/main/java/uk/org/taverna/server/client/Connected.java
@@ -0,0 +1,20 @@
+package uk.org.taverna.server.client;
+
+import uk.org.taverna.server.client.TavernaServer.ClientException;
+import uk.org.taverna.server.client.TavernaServer.ServerException;
+
+import com.sun.jersey.api.client.ClientResponse;
+
+abstract class Connected {
+	void checkError(ClientResponse response) throws ClientException,
+			ServerException {
+		ClientResponse.Status s = response.getClientResponseStatus();
+		if (s.getStatusCode() == 401)
+			throw new TavernaServer.AuthorizationException("not authorized",
+					null);
+		if (s.getStatusCode() >= 500)
+			throw new TavernaServer.ServerException(s.getReasonPhrase(), null);
+		if (s.getStatusCode() >= 400)
+			throw new TavernaServer.ClientException(s.getReasonPhrase(), null);
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/a1c27cd9/server-client/src/main/java/uk/org/taverna/server/client/DirEntry.java
----------------------------------------------------------------------
diff --git a/server-client/src/main/java/uk/org/taverna/server/client/DirEntry.java b/server-client/src/main/java/uk/org/taverna/server/client/DirEntry.java
new file mode 100644
index 0000000..267707d
--- /dev/null
+++ b/server-client/src/main/java/uk/org/taverna/server/client/DirEntry.java
@@ -0,0 +1,39 @@
+package uk.org.taverna.server.client;
+
+import org.taverna.server.client.wadl.TavernaServer.Root.RunsRunName.Wd.Path2;
+
+import uk.org.taverna.server.client.TavernaServer.ClientException;
+import uk.org.taverna.server.client.TavernaServer.ServerException;
+
+import com.sun.jersey.api.client.ClientResponse;
+
+public abstract class DirEntry extends Connected {
+	final Path2 handle;
+	final String path;
+	final Run run;
+
+	protected DirEntry(Run run, String path) {
+		this.run = run;
+		this.path = path.replaceFirst("/+$", "");
+		this.handle = run.run.wd().path2(this.path);
+	}
+
+	public void delete() throws ClientException, ServerException {
+		checkError(handle.deleteAsXml(ClientResponse.class));
+	}
+
+	String path(ClientResponse response) throws ClientException, ServerException {
+		checkError(response);
+		String[] bits = response.getLocation().getPath().split("/");
+		return concat(bits[bits.length - 1]);
+	}
+
+	String localName() {
+		String[] bits = path.split("/");
+		return bits[bits.length - 1];
+	}
+
+	String concat(String name) {
+		return path + "/" + name.split("/", 2)[0];
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/a1c27cd9/server-client/src/main/java/uk/org/taverna/server/client/Directory.java
----------------------------------------------------------------------
diff --git a/server-client/src/main/java/uk/org/taverna/server/client/Directory.java b/server-client/src/main/java/uk/org/taverna/server/client/Directory.java
new file mode 100644
index 0000000..38dc394
--- /dev/null
+++ b/server-client/src/main/java/uk/org/taverna/server/client/Directory.java
@@ -0,0 +1,94 @@
+package uk.org.taverna.server.client;
+
+import static java.io.File.createTempFile;
+import static javax.ws.rs.client.Entity.entity;
+import static javax.ws.rs.core.MediaType.APPLICATION_OCTET_STREAM_TYPE;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.zip.ZipFile;
+
+import org.taverna.server.client.wadl.TavernaServer.Root.RunsRunName.Wd;
+
+import uk.org.taverna.server.client.TavernaServer.ClientException;
+import uk.org.taverna.server.client.TavernaServer.ServerException;
+import uk.org.taverna.server.client.generic.DirectoryEntry;
+import uk.org.taverna.server.client.generic.DirectoryReference;
+import uk.org.taverna.server.client.generic.FileReference;
+import uk.org.taverna.server.client.rest.DirectoryContents;
+import uk.org.taverna.server.client.rest.MakeDirectory;
+import uk.org.taverna.server.client.rest.UploadFile;
+
+import com.sun.jersey.api.client.ClientResponse;
+
+public class Directory extends DirEntry {
+	private final Wd wd;
+
+	Directory(Run run) {
+		super(run, "");
+		this.wd = run.run.wd();
+	}
+
+	Directory(Run run, String path) {
+		super(run, path);
+		this.wd = run.run.wd();
+	}
+
+	public List<DirEntry> list() {
+		List<DirEntry> result = new ArrayList<>();
+		for (DirectoryEntry de : wd.path3(path)
+				.getAsXml(DirectoryContents.class).getDirOrFile())
+			if (de instanceof DirectoryReference)
+				result.add(new Directory(run, de.getValue()));
+			else if (de instanceof FileReference)
+				result.add(new File(run, de.getValue()));
+		return result;
+	}
+
+	public File createFile(String name, byte[] content) throws ClientException,
+			ServerException {
+		UploadFile uf = new UploadFile();
+		uf.setName(name);
+		uf.setValue(content);
+		return new File(run, path(wd.path(path).putAsXml(uf,
+				ClientResponse.class)));
+	}
+
+	public File createFile(String name, java.io.File content)
+			throws ClientException, ServerException {
+		return new File(run, path(wd.path(concat(name)).putOctetStreamAsXml(
+				entity(content, APPLICATION_OCTET_STREAM_TYPE),
+				ClientResponse.class)));
+	}
+
+	public File createFile(String name, URI source) throws ClientException,
+			ServerException {
+		return new File(run, path(wd.path(concat(name)).postTextUriListAsXml(
+				source.toString(), ClientResponse.class)));
+	}
+
+	public Directory createDirectory(String name) throws ClientException,
+			ServerException {
+		MakeDirectory mkdir = new MakeDirectory();
+		mkdir.setName(name);
+		return new Directory(run, path(wd.path(path).putAsXml(mkdir,
+				ClientResponse.class)));
+	}
+
+	public byte[] getZippedContents() {
+		return wd.path3(path).getAsZip(byte[].class);
+	}
+
+	public ZipFile getZip() throws IOException {
+		byte[] contents = getZippedContents();
+		java.io.File tmp = createTempFile(localName(), ".zip");
+		try (OutputStream os = new FileOutputStream(tmp)) {
+			os.write(contents);
+		}
+		return new ZipFile(tmp);
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/a1c27cd9/server-client/src/main/java/uk/org/taverna/server/client/File.java
----------------------------------------------------------------------
diff --git a/server-client/src/main/java/uk/org/taverna/server/client/File.java b/server-client/src/main/java/uk/org/taverna/server/client/File.java
new file mode 100644
index 0000000..0287afb
--- /dev/null
+++ b/server-client/src/main/java/uk/org/taverna/server/client/File.java
@@ -0,0 +1,95 @@
+package uk.org.taverna.server.client;
+
+import static java.io.File.createTempFile;
+import static javax.ws.rs.client.Entity.entity;
+import static javax.ws.rs.core.MediaType.APPLICATION_OCTET_STREAM_TYPE;
+import static org.apache.commons.io.IOUtils.copy;
+import static org.apache.tika.mime.MimeTypes.getDefaultMimeTypes;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.nio.charset.Charset;
+
+import org.apache.tika.mime.MimeTypeException;
+import org.taverna.server.client.wadl.TavernaServer.Root.RunsRunName.Wd;
+
+import uk.org.taverna.server.client.TavernaServer.ClientException;
+import uk.org.taverna.server.client.TavernaServer.ServerException;
+
+import com.sun.jersey.api.client.ClientHandlerException;
+import com.sun.jersey.api.client.ClientResponse;
+import com.sun.jersey.api.client.UniformInterfaceException;
+
+public class File extends DirEntry {
+	private final Wd wd;
+
+	File(Run run, String path) {
+		super(run, path);
+		wd = run.run.wd();
+	}
+
+	public InputStream getAsStream() {
+		return wd.path3(path).getAsOctetStream(InputStream.class);
+	}
+
+	public byte[] get() {
+		return wd.path3(path).getAsOctetStream(byte[].class);
+	}
+
+	public String get(Charset encoding) {
+		return new String(wd.path3(path).getAsOctetStream(byte[].class),
+				encoding);
+	}
+
+	public java.io.File getAsFile() throws ClientHandlerException,
+			UniformInterfaceException, IOException, MimeTypeException,
+			ClientException, ServerException {
+		ClientResponse cr = wd.path3(path).getAsOctetStream(
+				ClientResponse.class);
+		checkError(cr);
+		String[] bits = localName().split("[.]");
+		String ext = getDefaultMimeTypes().forName(
+				cr.getHeaders().getFirst("Content-Type")).getExtension();
+		if (ext == null)
+			ext = bits[bits.length - 1];
+		java.io.File tmp = createTempFile(bits[0], ext);
+		try (OutputStream os = new FileOutputStream(tmp);
+				InputStream is = cr.getEntity(InputStream.class)) {
+			copy(is, os);
+		}
+		return tmp;
+	}
+
+	public void setContents(byte[] newContents) throws ClientException,
+			ServerException {
+		checkError(wd.path(path).putOctetStreamAsXml(newContents,
+				ClientResponse.class));
+	}
+
+	public void setContents(String newContents) throws ClientException,
+			ServerException {
+		checkError(wd.path(path).putOctetStreamAsXml(newContents,
+				ClientResponse.class));
+	}
+
+	public void setContents(String newContents, Charset encoding)
+			throws ClientException, ServerException {
+		checkError(wd.path(path).putOctetStreamAsXml(
+				newContents.getBytes(encoding), ClientResponse.class));
+	}
+
+	public void setContents(InputStream newContents) throws ClientException,
+			ServerException {
+		checkError(wd.path(path).putOctetStreamAsXml(newContents,
+				ClientResponse.class));
+	}
+
+	public void setContents(java.io.File newContents) throws IOException,
+			ClientException, ServerException {
+		checkError(wd.path(path).putOctetStreamAsXml(
+				entity(newContents, APPLICATION_OCTET_STREAM_TYPE),
+				ClientResponse.class));
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/a1c27cd9/server-client/src/main/java/uk/org/taverna/server/client/Property.java
----------------------------------------------------------------------
diff --git a/server-client/src/main/java/uk/org/taverna/server/client/Property.java b/server-client/src/main/java/uk/org/taverna/server/client/Property.java
new file mode 100644
index 0000000..0e6542f
--- /dev/null
+++ b/server-client/src/main/java/uk/org/taverna/server/client/Property.java
@@ -0,0 +1,18 @@
+package uk.org.taverna.server.client;
+
+public enum Property {
+	STDOUT("stdout"), STDERR("stderr"), EXIT_CODE("exitcode"), READY_TO_NOTIFY(
+			"readyToNotify"), EMAIL("notificationAddress"), USAGE(
+			"usageRecord");
+
+	private String s;
+
+	private Property(String s) {
+		this.s = s;
+	}
+
+	@Override
+	public String toString() {
+		return s;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/a1c27cd9/server-client/src/main/java/uk/org/taverna/server/client/Run.java
----------------------------------------------------------------------
diff --git a/server-client/src/main/java/uk/org/taverna/server/client/Run.java b/server-client/src/main/java/uk/org/taverna/server/client/Run.java
new file mode 100644
index 0000000..5c6875e
--- /dev/null
+++ b/server-client/src/main/java/uk/org/taverna/server/client/Run.java
@@ -0,0 +1,215 @@
+package uk.org.taverna.server.client;
+
+import static org.joda.time.format.ISODateTimeFormat.dateTime;
+import static org.joda.time.format.ISODateTimeFormat.dateTimeParser;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.util.Date;
+import java.util.List;
+
+import javax.xml.bind.JAXBException;
+
+import org.apache.commons.io.IOUtils;
+import org.joda.time.DateTime;
+import org.ogf.usage.JobUsageRecord;
+import org.taverna.server.client.wadl.TavernaServer.Root.RunsRunName;
+import org.w3c.dom.Element;
+
+import uk.org.taverna.server.client.TavernaServer.ClientException;
+import uk.org.taverna.server.client.TavernaServer.ServerException;
+import uk.org.taverna.server.client.generic.KeyPairCredential;
+import uk.org.taverna.server.client.generic.PasswordCredential;
+import uk.org.taverna.server.client.generic.port.InputPort;
+import uk.org.taverna.server.client.generic.port.OutputPort;
+import uk.org.taverna.server.client.rest.InputDescription;
+import uk.org.taverna.server.client.rest.InputDescription.Value;
+
+import com.sun.jersey.api.client.ClientResponse;
+
+public class Run extends Connected {
+	RunsRunName run;
+
+	Run(TavernaServer server, String value) {
+		run = server.root.runsRunName(value);
+	}
+
+	public String getName() {
+		return run.name().getAsTextPlain(ClientResponse.class)
+				.getEntity(String.class);
+	}
+
+	public void setName(String name) {
+		run.name().putTextPlain(name, String.class);
+	}
+
+	public Date getExpiry() {
+		return dateTimeParser().parseDateTime(
+				run.expiry().getAsTextPlain(String.class)).toDate();
+	}
+
+	public void setExpiry(Date expiryTimestamp) {
+		run.expiry().putTextPlain(
+				dateTime().print(new DateTime(expiryTimestamp)), String.class);
+	}
+
+	public Date getCreate() {
+		String timestamp = run.createTime().getAsTextPlain(String.class);
+		if (timestamp == null || timestamp.trim().isEmpty())
+			return null;
+		return dateTimeParser().parseDateTime(timestamp).toDate();
+	}
+
+	public Date getStart() {
+		String timestamp = run.startTime().getAsTextPlain(String.class);
+		if (timestamp == null || timestamp.trim().isEmpty())
+			return null;
+		return dateTimeParser().parseDateTime(timestamp).toDate();
+	}
+
+	public Date getFinish() {
+		String timestamp = run.finishTime().getAsTextPlain(String.class);
+		if (timestamp == null || timestamp.trim().isEmpty())
+			return null;
+		return dateTimeParser().parseDateTime(timestamp).toDate();
+	}
+
+	public Status getStatus() {
+		return Status.valueOf(run.status().getAsTextPlain(String.class));
+	}
+
+	public void setStatus(Status status) {
+		run.status().putTextPlain(status, String.class);
+	}
+
+	public void start() {
+		setStatus(Status.Operating);
+	}
+
+	public void kill() {
+		setStatus(Status.Finished);
+	}
+
+	public boolean isRunning() {
+		return getStatus() == Status.Operating;
+	}
+
+	public String getStandardOutput() {
+		return run.stdout().getAsTextPlain(String.class);
+	}
+
+	public String getStandardError() {
+		return run.stderr().getAsTextPlain(String.class);
+	}
+
+	public String getLog() {
+		return run.log().getAsTextPlain(String.class);
+	}
+
+	public Integer getExitCode() {
+		String code = run.listeners().name("io")
+				.propertiesPropertyName("exitCode")
+				.getAsTextPlain(String.class);
+		if (code == null || code.trim().isEmpty())
+			return null;
+		return Integer.parseInt(code);
+	}
+
+	public String getProperty(Property prop) {
+		return run.listeners().name("io")
+				.propertiesPropertyName(prop.toString())
+				.getAsTextPlain(String.class);
+	}
+
+	public void setGenerateRunBundle(boolean generateRunBundle) {
+		run.generateProvenance().putTextPlain(generateRunBundle, String.class);
+	}
+
+	public byte[] getRunBundle() {
+		return run.runBundle().getAsVndWf4everRobundleZip(byte[].class);
+	}
+
+	public List<InputPort> getInputs() {
+		return run.input().expected().getAsInputDescriptionXml().getInput();
+	}
+
+	public List<OutputPort> getOutputs() {
+		return run.output().getAsOutputDescriptionXml().getOutput();
+	}
+
+	public void setInput(String name, String value) {
+		Value v = new Value();
+		v.setValue(value);
+		InputDescription idesc = new InputDescription();
+		idesc.setValue(v);
+		run.input().inputName(name).putXmlAsInputDescription(idesc);
+	}
+
+	public void setInput(String name, String value, char listSeparator) {
+		Value v = new Value();
+		v.setValue(value);
+		InputDescription idesc = new InputDescription();
+		idesc.setValue(v);
+		idesc.setListDelimiter(new String(new char[] { listSeparator }));
+		run.input().inputName(name).putXmlAsInputDescription(idesc);
+	}
+
+	public byte[] getWorkflow() {
+		return run.workflow().getAsVndTavernaT2flowXml(byte[].class);
+	}
+
+	// TODO Consider better ways to do this
+	public Element getInteractionFeed() {
+		return run.interaction().getAsAtomXml(Element.class);
+	}
+
+	public Element getInteractionEntry(String id) {
+		return run.interaction().id(id).getAsAtomXml(Element.class);
+	}
+
+	public JobUsageRecord getUsageRecord() throws JAXBException {
+		return JobUsageRecord.unmarshal(run.usage().getAsXml(Element.class));
+	}
+
+	public Directory getWorkingDirectory() {
+		return new Directory(this);
+	}
+
+	public String getOwner() {
+		return run.security().owner().getAsTextPlain(String.class);
+	}
+
+	// TODO permissions
+
+	public void grantPasswordCredential(URI contextService, String username,
+			String password) throws ClientException, ServerException {
+		PasswordCredential pc = new PasswordCredential();
+		pc.setServiceURI(contextService.toString());
+		pc.setUsername(username);
+		pc.setPassword(password);
+		checkError(run.security().credentials()
+				.postXmlAsOctetStream(pc, ClientResponse.class));
+	}
+
+	public void grantKeyCredential(URI contextService, java.io.File source,
+			String unlockPassword, String aliasEntry) throws IOException,
+			ClientException, ServerException {
+		KeyPairCredential kpc = new KeyPairCredential();
+		kpc.setServiceURI(contextService.toString());
+		try (InputStream in = new FileInputStream(source)) {
+			byte[] buffer = new byte[(int) source.length()];
+			IOUtils.read(in, buffer);
+			kpc.setCredentialBytes(buffer);
+		}
+		if (source.getName().endsWith(".p12"))
+			kpc.setFileType("PKCS12");
+		else
+			kpc.setFileType("JKS");
+		kpc.setCredentialName(aliasEntry);
+		kpc.setUnlockPassword(unlockPassword);
+		checkError(run.security().credentials()
+				.postXmlAsOctetStream(kpc, ClientResponse.class));
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/a1c27cd9/server-client/src/main/java/uk/org/taverna/server/client/Status.java
----------------------------------------------------------------------
diff --git a/server-client/src/main/java/uk/org/taverna/server/client/Status.java b/server-client/src/main/java/uk/org/taverna/server/client/Status.java
new file mode 100644
index 0000000..9c375ad
--- /dev/null
+++ b/server-client/src/main/java/uk/org/taverna/server/client/Status.java
@@ -0,0 +1,36 @@
+package uk.org.taverna.server.client;
+
+/**
+ * States of a workflow run. They are {@link #Initialized Initialized},
+ * {@link #Operating Operating}, {@link #Stopped Stopped}, and
+ * {@link #Finished Finished}. Conceptually, there is also a
+ * <tt>Destroyed</tt> state, but the workflow run does not exist (and hence
+ * can't have its state queried or set) in that case.
+ * 
+ * @author Donal Fellows
+ */
+public enum Status {
+	/**
+	 * The workflow run has been created, but is not yet running. The run
+	 * will need to be manually moved to {@link #Operating Operating} when
+	 * ready.
+	 */
+	Initialized,
+	/**
+	 * The workflow run is going, reading input, generating output, etc.
+	 * Will eventually either move automatically to {@link #Finished
+	 * Finished} or can be moved manually to {@link #Stopped Stopped} (where
+	 * supported).
+	 */
+	Operating,
+	/**
+	 * The workflow run is paused, and will need to be moved back to
+	 * {@link #Operating Operating} manually.
+	 */
+	Stopped,
+	/**
+	 * The workflow run has ceased; data files will continue to exist until
+	 * the run is destroyed (which may be manual or automatic).
+	 */
+	Finished
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/a1c27cd9/server-client/src/main/java/uk/org/taverna/server/client/TavernaServer.java
----------------------------------------------------------------------
diff --git a/server-client/src/main/java/uk/org/taverna/server/client/TavernaServer.java b/server-client/src/main/java/uk/org/taverna/server/client/TavernaServer.java
index 3ceb208..7c0dcdd 100644
--- a/server-client/src/main/java/uk/org/taverna/server/client/TavernaServer.java
+++ b/server-client/src/main/java/uk/org/taverna/server/client/TavernaServer.java
@@ -1,467 +1,54 @@
 package uk.org.taverna.server.client;
 
-import static java.io.File.createTempFile;
 import static java.nio.file.Files.readAllBytes;
-import static javax.ws.rs.client.Entity.entity;
-import static javax.ws.rs.core.MediaType.APPLICATION_OCTET_STREAM_TYPE;
-import static org.apache.commons.io.IOUtils.copy;
-import static org.apache.tika.mime.MimeTypes.getDefaultMimeTypes;
-import static org.joda.time.format.ISODateTimeFormat.dateTime;
-import static org.joda.time.format.ISODateTimeFormat.dateTimeParser;
 import static org.taverna.server.client.wadl.TavernaServer.createClient;
 import static org.taverna.server.client.wadl.TavernaServer.root;
 
 import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
 import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
 import java.net.URI;
-import java.nio.charset.Charset;
 import java.util.ArrayList;
-import java.util.Date;
 import java.util.List;
-import java.util.zip.ZipFile;
 
-import org.apache.commons.io.IOUtils;
-import org.apache.tika.mime.MimeTypeException;
-import org.joda.time.DateTime;
 import org.taverna.server.client.wadl.TavernaServer.Root;
-import org.taverna.server.client.wadl.TavernaServer.Root.RunsRunName;
-import org.w3c.dom.Element;
 
-import uk.org.taverna.server.client.generic.port.InputPort;
-import uk.org.taverna.server.client.generic.port.OutputPort;
 import uk.org.taverna.server.client.generic.Capability;
-import uk.org.taverna.server.client.generic.DirectoryEntry;
-import uk.org.taverna.server.client.generic.DirectoryReference;
-import uk.org.taverna.server.client.generic.FileReference;
-import uk.org.taverna.server.client.generic.KeyPairCredential;
-import uk.org.taverna.server.client.generic.PasswordCredential;
 import uk.org.taverna.server.client.generic.TavernaRun;
 import uk.org.taverna.server.client.generic.VersionedElement;
-import uk.org.taverna.server.client.rest.DirectoryContents;
-import uk.org.taverna.server.client.rest.InputDescription;
-import uk.org.taverna.server.client.rest.InputDescription.Value;
-import uk.org.taverna.server.client.rest.MakeDirectory;
-import uk.org.taverna.server.client.rest.UploadFile;
 
 import com.sun.jersey.api.client.Client;
-import com.sun.jersey.api.client.ClientHandlerException;
 import com.sun.jersey.api.client.ClientResponse;
-import com.sun.jersey.api.client.UniformInterfaceException;
 import com.sun.jersey.api.client.filter.HTTPBasicAuthFilter;
 
-public class TavernaServer {
-	private Root root;
+public class TavernaServer extends Connected {
+	final Root root;
+	private final URI location;
+	private final boolean authenticated;
 
-	/**
-	 * States of a workflow run. They are {@link #Initialized Initialized},
-	 * {@link #Operating Operating}, {@link #Stopped Stopped}, and
-	 * {@link #Finished Finished}. Conceptually, there is also a
-	 * <tt>Destroyed</tt> state, but the workflow run does not exist (and hence
-	 * can't have its state queried or set) in that case.
-	 * 
-	 * @author Donal Fellows
-	 */
-	public static enum Status {
-		/**
-		 * The workflow run has been created, but is not yet running. The run
-		 * will need to be manually moved to {@link #Operating Operating} when
-		 * ready.
-		 */
-		Initialized,
-		/**
-		 * The workflow run is going, reading input, generating output, etc.
-		 * Will eventually either move automatically to {@link #Finished
-		 * Finished} or can be moved manually to {@link #Stopped Stopped} (where
-		 * supported).
-		 */
-		Operating,
-		/**
-		 * The workflow run is paused, and will need to be moved back to
-		 * {@link #Operating Operating} manually.
-		 */
-		Stopped,
-		/**
-		 * The workflow run has ceased; data files will continue to exist until
-		 * the run is destroyed (which may be manual or automatic).
-		 */
-		Finished
+	TavernaServer(URI serviceRoot) {
+		root = root(createClient(), location = serviceRoot);
+		authenticated = false;
 	}
 
-	public static enum Property {
-		STDOUT("stdout"), STDERR("stderr"), EXIT_CODE("exitcode"), READY_TO_NOTIFY(
-				"readyToNotify"), EMAIL("notificationAddress"), USAGE(
-				"usageRecord");
-
-		private String s;
-
-		private Property(String s) {
-			this.s = s;
-		}
-
-		@Override
-		public String toString() {
-			return s;
-		}
-	}
-
-	public class Run {
-		private RunsRunName run;
-
-		Run(String value) {
-			run = root.runsRunName(value);
-		}
-
-		public String getName() {
-			return run.name().getAsTextPlain(String.class);
-		}
-
-		public void setName(String name) {
-			run.name().putTextPlain(name, String.class);
-		}
-
-		public Date getExpiry() {
-			return dateTimeParser().parseDateTime(
-					run.expiry().getAsTextPlain(String.class)).toDate();
-		}
-
-		public void setExpiry(Date expiryTimestamp) {
-			run.expiry().putTextPlain(
-					dateTime().print(new DateTime(expiryTimestamp)),
-					String.class);
-		}
-
-		public Date getCreate() {
-			String timestamp = run.createTime().getAsTextPlain(String.class);
-			if (timestamp == null || timestamp.trim().isEmpty())
-				return null;
-			return dateTimeParser().parseDateTime(timestamp).toDate();
-		}
-
-		public Date getStart() {
-			String timestamp = run.startTime().getAsTextPlain(String.class);
-			if (timestamp == null || timestamp.trim().isEmpty())
-				return null;
-			return dateTimeParser().parseDateTime(timestamp).toDate();
-		}
-
-		public Date getFinish() {
-			String timestamp = run.finishTime().getAsTextPlain(String.class);
-			if (timestamp == null || timestamp.trim().isEmpty())
-				return null;
-			return dateTimeParser().parseDateTime(timestamp).toDate();
-		}
-
-		public Status getStatus() {
-			return Status.valueOf(run.status().getAsTextPlain(String.class));
-		}
-
-		public void setStatus(Status status) {
-			run.status().putTextPlain(status, String.class);
-		}
-
-		public void start() {
-			setStatus(Status.Operating);
-		}
-
-		public void kill() {
-			setStatus(Status.Finished);
-		}
-
-		public boolean isRunning() {
-			return getStatus() == Status.Operating;
-		}
-
-		public String getStandardOutput() {
-			return run.stdout().getAsTextPlain(String.class);
-		}
-
-		public String getStandardError() {
-			return run.stderr().getAsTextPlain(String.class);
-		}
-
-		public String getLog() {
-			return run.log().getAsTextPlain(String.class);
-		}
-
-		public Integer getExitCode() {
-			String code = run.listeners().name("io")
-					.propertiesPropertyName("exitCode")
-					.getAsTextPlain(String.class);
-			if (code == null || code.trim().isEmpty())
-				return null;
-			return Integer.parseInt(code);
-		}
-
-		public String getProperty(Property prop) {
-			return run.listeners().name("io")
-					.propertiesPropertyName(prop.toString())
-					.getAsTextPlain(String.class);
-		}
-
-		public void setGenerateRunBundle(boolean generateRunBundle) {
-			run.generateProvenance().putTextPlain(generateRunBundle,
-					String.class);
-		}
-
-		public byte[] getRunBundle() {
-			return run.runBundle().getAsVndWf4everRobundleZip(byte[].class);
-		}
-
-		public List<InputPort> getInputs() {
-			return run.input().expected().getAsInputDescriptionXml().getInput();
-		}
-
-		public List<OutputPort> getOutputs() {
-			return run.output().getAsOutputDescriptionXml().getOutput();
-		}
-
-		public void setInput(String name, String value) {
-			Value v = new Value();
-			v.setValue(value);
-			InputDescription idesc = new InputDescription();
-			idesc.setValue(v);
-			run.input().inputName(name).putXmlAsInputDescription(idesc);
-		}
-
-		public void setInput(String name, String value, char listSeparator) {
-			Value v = new Value();
-			v.setValue(value);
-			InputDescription idesc = new InputDescription();
-			idesc.setValue(v);
-			idesc.setListDelimiter(new String(new char[] { listSeparator }));
-			run.input().inputName(name).putXmlAsInputDescription(idesc);
-		}
-
-		public byte[] getWorkflow() {
-			return run.workflow().getAsVndTavernaT2flowXml(byte[].class);
-		}
-
-		// TODO Consider better ways to do this
-		public Element getInteractionFeed() {
-			return run.interaction().getAsAtomXml(Element.class);
-		}
-
-		public Element getInteractionEntry(String id) {
-			return run.interaction().id(id).getAsAtomXml(Element.class);
-		}
-
-		public Element getUsageRecord() {
-			return run.usage().getAsXml(Element.class);
-		}
-
-		public Directory getWorkingDirectory() {
-			return new Directory();
-		}
-
-		public abstract class DirEntry {
-			final String path;
-
-			protected DirEntry(String path) {
-				this.path = path.replaceFirst("/+$", "");
-			}
-
-			public void delete() {
-				run.wd().path2(path).deleteAsXml(ClientResponse.class);
-			}
-
-			String path(ClientResponse response) {
-				String[] bits = response.getLocation().getPath().split("/");
-				return concat(bits[bits.length - 1]);
-			}
-
-			String localName() {
-				String[] bits = path.split("/");
-				return bits[bits.length - 1];
-			}
-
-			String concat(String name) {
-				return path + "/" + name.split("/", 2)[0];
-			}
-		}
-
-		public class Directory extends DirEntry {
-			Directory() {
-				super("");
-			}
-
-			Directory(String path) {
-				super(path);
-			}
-
-			public List<DirEntry> list() {
-				List<DirEntry> result = new ArrayList<>();
-				for (DirectoryEntry de : run.wd().path3(path)
-						.getAsXml(DirectoryContents.class).getDirOrFile())
-					if (de instanceof DirectoryReference)
-						result.add(new Directory(de.getValue()));
-					else if (de instanceof FileReference)
-						result.add(new File(de.getValue()));
-				return result;
-			}
-
-			public File createFile(String name, byte[] content) {
-				UploadFile uf = new UploadFile();
-				uf.setName(name);
-				uf.setValue(content);
-				return new File(path(run.wd().path(path)
-						.putAsXml(uf, ClientResponse.class)));
-			}
-
-			public File createFile(String name, java.io.File content) {
-				return new File(path(run
-						.wd()
-						.path(concat(name))
-						.putOctetStreamAsXml(
-								entity(content, APPLICATION_OCTET_STREAM_TYPE),
-								ClientResponse.class)));
-			}
-
-			public File createFile(String name, URI source) {
-				return new File(path(run
-						.wd()
-						.path(concat(name))
-						.postTextUriListAsXml(source.toString(),
-								ClientResponse.class)));
-			}
-
-			public Directory createDirectory(String name) {
-				MakeDirectory mkdir = new MakeDirectory();
-				mkdir.setName(name);
-				return new Directory(path(run.wd().path(path)
-						.putAsXml(mkdir, ClientResponse.class)));
-			}
-
-			public byte[] getZippedContents() {
-				return run.wd().path3(path).getAsZip(byte[].class);
-			}
-
-			public ZipFile getZip() throws IOException {
-				byte[] contents = getZippedContents();
-				java.io.File tmp = createTempFile(localName(), ".zip");
-				try (OutputStream os = new FileOutputStream(tmp)) {
-					os.write(contents);
-				}
-				return new ZipFile(tmp);
-			}
-		}
-
-		public class File extends DirEntry {
-			File(String path) {
-				super(path);
-			}
-
-			public InputStream getAsStream() {
-				return run.wd().path3(path).getAsOctetStream(InputStream.class);
-			}
-
-			public byte[] get() {
-				return run.wd().path3(path).getAsOctetStream(byte[].class);
-			}
-
-			public String get(Charset encoding) {
-				return new String(run.wd().path3(path)
-						.getAsOctetStream(byte[].class), encoding);
-			}
-
-			public java.io.File getAsFile() throws ClientHandlerException,
-					UniformInterfaceException, IOException, MimeTypeException {
-				ClientResponse cr = run.wd().path3(path)
-						.getAsOctetStream(ClientResponse.class);
-				String[] bits = localName().split("[.]");
-				String ext = getDefaultMimeTypes().forName(
-						cr.getHeaders().getFirst("Content-Type"))
-						.getExtension();
-				if (ext == null)
-					ext = bits[bits.length-1];
-				java.io.File tmp = createTempFile(bits[0], ext);
-				try (OutputStream os = new FileOutputStream(tmp);
-						InputStream is = cr.getEntity(InputStream.class)) {
-					copy(is, os);
-				}
-				return tmp;
-			}
-
-			public void setContents(byte[] newContents) {
-				run.wd().path(path)
-						.putOctetStreamAsXml(newContents, ClientResponse.class);
-			}
-
-			public void setContents(String newContents) {
-				run.wd().path(path)
-						.putOctetStreamAsXml(newContents, ClientResponse.class);
-			}
-
-			public void setContents(String newContents, Charset encoding) {
-				run.wd()
-						.path(path)
-						.putOctetStreamAsXml(newContents.getBytes(encoding),
-								ClientResponse.class);
-			}
-
-			public void setContents(InputStream newContents) {
-				run.wd().path(path)
-						.putOctetStreamAsXml(newContents, ClientResponse.class);
-			}
-
-			public void setContents(java.io.File newContents)
-					throws IOException {
-				run.wd()
-						.path(path)
-						.putOctetStreamAsXml(
-								entity(newContents,
-										APPLICATION_OCTET_STREAM_TYPE),
-								ClientResponse.class);
-			}
-		}
-
-		public String getOwner() {
-			return run.security().owner().getAsTextPlain(String.class);
-		}
-
-		// TODO permissions
-
-		public void grantPasswordCredential(URI contextService,
-				String username, String password) {
-			PasswordCredential pc = new PasswordCredential();
-			pc.setServiceURI(contextService.toString());
-			pc.setUsername(username);
-			pc.setPassword(password);
-			run.security().credentials()
-					.postXmlAsOctetStream(pc, ClientResponse.class);
-		}
-
-		public void grantKeyCredential(URI contextService, java.io.File source,
-				String unlockPassword, String aliasEntry) throws IOException {
-			KeyPairCredential kpc = new KeyPairCredential();
-			kpc.setServiceURI(contextService.toString());
-			try (InputStream in = new FileInputStream(source)) {
-				byte[] buffer = new byte[(int) source.length()];
-				IOUtils.read(in, buffer);
-				kpc.setCredentialBytes(buffer);
-			}
-			if (source.getName().endsWith(".p12"))
-				kpc.setFileType("PKCS12");
-			else
-				kpc.setFileType("JKS");
-			kpc.setCredentialName(aliasEntry);
-			kpc.setUnlockPassword(unlockPassword);
-			run.security().credentials()
-					.postXmlAsOctetStream(kpc, ClientResponse.class);
-		}
-	}
-
-	public TavernaServer(URI serviceRoot) {
-		root = root(createClient(), serviceRoot);
+	TavernaServer(URI serviceRoot, String username, String password) {
+		Client client = createClient();
+		client.addFilter(new HTTPBasicAuthFilter(username, password));
+		authenticated = true;
+		root = root(client, location = serviceRoot);
 	}
 
-	public TavernaServer(URI serviceRoot, String username, String password) {
+	TavernaServer(TavernaServer service, String username, String password) {
 		Client client = createClient();
 		client.addFilter(new HTTPBasicAuthFilter(username, password));
-		root = root(client, serviceRoot);
+		authenticated = true;
+		root = root(client, location = service.location);
+		getServerVersionInfo();
+	}
+
+	public TavernaServer upgradeToAuth(String username, String password) {
+		if (authenticated)
+			throw new IllegalStateException("may only upgrade an unauthenticated connection");
+		return new TavernaServer(this, username, password);
 	}
 
 	public List<Capability> getCapabilities() {
@@ -485,7 +72,7 @@ public class TavernaServer {
 	public List<Run> getExistingRuns() {
 		List<Run> runs = new ArrayList<>();
 		for (TavernaRun run : root.runs().getAsRunListXml().getRun())
-			runs.add(new Run(run.getValue()));
+			runs.add(new Run(this, run.getValue()));
 		return runs;
 	}
 
@@ -493,25 +80,49 @@ public class TavernaServer {
 		return root.getAsServerDescriptionXml();
 	}
 
-	private Run response2run(ClientResponse response) {
+	private Run response2run(ClientResponse response) throws ClientException, ServerException {
+		checkError(response);
 		if (response.getClientResponseStatus().getStatusCode() == 201) {
 			String[] path = response.getLocation().getPath().split("/");
-			return new Run(path[path.length - 1]);
+			return new Run(this, path[path.length - 1]);
 		}
 		return null;
 	}
 
-	public Run createWorkflowRun(byte[] t2flowBytes) {
+	public Run createWorkflowRun(byte[] t2flowBytes) throws ClientException, ServerException {
 		return response2run(root.runs().postVndTavernaT2flowXmlAsOctetStream(
 				t2flowBytes, ClientResponse.class));
 	}
 
-	public Run createWorkflowRun(File t2flowFile) throws IOException {
+	public Run createWorkflowRun(File t2flowFile) throws IOException, ClientException, ServerException {
 		return createWorkflowRun(readAllBytes(t2flowFile.toPath()));
 	}
 
-	public Run createWorkflowRun(URI t2flowUri) {
+	public Run createWorkflowRun(URI t2flowUri) throws ClientException, ServerException {
 		return response2run(root.runs().postTextUriListAsOctetStream(
 				t2flowUri.toString(), ClientResponse.class));
 	}
+
+
+	public static class ClientException extends Exception {
+		private static final long serialVersionUID = 1L;
+
+		ClientException(String msg, Throwable cause) {
+			super(msg, cause);
+		}
+	}
+	public static class AuthorizationException extends ClientException {
+		private static final long serialVersionUID = 1L;
+
+		AuthorizationException(String msg, Throwable cause) {
+			super(msg, cause);
+		}
+	}
+	static class ServerException extends Exception {
+		private static final long serialVersionUID = 1L;
+
+		ServerException(String msg, Throwable cause) {
+			super(msg, cause);
+		}
+	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/a1c27cd9/server-client/src/main/java/uk/org/taverna/server/client/TavernaServerConnectionFactory.java
----------------------------------------------------------------------
diff --git a/server-client/src/main/java/uk/org/taverna/server/client/TavernaServerConnectionFactory.java b/server-client/src/main/java/uk/org/taverna/server/client/TavernaServerConnectionFactory.java
new file mode 100644
index 0000000..b00b075
--- /dev/null
+++ b/server-client/src/main/java/uk/org/taverna/server/client/TavernaServerConnectionFactory.java
@@ -0,0 +1,23 @@
+package uk.org.taverna.server.client;
+
+import java.net.URI;
+import java.util.HashMap;
+import java.util.Map;
+
+public class TavernaServerConnectionFactory {
+	private Map<URI, TavernaServer> cache = new HashMap<>();
+
+	public synchronized TavernaServer connectNoAuth(URI uri) {
+		TavernaServer conn = cache.get(uri);
+		if (conn == null)
+			cache.put(uri, conn = new TavernaServer(uri));
+		return conn;
+	}
+
+	public TavernaServer connectAuth(URI uri, String username, String password) {
+		TavernaServer conn = new TavernaServer(uri, username, password);
+		// Force a check of the credentials by getting the server version
+		conn.getServerVersionInfo();
+		return conn;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/a1c27cd9/server-usagerecord/src/main/java/org/ogf/usage/JobUsageRecord.java
----------------------------------------------------------------------
diff --git a/server-usagerecord/src/main/java/org/ogf/usage/JobUsageRecord.java b/server-usagerecord/src/main/java/org/ogf/usage/JobUsageRecord.java
index cf7799a..d12d3d8 100644
--- a/server-usagerecord/src/main/java/org/ogf/usage/JobUsageRecord.java
+++ b/server-usagerecord/src/main/java/org/ogf/usage/JobUsageRecord.java
@@ -19,6 +19,7 @@ import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.datatype.DatatypeConfigurationException;
 import javax.xml.datatype.DatatypeFactory;
+import javax.xml.transform.dom.DOMSource;
 
 import org.ogf.usage.v1_0.Charge;
 import org.ogf.usage.v1_0.ConsumableResourceType;
@@ -45,6 +46,7 @@ import org.ogf.usage.v1_0.TimeDuration;
 import org.ogf.usage.v1_0.TimeInstant;
 import org.ogf.usage.v1_0.UserIdentity;
 import org.ogf.usage.v1_0.WallDuration;
+import org.w3c.dom.Element;
 
 @XmlRootElement(name = "UsageRecord", namespace = "http://schema.ogf.org/urf/2003/09/urf")
 public class JobUsageRecord extends org.ogf.usage.v1_0.UsageRecordType {
@@ -277,10 +279,25 @@ public class JobUsageRecord extends org.ogf.usage.v1_0.UsageRecordType {
 		return writer.toString();
 	}
 
+	private static JAXBContext context;
+	static {
+		try {
+			context = JAXBContext.newInstance(JobUsageRecord.class);
+		} catch (JAXBException e) {
+			throw new RuntimeException("failed to handle JAXB annotated class",
+					e);
+		}
+	}
+
 	public static JobUsageRecord unmarshal(String s) throws JAXBException {
-		StringReader reader = new StringReader(s);
-		return (JobUsageRecord) JAXBContext.newInstance(JobUsageRecord.class)
-				.createUnmarshaller().unmarshal(reader);
+		return (JobUsageRecord) context.createUnmarshaller().unmarshal(
+				new StringReader(s));
+	}
+
+	public static JobUsageRecord unmarshal(Element elem) throws JAXBException {
+		return context.createUnmarshaller()
+				.unmarshal(new DOMSource(elem), JobUsageRecord.class)
+				.getValue();
 	}
 
 	// TODO: Add signing support


[18/50] [abbrv] incubator-taverna-server git commit: Documentation updates

Posted by st...@apache.org.
Documentation updates

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/937d6e74
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/937d6e74
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/937d6e74

Branch: refs/heads/master
Commit: 937d6e74e269583f222cd1c2fc2006d129ef3ed0
Parents: 9299a52
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Tue Apr 22 15:33:07 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Tue Apr 22 15:33:07 2014 +0100

----------------------------------------------------------------------
 install.docx | Bin 172786 -> 173172 bytes
 install.pdf  | Bin 8478216 -> 7797358 bytes
 usage.docx   | Bin 205427 -> 205350 bytes
 usage.pdf    | Bin 15913368 -> 14213122 bytes
 4 files changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/937d6e74/install.docx
----------------------------------------------------------------------
diff --git a/install.docx b/install.docx
index 15d3a08..cf9e0a4 100644
Binary files a/install.docx and b/install.docx differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/937d6e74/install.pdf
----------------------------------------------------------------------
diff --git a/install.pdf b/install.pdf
index b98800f..da38ee3 100644
Binary files a/install.pdf and b/install.pdf differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/937d6e74/usage.docx
----------------------------------------------------------------------
diff --git a/usage.docx b/usage.docx
index 6b2abef..065813b 100644
Binary files a/usage.docx and b/usage.docx differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/937d6e74/usage.pdf
----------------------------------------------------------------------
diff --git a/usage.pdf b/usage.pdf
index d650c18..4ad64de 100644
Binary files a/usage.pdf and b/usage.pdf differ


[02/50] [abbrv] incubator-taverna-server git commit: Expose delimiter control through the REST interface.

Posted by st...@apache.org.
Expose delimiter control through the REST interface.

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/ef9a2890
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/ef9a2890
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/ef9a2890

Branch: refs/heads/master
Commit: ef9a2890047643699cdb1301f67a1d91fcf7b2db
Parents: 974751b
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Wed Mar 26 15:28:02 2014 +0000
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Wed Mar 26 15:28:02 2014 +0000

----------------------------------------------------------------------
 .../org/taverna/server/master/InputREST.java    | 21 +++++++-----
 .../taverna/server/master/interfaces/Input.java | 27 +++++++++++++++
 .../master/rest/TavernaServerInputREST.java     | 35 +++++++++++++++-----
 .../server/master/worker/RemoteRunDelegate.java | 20 +++++++++++
 .../taverna/server/master/mocks/ExampleRun.java | 17 ++++++++++
 5 files changed, 102 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ef9a2890/server-webapp/src/main/java/org/taverna/server/master/InputREST.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/InputREST.java b/server-webapp/src/main/java/org/taverna/server/master/InputREST.java
index e6659ed..a1a7387 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/InputREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/InputREST.java
@@ -100,11 +100,11 @@ class InputREST implements TavernaServerInputREST, InputBean {
 	@Override
 	@CallCounted
 	@PerfLogged
-	public InDesc getInput(String name) throws BadInputPortNameException {
+	public InDesc getInput(String name, UriInfo ui) throws BadInputPortNameException {
 		Input i = support.getInput(run, name);
 		if (i == null)
 			throw new BadInputPortNameException("unknown input port name");
-		return new InDesc(i);
+		return new InDesc(i, ui);
 	}
 
 	@Override
@@ -121,17 +121,18 @@ class InputREST implements TavernaServerInputREST, InputBean {
 	@Override
 	@CallCounted
 	@PerfLogged
-	public InDesc setInput(String name, InDesc inputDescriptor)
+	public InDesc setInput(String name, InDesc inputDescriptor, UriInfo ui)
 			throws NoUpdateException, BadStateChangeException,
 			FilesystemAccessException, BadInputPortNameException,
 			BadPropertyValueException {
+		inputDescriptor.descriptorRef = null;
 		AbstractContents ac = inputDescriptor.assignment;
 		if (name == null || name.isEmpty())
 			throw new BadInputPortNameException("bad input name");
 		if (ac == null)
 			throw new BadPropertyValueException("no content!");
 		if (ac instanceof InDesc.Reference)
-			return setRemoteInput(name, (InDesc.Reference) ac);
+			return setRemoteInput(name, (InDesc.Reference) ac, inputDescriptor.delimiter, ui);
 		if (!(ac instanceof InDesc.File || ac instanceof InDesc.Value))
 			throw new BadPropertyValueException("unknown content type");
 		support.permitUpdate(run);
@@ -142,12 +143,13 @@ class InputREST implements TavernaServerInputREST, InputBean {
 			i.setFile(ac.contents);
 		else
 			i.setValue(ac.contents);
-		return new InDesc(i);
+		i.setDelimiter(inputDescriptor.delimiter);
+		return new InDesc(i, ui);
 	}
 
-	private InDesc setRemoteInput(String name, Reference ref)
-			throws BadStateChangeException, BadPropertyValueException,
-			FilesystemAccessException {
+	private InDesc setRemoteInput(String name, Reference ref, String delimiter,
+			UriInfo ui) throws BadStateChangeException,
+			BadPropertyValueException, FilesystemAccessException {
 		URITemplate tmpl = new URITemplate(ui.getBaseUri()
 				+ "/runs/{runName}/wd/{path:.+}");
 		MultivaluedMap<String, String> mvm = new MetadataMap<String, String>();
@@ -168,7 +170,8 @@ class InputREST implements TavernaServerInputREST, InputBean {
 			if (i == null)
 				i = run.makeInput(name);
 			i.setFile(to.getFullName());
-			return new InDesc(i);
+			i.setDelimiter(delimiter);
+			return new InDesc(i, ui);
 		} catch (UnknownRunException e) {
 			throw new BadStateChangeException("may not copy from that run", e);
 		} catch (NoDirectoryEntryException e) {

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ef9a2890/server-webapp/src/main/java/org/taverna/server/master/interfaces/Input.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/interfaces/Input.java b/server-webapp/src/main/java/org/taverna/server/master/interfaces/Input.java
index 71d9c8d..b6ce3e5 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/interfaces/Input.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/interfaces/Input.java
@@ -9,6 +9,9 @@ import org.taverna.server.master.common.Status;
 import org.taverna.server.master.exceptions.BadStateChangeException;
 import org.taverna.server.master.exceptions.FilesystemAccessException;
 
+import edu.umd.cs.findbugs.annotations.NonNull;
+import edu.umd.cs.findbugs.annotations.Nullable;
+
 /**
  * This represents the assignment of inputs to input ports of the workflow. Note
  * that the <tt>file</tt> and <tt>value</tt> properties are never set at the
@@ -21,20 +24,30 @@ public interface Input {
 	 * @return The file currently assigned to this input port, or <tt>null</tt>
 	 *         if no file is assigned.
 	 */
+	@Nullable
 	public String getFile();
 
 	/**
 	 * @return The name of this input port. This may not be changed.
 	 */
+	@NonNull
 	public String getName();
 
 	/**
 	 * @return The value currently assigned to this input port, or <tt>null</tt>
 	 *         if no value is assigned.
 	 */
+	@Nullable
 	public String getValue();
 
 	/**
+	 * @return The delimiter for the input port, or <tt>null</tt> if the value
+	 *         is not to be split.
+	 */
+	@Nullable
+	public String getDelimiter();
+
+	/**
 	 * Sets the file to use for this input. This overrides the use of the
 	 * previous file and any set value.
 	 * 
@@ -62,4 +75,18 @@ public interface Input {
 	 *             Initialized} state.
 	 */
 	public void setValue(String value) throws BadStateChangeException;
+
+	/**
+	 * Sets (or clears) the delimiter for the input port.
+	 * 
+	 * @param delimiter
+	 *            The delimiter character, or <tt>null</tt> if the value is not
+	 *            to be split.
+	 * @throws BadStateChangeException
+	 *             If the run isn't in the {@link Status#Initialized
+	 *             Initialized} state.
+	 */
+	@Nullable
+	public void setDelimiter(String delimiter) throws BadStateChangeException;
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ef9a2890/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerInputREST.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerInputREST.java b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerInputREST.java
index 0ac0f01..14aad3f 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerInputREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerInputREST.java
@@ -24,7 +24,10 @@ import javax.ws.rs.PUT;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.PathSegment;
 import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriBuilder;
 import javax.ws.rs.core.UriInfo;
 import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlElement;
@@ -34,7 +37,6 @@ import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlValue;
 
 import org.apache.cxf.jaxrs.model.wadl.Description;
-import org.taverna.server.port_description.InputDescription;
 import org.taverna.server.master.common.Uri;
 import org.taverna.server.master.common.VersionedElement;
 import org.taverna.server.master.exceptions.BadInputPortNameException;
@@ -44,6 +46,7 @@ import org.taverna.server.master.exceptions.FilesystemAccessException;
 import org.taverna.server.master.exceptions.NoUpdateException;
 import org.taverna.server.master.interfaces.Input;
 import org.taverna.server.master.interfaces.TavernaRun;
+import org.taverna.server.port_description.InputDescription;
 
 import edu.umd.cs.findbugs.annotations.NonNull;
 
@@ -137,6 +140,8 @@ public interface TavernaServerInputREST {
 	 * 
 	 * @param name
 	 *            The input to set.
+	 * @param uriInfo
+	 *            About the URI used to access this resource.
 	 * @return A description of the input.
 	 * @throws BadInputPortNameException
 	 *             If no input with that name exists.
@@ -147,8 +152,8 @@ public interface TavernaServerInputREST {
 	@Description("Gives a description of what is used to supply a particular "
 			+ "input.")
 	@NonNull
-	InDesc getInput(@NonNull @PathParam("name") String name)
-			throws BadInputPortNameException;
+	InDesc getInput(@NonNull @PathParam("name") String name,
+			@Context UriInfo uriInfo) throws BadInputPortNameException;
 
 	/**
 	 * Set what an input uses to provide data into the workflow run.
@@ -157,6 +162,8 @@ public interface TavernaServerInputREST {
 	 *            The name of the input.
 	 * @param inputDescriptor
 	 *            A description of the input
+	 * @param uriInfo
+	 *            About the URI used to access this resource.
 	 * @return A description of the input.
 	 * @throws NoUpdateException
 	 *             If the user can't update the run.
@@ -177,7 +184,7 @@ public interface TavernaServerInputREST {
 	@Description("Sets the source for a particular input port.")
 	@NonNull
 	InDesc setInput(@NonNull @PathParam("name") String name,
-			@NonNull InDesc inputDescriptor) throws NoUpdateException,
+			@NonNull InDesc inputDescriptor, @Context UriInfo uriInfo) throws NoUpdateException,
 			BadStateChangeException, FilesystemAccessException,
 			BadPropertyValueException, BadInputPortNameException;
 
@@ -258,7 +265,7 @@ public interface TavernaServerInputREST {
 		 * 
 		 * @param inputPort
 		 */
-		public InDesc(Input inputPort) {
+		public InDesc(Input inputPort, UriInfo ui) {
 			super(true);
 			name = inputPort.getName();
 			if (inputPort.getFile() != null) {
@@ -268,11 +275,25 @@ public interface TavernaServerInputREST {
 				assignment = new InDesc.Value();
 				assignment.contents = inputPort.getValue();
 			}
+			// .../runs/{id}/input/input/{name} ->
+			// .../runs/{id}/input/expected#{name}
+			UriBuilder ub = ui.getBaseUriBuilder();
+			List<PathSegment> segments = ui.getPathSegments();
+			for (PathSegment s : segments.subList(0, segments.size() - 2))
+				ub.segment(s.getPath());
+			ub.fragment(name);
+			descriptorRef = new Uri(ub);
 		}
 
 		/** The name of the port. */
 		@XmlAttribute(required = false)
 		public String name;
+		/** Where the port is described. Ignored in user input. */
+		@XmlAttribute(required = false)
+		public Uri descriptorRef;
+		/** The character to use to split the input into a list. */
+		@XmlAttribute(required = false)
+		public String delimiter;
 
 		/**
 		 * Either a filename or a literal string, used to provide input to a
@@ -282,10 +303,6 @@ public interface TavernaServerInputREST {
 		 */
 		@XmlType(name = "InputContents")
 		public static abstract class AbstractContents {
-			@XmlAttribute
-			public Uri descriptorRef;
-			@XmlAttribute
-			public String delimiter;
 			/**
 			 * The contents of the description of the input port. Meaning not
 			 * defined.

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ef9a2890/server-webapp/src/main/java/org/taverna/server/master/worker/RemoteRunDelegate.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/worker/RemoteRunDelegate.java b/server-webapp/src/main/java/org/taverna/server/master/worker/RemoteRunDelegate.java
index 0c4bffa..44a2b3a 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/worker/RemoteRunDelegate.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/worker/RemoteRunDelegate.java
@@ -945,6 +945,26 @@ class RunInput implements Input {
 			throw new BadStateChangeException(e);
 		}
 	}
+
+	@Override
+	public String getDelimiter() {
+		try {
+			return i.getDelimiter();
+		} catch (RemoteException e) {
+			return null;
+		}
+	}
+
+	@Override
+	public void setDelimiter(String delimiter) throws BadStateChangeException {
+		try {
+			if (delimiter != null)
+				delimiter = delimiter.substring(0, 1);
+			i.setDelimiter(delimiter);
+		} catch (RemoteException e) {
+			throw new BadStateChangeException(e);
+		}
+	}
 }
 
 @SuppressWarnings("serial")

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ef9a2890/server-webapp/src/test/java/org/taverna/server/master/mocks/ExampleRun.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/test/java/org/taverna/server/master/mocks/ExampleRun.java b/server-webapp/src/test/java/org/taverna/server/master/mocks/ExampleRun.java
index 9616c2e..2796c7b 100644
--- a/server-webapp/src/test/java/org/taverna/server/master/mocks/ExampleRun.java
+++ b/server-webapp/src/test/java/org/taverna/server/master/mocks/ExampleRun.java
@@ -203,6 +203,7 @@ public class ExampleRun implements TavernaRun, TavernaSecurityContext {
 		public String name;
 		public String file;
 		public String value;
+		public String delim;
 
 		public ExampleInput(String name) {
 			this.name = name;
@@ -247,6 +248,22 @@ public class ExampleRun implements TavernaRun, TavernaSecurityContext {
 			this.file = null;
 			this.value = null;
 		}
+
+		@Override
+		public String getDelimiter() {
+			return delim;
+		}
+
+		@Override
+		public void setDelimiter(String delimiter)
+				throws BadStateChangeException {
+			if (status != Status.Initialized)
+				throw new BadStateChangeException();
+			if (delimiter == null)
+				delim = null;
+			else
+				delim = delimiter.substring(0, 1);
+		}
 	}
 
 	@Override


[11/50] [abbrv] incubator-taverna-server git commit: Merge branch '2.5-branch' into experimental/java7

Posted by st...@apache.org.
Merge branch '2.5-branch' into experimental/java7

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/80bbbe9e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/80bbbe9e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/80bbbe9e

Branch: refs/heads/master
Commit: 80bbbe9e62515bd23ee0b0dda9592285aa08683b
Parents: 867242f 71eb1e6
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Fri Apr 11 14:32:18 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Fri Apr 11 14:32:18 2014 +0100

----------------------------------------------------------------------
 pom.xml                                                     | 2 +-
 server-distribution/pom.xml                                 | 2 +-
 server-port-description/pom.xml                             | 2 +-
 server-rmidaemon/pom.xml                                    | 2 +-
 server-runinterface/pom.xml                                 | 2 +-
 server-unix-forker/pom.xml                                  | 2 +-
 server-usagerecord/pom.xml                                  | 2 +-
 server-webapp/pom.xml                                       | 2 +-
 .../src/main/java/org/taverna/server/master/InputREST.java  | 6 +++++-
 .../main/java/org/taverna/server/master/TavernaServer.java  | 2 ++
 .../taverna/server/master/localworker/ForkRunFactory.java   | 9 ++++++++-
 .../server/master/localworker/IdAwareForkRunFactory.java    | 3 +++
 .../taverna/server/master/rest/TavernaServerInputREST.java  | 2 +-
 server-worker/pom.xml                                       | 2 +-
 14 files changed, 28 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/80bbbe9e/server-webapp/src/main/java/org/taverna/server/master/InputREST.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/80bbbe9e/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/80bbbe9e/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
----------------------------------------------------------------------
diff --cc server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
index d2ec9a8,64ce509..521742d
--- a/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
@@@ -376,4 -387,4 +383,4 @@@ public class ForkRunFactory extends Abs
  	protected int operatingCount() throws Exception {
  		return getFactory().countOperatingRuns();
  	}
--}
++}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/80bbbe9e/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/80bbbe9e/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerInputREST.java
----------------------------------------------------------------------


[26/50] [abbrv] incubator-taverna-server git commit: Fix compilation

Posted by st...@apache.org.
Fix compilation

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/7c0134d3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/7c0134d3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/7c0134d3

Branch: refs/heads/master
Commit: 7c0134d3903489b1517478bbbb6ed93f30366c06
Parents: ad1aa3b
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Sun May 11 21:28:05 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Sun May 11 21:28:05 2014 +0100

----------------------------------------------------------------------
 .../taverna/server/master/DirectoryREST.java    | 59 +------------------
 .../java/org/taverna/server/master/RunREST.java |  6 ++
 .../taverna/server/master/TavernaServer.java    | 60 ++++++++++++++++++++
 .../master/rest/TavernaServerDirectoryREST.java | 29 ----------
 .../server/master/soap/TavernaServerSOAP.java   | 19 +------
 .../utils/WSDLHeadOptionsInterceptor.java       |  3 +-
 6 files changed, 71 insertions(+), 105 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/7c0134d3/server-webapp/src/main/java/org/taverna/server/master/DirectoryREST.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/DirectoryREST.java b/server-webapp/src/main/java/org/taverna/server/master/DirectoryREST.java
index 116014b..5bd6f30 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/DirectoryREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/DirectoryREST.java
@@ -341,6 +341,7 @@ class DirectoryREST implements TavernaServerDirectoryREST, DirectoryBean {
 			List<URI> referenceList, UriInfo ui)
 			throws NoDirectoryEntryException, NoUpdateException,
 			FilesystemAccessException {
+		support.permitUpdate(run);
 		if (referenceList.isEmpty() || referenceList.size() > 1)
 			return status(422).entity("URI list must have single URI in it")
 					.build();
@@ -369,62 +370,4 @@ class DirectoryREST implements TavernaServerDirectoryREST, DirectoryBean {
 		else
 			return noContent().build();
 	}
-
-	@Override
-	@CallCounted
-	public Response setFileContentsFromURL(List<PathSegment> filePath,
-			List<URI> referenceList, UriInfo ui)
-			throws NoDirectoryEntryException, NoUpdateException,
-			FilesystemAccessException {
-		support.permitUpdate(run);
-		Directory d;
-		String name;
-		if (filePath == null || filePath.size() == 0)
-			throw new FilesystemAccessException(
-					"Cannot create a file that is not in a directory.");
-
-		List<PathSegment> dirPath = new ArrayList<PathSegment>(filePath);
-		name = dirPath.remove(dirPath.size() - 1).getPath();
-		DirectoryEntry de = fileUtils.getDirEntry(run, dirPath);
-		if (!(de instanceof Directory)) {
-			throw new FilesystemAccessException(
-					"Cannot create a file that is not in a directory.");
-		}
-		d = (Directory) de;
-
-		File f = null;
-		boolean isNew = false;
-		for (DirectoryEntry e : d.getContents()) {
-			if (e.getName().equals(name)) {
-				if (e instanceof File) {
-					f = (File) e;
-					break;
-				}
-				throw new FilesystemAccessException(
-						"Cannot create a file that is not in a directory.");
-			}
-		}
-
-		if (referenceList.isEmpty() || referenceList.size() > 1)
-			return status(422).entity("URI list must have single URI in it")
-					.build();
-		;
-
-		if (f == null) {
-			f = d.makeEmptyFile(support.getPrincipal(), name);
-			isNew = true;
-		}
-		try {
-			support.copyDataToFile(referenceList.get(0), f);
-		} catch (MalformedURLException ex) {
-			throw new NoUpdateException("failed to parse URI", ex);
-		} catch (IOException ex) {
-			throw new FilesystemAccessException("failed to transfer data from URI", ex);
-		}
-
-		if (isNew)
-			return created(ui.getAbsolutePath()).build();
-		else
-			return noContent().build();
-	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/7c0134d3/server-webapp/src/main/java/org/taverna/server/master/RunREST.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/RunREST.java b/server-webapp/src/main/java/org/taverna/server/master/RunREST.java
index 8b948d3..eb7b38e 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/RunREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/RunREST.java
@@ -413,6 +413,12 @@ abstract class RunREST implements TavernaServerRunREST, RunBean {
 
 	@Override
 	@CallCounted
+	public Response profileOptions() {
+		return opt();
+	}
+
+	@Override
+	@CallCounted
 	public Response expiryOptions() {
 		return opt("PUT");
 	}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/7c0134d3/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java b/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java
index b8e5a22..7c83c75 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java
@@ -60,8 +60,10 @@ import org.taverna.server.master.api.SupportAware;
 import org.taverna.server.master.api.TavernaServerBean;
 import org.taverna.server.master.common.Capability;
 import org.taverna.server.master.common.Credential;
+import org.taverna.server.master.common.DirEntryReference;
 import org.taverna.server.master.common.InputDescription;
 import org.taverna.server.master.common.Permission;
+import org.taverna.server.master.common.ProfileList;
 import org.taverna.server.master.common.RunReference;
 import org.taverna.server.master.common.Status;
 import org.taverna.server.master.common.Trust;
@@ -101,6 +103,7 @@ import org.taverna.server.master.soap.DirEntry;
 import org.taverna.server.master.soap.FileContents;
 import org.taverna.server.master.soap.PermissionList;
 import org.taverna.server.master.soap.TavernaServerSOAP;
+import org.taverna.server.master.soap.WrappedWorkflow;
 import org.taverna.server.master.soap.ZippedDirectory;
 import org.taverna.server.master.utils.CallTimeLogger.PerfLogged;
 import org.taverna.server.master.utils.FilenameUtils;
@@ -380,6 +383,23 @@ public abstract class TavernaServer implements TavernaServerSOAP,
 	@CallCounted
 	@PerfLogged
 	@RolesAllowed(USER)
+	public RunReference submitWorkflowMTOM(WrappedWorkflow workflow)
+			throws NoUpdateException {
+		Workflow wf;
+		try {
+			wf = workflow.getWorkflow();
+		} catch (IOException e) {
+			throw new NoCreateException(e.getMessage(), e);
+		}
+		checkCreatePolicy(wf);
+		String name = support.buildWorkflow(wf);
+		return new RunReference(name, getRunUriBuilder());
+	}
+
+	@Override
+	@CallCounted
+	@PerfLogged
+	@RolesAllowed(USER)
 	public RunReference submitWorkflowByURI(URI workflowURI)
 			throws NoCreateException {
 		checkCreatePolicy(workflowURI);
@@ -465,6 +485,27 @@ public abstract class TavernaServer implements TavernaServerSOAP,
 	@CallCounted
 	@PerfLogged
 	@RolesAllowed(USER)
+	public WrappedWorkflow getRunWorkflowMTOM(String runName)
+			throws UnknownRunException {
+		WrappedWorkflow ww = new WrappedWorkflow();
+		ww.setWorkflow(support.getRun(runName).getWorkflow());
+		return ww;
+	}
+
+	@Override
+	@CallCounted
+	@PerfLogged
+	@RolesAllowed(USER)
+	public ProfileList getRunWorkflowProfiles(String runName)
+			throws UnknownRunException {
+		return support.getProfileDescriptor(support.getRun(runName)
+				.getWorkflow());
+	}
+
+	@Override
+	@CallCounted
+	@PerfLogged
+	@RolesAllowed(USER)
 	public Date getRunExpiry(String runName) throws UnknownRunException {
 		return support.getRun(runName).getExpiry();
 	}
@@ -956,6 +997,25 @@ public abstract class TavernaServer implements TavernaServerSOAP,
 	@CallCounted
 	@PerfLogged
 	@RolesAllowed(USER)
+	public void setRunFileContentsFromURI(String runName,
+			DirEntryReference file, URI reference)
+			throws UnknownRunException, NoUpdateException,
+			FilesystemAccessException, NoDirectoryEntryException {
+		TavernaRun run = support.getRun(runName);
+		support.permitUpdate(run);
+		File f = fileUtils.getFile(run, file);
+		try {
+			support.copyDataToFile(reference, f);
+		} catch (IOException e) {
+			throw new FilesystemAccessException(
+					"problem transferring data from URI", e);
+		}
+	}
+
+	@Override
+	@CallCounted
+	@PerfLogged
+	@RolesAllowed(USER)
 	public void setRunFileContentsMTOM(String runName, FileContents newContents)
 			throws UnknownRunException, NoUpdateException,
 			FilesystemAccessException, NoDirectoryEntryException {

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/7c0134d3/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerDirectoryREST.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerDirectoryREST.java b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerDirectoryREST.java
index bf72d9c..ea2f776 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerDirectoryREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerDirectoryREST.java
@@ -200,35 +200,6 @@ public interface TavernaServerDirectoryREST {
 			FilesystemAccessException;
 
 	/**
-	 * Creates or updates a file in a particular location beneath the working
-	 * directory of the workflow run.
-	 * 
-	 * @param file
-	 *            The path to the file to create or update.
-	 * @param referenceList
-	 *            Location to get the file's contents from. Must be <i>publicly</i>
-	 *            readable.
-	 * @param ui
-	 *            About how this method was called.
-	 * @return An HTTP response indicating what file was created/updated.
-	 * @throws NoDirectoryEntryException
-	 *             If the name of the containing directory can't be looked up.
-	 * @throws NoUpdateException
-	 *             If the user is not permitted to update the run.
-	 * @throws FilesystemAccessException
-	 *             If something went wrong during the filesystem operation.
-	 */
-	@POST
-	@Path("{path:(.*)}")
-	@Consumes("text/uri-list")
-	@Description("Creates or updates a file in a particular location beneath the working directory of the workflow run with the contents of a publicly readable URL.")
-	@NonNull
-	Response setFileContentsFromURL(@PathParam("path") List<PathSegment> file,
-			List<URI> referenceList, @Context UriInfo ui)
-			throws NoDirectoryEntryException, NoUpdateException,
-			FilesystemAccessException;
-
-	/**
 	 * Deletes a file or directory that is in or below the working directory of
 	 * a workflow run.
 	 * 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/7c0134d3/server-webapp/src/main/java/org/taverna/server/master/soap/TavernaServerSOAP.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/soap/TavernaServerSOAP.java b/server-webapp/src/main/java/org/taverna/server/master/soap/TavernaServerSOAP.java
index 69bca0f..e175bf8 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/soap/TavernaServerSOAP.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/soap/TavernaServerSOAP.java
@@ -9,7 +9,6 @@ import static org.taverna.server.master.common.Namespaces.SERVER_SOAP;
 import static org.taverna.server.master.common.Roles.USER;
 
 import java.net.URI;
-import java.net.URL;
 import java.util.Date;
 import java.util.List;
 
@@ -89,21 +88,6 @@ public interface TavernaServerSOAP {
 			throws NoUpdateException;
 
 	/**
-	 * Make a run for a workflow at a particular URL.
-	 * 
-	 * @param workflowURL
-	 *            The public URL of the workflow to instantiate.
-	 * @return Annotated handle for created run.
-	 * @throws NoUpdateException
-	 * @throws NoCreateException
-	 */
-	@WebResult(name = "Run")
-	@WSDLDocumentation("Make a run for a workflow at a particular public URL.")
-	RunReference submitWorkflowReference(
-			@WebParam(name = "reference") @XmlElement(required = true) URL workflowURL)
-			throws NoUpdateException, NoCreateException;
-
-	/**
 	 * Make a run for a particular workflow, where that workflow will be
 	 * downloaded from elsewhere. The URI <i>must</i> be publicly readable.
 	 * 
@@ -114,7 +98,8 @@ public interface TavernaServerSOAP {
 	 * @throws NoCreateException
 	 */
 	@WebResult(name = "Run")
-	@WSDLDocumentation("Make a run for a particular workflow where that workflow is given by publicly readable URI.")
+	@WSDLDocumentation("Make a run for a particular workflow where that "
+			+ "workflow is given by publicly readable URI.")
 	RunReference submitWorkflowByURI(
 			@WebParam(name = "workflowURI") @XmlElement(required = true) URI workflowURI)
 			throws NoCreateException, NoUpdateException;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/7c0134d3/server-webapp/src/main/java/org/taverna/server/master/utils/WSDLHeadOptionsInterceptor.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/utils/WSDLHeadOptionsInterceptor.java b/server-webapp/src/main/java/org/taverna/server/master/utils/WSDLHeadOptionsInterceptor.java
index ca4ecba..96cdc6d 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/utils/WSDLHeadOptionsInterceptor.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/utils/WSDLHeadOptionsInterceptor.java
@@ -1,11 +1,11 @@
 package org.taverna.server.master.utils;
 
 import static org.apache.commons.logging.LogFactory.getLog;
+import static org.apache.cxf.common.util.UrlUtils.parseQueryString;
 import static org.apache.cxf.message.Message.HTTP_REQUEST_METHOD;
 import static org.apache.cxf.message.Message.QUERY_STRING;
 import static org.apache.cxf.message.Message.REQUEST_URL;
 import static org.apache.cxf.phase.Phase.READ;
-import static org.apache.cxf.transport.http.UrlUtilities.parseQueryString;
 
 import java.util.Map;
 
@@ -15,6 +15,7 @@ import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.AbstractPhaseInterceptor;
 
+
 /**
  * Thunk for TAVSERV-293.
  * 


[25/50] [abbrv] incubator-taverna-server git commit: Merge branch '2.5-branch' into taverna-3

Posted by st...@apache.org.
Merge branch '2.5-branch' into taverna-3

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/ad1aa3b5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/ad1aa3b5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/ad1aa3b5

Branch: refs/heads/master
Commit: ad1aa3b580edd9023ab0519875c2a07673d97ce4
Parents: b1bea56 d285a5f
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Sun May 11 18:35:58 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Sun May 11 18:35:58 2014 +0100

----------------------------------------------------------------------
 .gitignore                                      |    3 +
 .opf.yml                                        |   12 +
 CITATION                                        |   18 +
 LICENCE                                         |  504 +++++++
 LICENCE.txt                                     |  504 -------
 README.md                                       |   12 +-
 install.docx                                    |  Bin 163930 -> 173172 bytes
 install.pdf                                     |  Bin 9017083 -> 7797358 bytes
 pom.xml                                         |  157 +-
 release-notes.txt                               |   83 +-
 server-distribution/pom.xml                     |    6 +-
 server-port-description/.gitignore              |    1 +
 server-port-description/pom.xml                 |   26 +-
 .../server/port_description/AbsentValue.java    |    2 +-
 .../server/port_description/AbstractPort.java   |    4 +-
 .../AbstractPortDescription.java                |    2 +-
 .../server/port_description/AbstractValue.java  |    2 +-
 .../server/port_description/ErrorValue.java     |    2 +-
 .../port_description/InputDescription.java      |    4 +-
 .../server/port_description/LeafValue.java      |    2 +-
 .../server/port_description/ListValue.java      |    4 +-
 .../server/port_description/Namespaces.java     |    2 +-
 .../port_description/OutputDescription.java     |    6 +-
 .../server/port_description/package-info.java   |    2 +-
 .../port_description/utils/IntAdapter.java      |    2 +-
 server-rmidaemon/pom.xml                        |   64 +
 .../org/taverna/server/rmidaemon/Registry.java  |   72 +
 .../taverna/server/rmidaemon/package-info.java  |    5 +
 server-runinterface/.gitignore                  |    1 +
 server-runinterface/pom.xml                     |   30 +-
 .../remote/IllegalStateTransitionException.java |    2 +-
 .../remote/ImplementationException.java         |    3 +-
 .../localworker/remote/RemoteDirectory.java     |   14 +-
 .../remote/RemoteDirectoryEntry.java            |   10 +-
 .../server/localworker/remote/RemoteFile.java   |   16 +-
 .../server/localworker/remote/RemoteInput.java  |   39 +-
 .../localworker/remote/RemoteListener.java      |   18 +-
 .../localworker/remote/RemoteRunFactory.java    |   16 +-
 .../remote/RemoteSecurityContext.java           |   19 +-
 .../localworker/remote/RemoteSingleRun.java     |   73 +-
 .../server/localworker/remote/RemoteStatus.java |    2 +-
 .../remote/StillWorkingOnItException.java       |    3 +-
 .../server/localworker/remote/package-info.java |    2 +-
 .../localworker/server/UsageRecordReceiver.java |    2 +-
 .../server/localworker/server/package-info.java |    2 +-
 server-unix-forker/pom.xml                      |   29 +-
 .../org/taverna/server/unixforker/Forker.java   |   15 +-
 server-usagerecord/.gitignore                   |    1 +
 server-usagerecord/pom.xml                      |   37 +-
 .../main/java/org/ogf/usage/JobUsageRecord.java |   13 +-
 server-webapp/.gitignore                        |    1 +
 server-webapp/.springBeans                      |   59 +
 server-webapp/pom.xml                           |  276 ++--
 .../resources/datanucleus_log4j.properties      |    4 +
 .../org/taverna/server/master/ContentTypes.java |   50 -
 .../master/ContentsDescriptorBuilder.java       |   46 +-
 .../taverna/server/master/DirectoryREST.java    |   65 +-
 .../server/master/FileConcatenation.java        |   68 +
 .../org/taverna/server/master/InputREST.java    |  140 +-
 .../taverna/server/master/InteractionFeed.java  |  107 ++
 .../server/master/ListenerPropertyREST.java     |   26 +-
 .../taverna/server/master/ListenersREST.java    |   29 +-
 .../taverna/server/master/ManagementModel.java  |   61 -
 .../taverna/server/master/ManagementState.java  |   18 +-
 .../java/org/taverna/server/master/RunREST.java |  263 +++-
 .../taverna/server/master/RunSecurityREST.java  |   97 +-
 .../server/master/SingleListenerREST.java       |   35 +-
 .../taverna/server/master/TavernaServer.java    | 1365 +++++++++++++++++-
 .../server/master/TavernaServerImpl.java        | 1046 --------------
 .../server/master/TavernaServerSupport.java     |  297 +++-
 .../org/taverna/server/master/admin/Admin.java  |  681 ++++++---
 .../taverna/server/master/admin/AdminBean.java  |  319 +++-
 .../server/master/admin/package-info.java       |    2 +-
 .../taverna/server/master/api/ContentTypes.java |   50 +
 .../server/master/api/DirectoryBean.java        |   16 +
 .../org/taverna/server/master/api/FeedBean.java |   13 +
 .../taverna/server/master/api/InputBean.java    |   21 +
 .../server/master/api/ListenerPropertyBean.java |   15 +
 .../server/master/api/ListenersBean.java        |   13 +
 .../server/master/api/ManagementModel.java      |   61 +
 .../server/master/api/OneListenerBean.java      |   14 +
 .../org/taverna/server/master/api/RunBean.java  |   17 +
 .../taverna/server/master/api/SecurityBean.java |   14 +
 .../taverna/server/master/api/SupportAware.java |   21 +
 .../server/master/api/TavernaServerBean.java    |  101 ++
 .../taverna/server/master/api/package-info.java |    6 +
 .../server/master/common/Capability.java        |   22 +
 .../server/master/common/Credential.java        |    7 +-
 .../server/master/common/DirEntryReference.java |    2 +-
 .../server/master/common/InputDescription.java  |   10 +-
 .../server/master/common/Namespaces.java        |    6 +-
 .../server/master/common/Permission.java        |    2 +-
 .../org/taverna/server/master/common/Roles.java |    6 +-
 .../server/master/common/RunReference.java      |    2 +-
 .../taverna/server/master/common/Status.java    |    2 +-
 .../org/taverna/server/master/common/Trust.java |    3 +-
 .../org/taverna/server/master/common/Uri.java   |  327 ++++-
 .../server/master/common/VersionedElement.java  |   24 +-
 .../taverna/server/master/common/Workflow.java  |   94 +-
 .../server/master/common/package-info.java      |    2 +-
 .../server/master/common/version/Version.java   |   43 +
 .../taverna/server/master/defaults/Default.java |   99 ++
 .../server/master/defaults/package-info.java    |    5 +
 .../exceptions/BadInputPortNameException.java   |    3 +-
 .../exceptions/BadPropertyValueException.java   |    2 +-
 .../exceptions/BadStateChangeException.java     |    2 +-
 .../exceptions/FilesystemAccessException.java   |    2 +-
 .../exceptions/GeneralFailureException.java     |    3 +-
 .../exceptions/InvalidCredentialException.java  |    3 +-
 .../master/exceptions/NoCreateException.java    |    2 +-
 .../exceptions/NoCredentialException.java       |    3 +-
 .../master/exceptions/NoDestroyException.java   |    2 +-
 .../exceptions/NoDirectoryEntryException.java   |    3 +-
 .../master/exceptions/NoListenerException.java  |    2 +-
 .../master/exceptions/NoUpdateException.java    |    2 +-
 .../master/exceptions/NotOwnerException.java    |    3 +-
 .../master/exceptions/OverloadedException.java  |    2 +-
 .../master/exceptions/UnknownRunException.java  |    6 +-
 .../server/master/exceptions/package-info.java  |    2 +-
 .../taverna/server/master/facade/Facade.java    |   28 +-
 .../server/master/facade/package-info.java      |    2 +-
 .../factories/ConfigurableRunFactory.java       |   12 +-
 .../master/factories/ListenerFactory.java       |    2 +-
 .../server/master/factories/RunFactory.java     |    2 +-
 .../server/master/factories/package-info.java   |    2 +-
 .../identity/AuthorityDerivedIDMapper.java      |   12 +-
 .../master/identity/CompositeIDMapper.java      |    2 +-
 .../master/identity/ConstantIDMapper.java       |    2 +-
 .../server/master/identity/NameIDMapper.java    |    2 +-
 .../identity/StrippedDownAuthProvider.java      |  278 ++++
 .../taverna/server/master/identity/User.java    |   29 +-
 .../server/master/identity/UserStore.java       |  206 +--
 .../server/master/identity/UserStoreAPI.java    |   91 ++
 .../identity/WorkflowInternalAuthProvider.java  |  304 ++++
 .../server/master/identity/package-info.java    |    2 +-
 .../interaction/InteractionFeedSupport.java     |  150 +-
 .../server/master/interaction/package-info.java |    2 +-
 .../server/master/interfaces/Database.java      |   14 -
 .../server/master/interfaces/Directory.java     |    2 +-
 .../master/interfaces/DirectoryEntry.java       |    2 +-
 .../taverna/server/master/interfaces/File.java  |    5 +-
 .../taverna/server/master/interfaces/Input.java |   29 +-
 .../server/master/interfaces/Listener.java      |    2 +-
 .../master/interfaces/LocalIdentityMapper.java  |    2 +-
 .../master/interfaces/MessageDispatcher.java    |   17 +-
 .../server/master/interfaces/Policy.java        |   33 +-
 .../server/master/interfaces/RunStore.java      |    2 +-
 .../interfaces/SecurityContextFactory.java      |    5 +-
 .../server/master/interfaces/TavernaRun.java    |   38 +-
 .../interfaces/TavernaSecurityContext.java      |    2 +-
 .../master/interfaces/UriBuilderFactory.java    |   43 +
 .../server/master/interfaces/package-info.java  |    2 +-
 .../localworker/AbstractRemoteRunFactory.java   |  263 ++--
 .../master/localworker/CompletionNotifier.java  |   39 -
 .../server/master/localworker/ConfigBean.java   |   37 -
 .../master/localworker/ForkRunFactory.java      |  187 +--
 .../localworker/IdAwareForkRunFactory.java      |  227 +--
 .../master/localworker/LocalWorkerFactory.java  |   31 +
 .../localworker/LocalWorkerManagementState.java |  263 ----
 .../master/localworker/LocalWorkerState.java    |  263 ++--
 .../master/localworker/PersistedState.java      |  257 ++++
 .../server/master/localworker/PolicyImpl.java   |  122 --
 .../master/localworker/RemoteRunDelegate.java   |  894 ------------
 .../master/localworker/RunConnection.java       |  205 ---
 .../server/master/localworker/RunDBSupport.java |   80 -
 .../server/master/localworker/RunDatabase.java  |  209 ---
 .../master/localworker/RunDatabaseDAO.java      |  259 ----
 .../localworker/SecurityContextDelegate.java    |  621 --------
 .../SecurityContextDelegateImpl.java            |  276 ----
 .../localworker/SecurityContextFactory.java     |  129 --
 .../SimpleFormattedCompletionNotifier.java      |   55 -
 .../server/master/localworker/package-info.java |    2 +-
 .../master/notification/EmailDispatcher.java    |    7 +-
 .../master/notification/JabberDispatcher.java   |   12 +-
 .../master/notification/NotificationEngine.java |   51 +-
 .../notification/RateLimitedDispatcher.java     |    4 +-
 .../master/notification/SMSDispatcher.java      |   47 +-
 .../master/notification/TwitterDispatcher.java  |   22 +-
 .../master/notification/atom/AbstractEvent.java |   95 --
 .../master/notification/atom/AtomFeed.java      |   94 +-
 .../master/notification/atom/EntryWriter.java   |   29 -
 .../server/master/notification/atom/Event.java  |  110 ++
 .../master/notification/atom/EventDAO.java      |   90 +-
 .../master/notification/atom/FeedWriter.java    |   27 -
 .../notification/atom/TerminationEvent.java     |   79 -
 .../master/notification/atom/package-info.java  |    2 +-
 .../master/notification/package-info.java       |    2 +-
 .../org/taverna/server/master/package-info.java |    2 +-
 .../server/master/rest/ContentTypes.java        |   28 +
 .../server/master/rest/DirectoryContents.java   |   11 +-
 .../taverna/server/master/rest/FileSegment.java |    2 +-
 .../server/master/rest/InteractionFeedREST.java |   24 +-
 .../server/master/rest/ListenerDefinition.java  |    2 +-
 .../master/rest/MakeOrUpdateDirEntry.java       |    2 +-
 .../master/rest/TavernaServerDirectoryREST.java |   75 +-
 .../master/rest/TavernaServerInputREST.java     |  136 +-
 .../master/rest/TavernaServerListenersREST.java |  123 +-
 .../server/master/rest/TavernaServerREST.java   |  287 ++--
 .../master/rest/TavernaServerRunREST.java       |  469 ++++--
 .../master/rest/TavernaServerSecurityREST.java  |  298 ++--
 .../rest/handler/AccessDeniedHandler.java       |    2 +-
 .../rest/handler/BadInputPortNameHandler.java   |    2 +-
 .../rest/handler/BadPropertyValueHandler.java   |    6 +-
 .../rest/handler/BadStateChangeHandler.java     |    6 +-
 .../master/rest/handler/EntryHandler.java       |  131 ++
 .../server/master/rest/handler/FeedHandler.java |   66 +
 .../rest/handler/FileConcatenationHandler.java  |   61 +
 .../master/rest/handler/FileMessageHandler.java |    4 +-
 .../master/rest/handler/FileSegmentHandler.java |    2 +-
 .../rest/handler/FilesystemAccessHandler.java   |    2 +-
 .../rest/handler/GeneralFailureHandler.java     |    2 +-
 .../server/master/rest/handler/HandlerCore.java |    6 +-
 .../rest/handler/IllegalArgumentHandler.java    |    2 +-
 .../handler/ImplementationProblemHandler.java   |    2 +-
 .../rest/handler/InputStreamMessageHandler.java |   10 +-
 .../rest/handler/InvalidCredentialHandler.java  |    6 +-
 .../rest/handler/JAXBExceptionHandler.java      |    6 +-
 .../rest/handler/NegotiationFailedHandler.java  |    2 +-
 .../master/rest/handler/NoCreateHandler.java    |    2 +-
 .../rest/handler/NoCredentialHandler.java       |    2 +-
 .../master/rest/handler/NoDestroyHandler.java   |    2 +-
 .../rest/handler/NoDirectoryEntryHandler.java   |    2 +-
 .../master/rest/handler/NoListenerHandler.java  |    6 +-
 .../master/rest/handler/NoUpdateHandler.java    |    2 +-
 .../master/rest/handler/NotOwnerHandler.java    |    2 +-
 .../master/rest/handler/OverloadedHandler.java  |    2 +-
 .../master/rest/handler/PermissionHandler.java  |    2 +-
 .../rest/handler/T2FlowDocumentHandler.java     |   25 +-
 .../master/rest/handler/URIListHandler.java     |    4 +-
 .../master/rest/handler/UnknownRunHandler.java  |    2 +-
 .../master/rest/handler/ZipStreamHandler.java   |    4 +-
 .../master/rest/handler/package-info.java       |    2 +-
 .../server/master/rest/package-info.java        |    2 +-
 .../taverna/server/master/soap/DirEntry.java    |  100 ++
 .../server/master/soap/FileContents.java        |    7 +-
 .../server/master/soap/PermissionList.java      |    2 +-
 .../server/master/soap/TavernaServerSOAP.java   |  510 +++++--
 .../server/master/soap/ZippedDirectory.java     |    6 +-
 .../server/master/soap/package-info.java        |    2 +-
 .../server/master/usage/UsageRecord.java        |    3 +-
 .../master/usage/UsageRecordRecorder.java       |   13 +-
 .../server/master/usage/package-info.java       |    2 +-
 .../server/master/utils/CallTimeLogger.java     |   87 ++
 .../server/master/utils/CallTimingFilter.java   |   65 +
 .../server/master/utils/CapabilityLister.java   |   44 +
 .../master/utils/CertificateChainFetcher.java   |  187 +++
 .../server/master/utils/Contextualizer.java     |   35 +-
 .../taverna/server/master/utils/DerbyUtils.java |   55 +
 .../server/master/utils/FilenameUtils.java      |    2 +-
 .../server/master/utils/InvocationCounter.java  |    2 +-
 .../taverna/server/master/utils/JCECheck.java   |    2 +-
 .../taverna/server/master/utils/JDOSupport.java |   50 +-
 .../master/utils/LoggingDerbyAdapter.java       |  138 ++
 .../taverna/server/master/utils/RestUtils.java  |   32 +
 .../master/utils/RuntimeExceptionWrapper.java   |    2 +-
 .../server/master/utils/UsernamePrincipal.java  |    2 +-
 .../master/utils/WebappAwareDataSource.java     |   11 +-
 .../taverna/server/master/utils/X500Utils.java  |    7 +-
 .../server/master/utils/package-info.java       |    2 +-
 .../master/worker/CompletionNotifier.java       |   45 +
 .../server/master/worker/FactoryBean.java       |   26 +
 .../server/master/worker/PasswordIssuer.java    |   57 +
 .../server/master/worker/PolicyImpl.java        |  158 ++
 .../server/master/worker/PolicyLimits.java      |   43 +
 .../server/master/worker/RemoteRunDelegate.java |  967 +++++++++++++
 .../server/master/worker/RunConnection.java     |  239 +++
 .../server/master/worker/RunDBSupport.java      |   83 ++
 .../server/master/worker/RunDatabase.java       |  311 ++++
 .../server/master/worker/RunDatabaseDAO.java    |  306 ++++
 .../master/worker/RunFactoryConfiguration.java  |  395 +++++
 .../master/worker/SecurityContextDelegate.java  |  649 +++++++++
 .../worker/SecurityContextDelegateImpl.java     |  298 ++++
 .../master/worker/SecurityContextFactory.java   |  154 ++
 .../SimpleFormattedCompletionNotifier.java      |   64 +
 .../worker/VelocityCompletionNotifier.java      |  105 ++
 .../server/master/worker/WorkerModel.java       |  203 +++
 .../server/master/worker/package-info.java      |   10 +
 .../main/replacementscripts/executeworkflow.sh  |   11 +-
 server-webapp/src/main/resources/admin.html     |   19 +-
 .../src/main/resources/capabilities.properties  |   38 +
 .../src/main/resources/log4j.properties         |   65 +-
 .../src/main/resources/static/admin.js          |   57 +-
 .../src/main/resources/version.properties       |    6 +-
 server-webapp/src/main/resources/welcome.html   |   38 +-
 .../src/main/webapp/META-INF/persistence.xml    |    7 +-
 server-webapp/src/main/webapp/WEB-INF/beans.xml |  215 ++-
 .../src/main/webapp/WEB-INF/insecure.xml        |   61 +-
 ...orker.VelocityCompletionNotifier_email.vtmpl |   15 +
 ....worker.VelocityCompletionNotifier_sms.vtmpl |    1 +
 ...ker.VelocityCompletionNotifier_twitter.vtmpl |    1 +
 .../src/main/webapp/WEB-INF/partsecure.xml      |   36 +
 .../src/main/webapp/WEB-INF/providers.xml       |   22 +-
 .../src/main/webapp/WEB-INF/secure.xml          |   69 +-
 .../webapp/WEB-INF/tavernaserver.properties     |    5 +
 server-webapp/src/main/webapp/WEB-INF/web.xml   |   33 +-
 .../src/main/webapp/WEB-INF/webappBeans.xml     |   76 +-
 .../src/main/webapp/WEB-INF/windows.xml         |   79 -
 server-webapp/src/misc/xsd/persistence_1_0.xsd  |  305 ++++
 .../taverna/server/master/JaxbSanityTest.java   |   28 +-
 .../server/master/TavernaServerImplTest.java    |   22 +-
 .../master/WorkflowSerializationTest.java       |   15 +-
 .../taverna/server/master/mocks/ExampleRun.java |  113 +-
 .../taverna/server/master/mocks/MockPolicy.java |   12 +-
 .../master/mocks/SimpleListenerFactory.java     |    4 +-
 .../mocks/SimpleNonpersistentRunStore.java      |    9 +-
 .../server/master/mocks/SimpleServerPolicy.java |   26 +-
 .../src/test/resources/log4j.properties         |    4 +
 server-worker/pom.xml                           |   16 +-
 .../server/localworker/api/Constants.java       |  141 ++
 .../server/localworker/api/RunAccounting.java   |   22 +
 .../taverna/server/localworker/api/Worker.java  |  135 ++
 .../server/localworker/api/WorkerFactory.java   |   18 +
 .../localworker/impl/DirectoryDelegate.java     |   19 +-
 .../server/localworker/impl/FileDelegate.java   |   37 +-
 .../server/localworker/impl/LocalWorker.java    |  134 +-
 .../server/localworker/impl/RunAccounting.java  |   22 -
 .../localworker/impl/SecurityConstants.java     |   58 -
 .../localworker/impl/TavernaRunManager.java     |  101 +-
 .../taverna/server/localworker/impl/Worker.java |  126 --
 .../server/localworker/impl/WorkerCore.java     |  732 ++++++----
 .../server/localworker/impl/WorkerFactory.java  |   17 -
 .../impl/utils/FilenameVerifier.java            |    6 +-
 .../localworker/impl/utils/TimingOutTask.java   |   40 +
 .../localworker/impl/LocalWorkerTest.java       |   31 +-
 usage.docx                                      |  Bin 176537 -> 205350 bytes
 usage.pdf                                       |  Bin 15668640 -> 14213122 bytes
 326 files changed, 15992 insertions(+), 8753 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/pom.xml
----------------------------------------------------------------------
diff --cc pom.xml
index 69a73e8,89f0fc5..1e38f26
--- a/pom.xml
+++ b/pom.xml
@@@ -146,15 -148,17 +148,26 @@@
  			<releases />
  		</repository>
  		<repository>
 +			<id>mygrid-snapshot-repository</id>
 +			<name>myGrid Snapshot Repository</name>
 +			<url>http://build.mygrid.org.uk/maven/snapshot-repository</url>
 +			<snapshots>
 +				<enabled>true</enabled>
 +			</snapshots>
 +			<releases />
 +		</repository>
 +		<repository>
+ 			<id>mygrid-snapshots</id>
+ 			<name>myGrid Snapshot Respository</name>
+ 			<url>http://www.mygrid.org.uk/maven/snapshot-repository</url>
+ 			<snapshots>
+ 				<enabled>true</enabled>
+ 			</snapshots>
+ 			<releases>
+ 				<enabled>false</enabled>
+ 			</releases>
+ 		</repository>
+ 		<repository>
  			<snapshots>
  				<enabled>false</enabled>
  			</snapshots>
@@@ -507,6 -544,6 +553,7 @@@
  		<module>server-unix-forker</module>
  		<module>server-usagerecord</module>
  		<module>server-port-description</module>
 +		<module>server-execution-delegate</module>
+ 		<module>server-rmidaemon</module>
  	</modules>
  </project>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-distribution/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-port-description/pom.xml
----------------------------------------------------------------------
diff --cc server-port-description/pom.xml
index f30e755,c699175..44a9d50
--- a/server-port-description/pom.xml
+++ b/server-port-description/pom.xml
@@@ -3,15 -3,13 +3,13 @@@
  	<parent>
  		<artifactId>server</artifactId>
  		<groupId>uk.org.taverna.server</groupId>
 -		<version>2.5.4</version>
 +		<version>3.0-SNAPSHOT</version>
  	</parent>
  	<artifactId>server-port-description</artifactId>
- 	<name>Taverna Server Port Descriptor Types</name>
+ 	<name>Workflow Port Descriptor Types</name>
  	<description>The structural types used to describe ports on workflows, as exported by Taverna Server.</description>
  	<scm>
- 		<connection>scm:svn:http://taverna.googlecode.com/svn/taverna/products/uk.org.taverna.server/branches/2.4-release/server-port-description</connection>
- 		<developerConnection>scm:svn:https://taverna.googlecode.com/svn/taverna/products/uk.org.taverna.server/branches/2.4-release/server-port-description</developerConnection>
- 		<url>http://code.google.com/p/taverna/source/browse/taverna/products/uk.org.taverna.server/branches/2.4-release/server-port-description</url>
+ 		<url>${scmBrowseRoot}/server-port-description</url>
  	</scm>
  
  	<properties>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-rmidaemon/pom.xml
----------------------------------------------------------------------
diff --cc server-rmidaemon/pom.xml
index 0000000,1903f74..c2282b0
mode 000000,100644..100644
--- a/server-rmidaemon/pom.xml
+++ b/server-rmidaemon/pom.xml
@@@ -1,0 -1,64 +1,64 @@@
+ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ 	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 	<modelVersion>4.0.0</modelVersion>
+ 	<parent>
+ 		<groupId>uk.org.taverna.server</groupId>
+ 		<artifactId>server</artifactId>
 -		<version>2.5.4</version>
++		<version>3.0-SNAPSHOT</version>
+ 	</parent>
+ 	<artifactId>server-rmidaemon</artifactId>
+ 	<name>RMI registry daemon</name>
+ 	<description>Customised RMI registry that supports restricting to localhost.</description>
+ 	<scm>
+ 		<url>${scmBrowseRoot}/server-rmidaemon</url>
+ 	</scm>
+ 
+ 	<properties>
+ 		<project.build.sourceEncoding>US-ASCII</project.build.sourceEncoding>
+ 		<mainClass>org.taverna.server.rmidaemon.Registry</mainClass>
+ 	</properties>
+ 	<dependencies>
+ 		<dependency>
+ 			<groupId>junit</groupId>
+ 			<artifactId>junit</artifactId>
+ 			<scope>test</scope>
+ 		</dependency>
+ 	</dependencies>
+ 
+ 	<build>
+ 		<plugins>
+ 			<plugin>
+ 				<groupId>org.apache.maven.plugins</groupId>
+ 				<artifactId>maven-compiler-plugin</artifactId>
+ 				<configuration>
+ 					<encoding>US-ASCII</encoding>
+ 					<source>1.7</source>
+ 					<target>1.7</target>
+ 				</configuration>
+ 			</plugin>
+ 			<plugin>
+ 				<groupId>org.apache.maven.plugins</groupId>
+ 				<artifactId>maven-assembly-plugin</artifactId>
+ 				<configuration>
+ 					<descriptorRefs>
+ 						<descriptorRef>jar-with-dependencies</descriptorRef>
+ 					</descriptorRefs>
+ 					<archive>
+ 						<manifest>
+ 							<mainClass>${mainClass}</mainClass>
+ 						</manifest>
+ 					</archive>
+ 				</configuration>
+ 				<executions>
+ 					<execution>
+ 						<id>make-assembly</id>
+ 						<phase>package</phase>
+ 						<goals>
+ 							<goal>single</goal>
+ 						</goals>
+ 					</execution>
+ 				</executions>
+ 			</plugin>
+ 		</plugins>
+ 	</build>
+ </project>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-runinterface/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteRunFactory.java
----------------------------------------------------------------------
diff --cc server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteRunFactory.java
index 3df8347,fb3af6d..eec4ab5
--- a/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteRunFactory.java
+++ b/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteRunFactory.java
@@@ -37,8 -37,8 +37,8 @@@ public interface RemoteRunFactory exten
  	 * @throws RemoteException
  	 *             If anything goes wrong with the communication.
  	 */
- 	@NonNull
- 	RemoteSingleRun make(@NonNull byte[] workflow, @NonNull String creator,
+ 	@Nonnull
 -	RemoteSingleRun make(@Nonnull String workflow, @Nonnull String creator,
++	RemoteSingleRun make(@Nonnull byte[] workflow, @Nonnull String creator,
  			@Nullable UsageRecordReceiver usageRecordReceiver,
  			@Nullable UUID masterID) throws RemoteException;
  

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-unix-forker/pom.xml
----------------------------------------------------------------------
diff --cc server-unix-forker/pom.xml
index 44552a0,0823b9f..cdbce7b
--- a/server-unix-forker/pom.xml
+++ b/server-unix-forker/pom.xml
@@@ -4,14 -4,11 +4,11 @@@
  	<parent>
  		<artifactId>server</artifactId>
  		<groupId>uk.org.taverna.server</groupId>
 -		<version>2.5.4</version>
 +		<version>3.0-SNAPSHOT</version>
  	</parent>
  	<artifactId>server-unix-forker</artifactId>
- 	<name>Taverna Forking Invoker for Unix</name>
  	<scm>
- 		<connection>scm:svn:http://taverna.googlecode.com/svn/taverna/products/uk.org.taverna.server/branches/2.4-release/server-unix-forker</connection>
- 		<developerConnection>scm:svn:https://taverna.googlecode.com/svn/taverna/products/uk.org.taverna.server/branches/2.4-release/server-unix-forker</developerConnection>
- 		<url>http://code.google.com/p/taverna/source/browse/taverna/products/uk.org.taverna.server/branches/2.4-release/server-unix-forker</url>
+ 		<url>${scmBrowseRoot}/server-unix-forker</url>
  	</scm>
  
  	<properties>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-usagerecord/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-webapp/pom.xml
----------------------------------------------------------------------
diff --cc server-webapp/pom.xml
index 9b3d896,f5d7584..f56b9c5
--- a/server-webapp/pom.xml
+++ b/server-webapp/pom.xml
@@@ -17,21 -15,17 +15,19 @@@
  	</scm>
  
  	<properties>
- 		<version.cxf>2.5.2</version.cxf>
- 		<version.spring>3.0.7.RELEASE</version.spring>
- 		<version.spring-security>3.0.7.RELEASE</version.spring-security>
+ 		<version.cxf>2.7.7</version.cxf>
+ 		<version.spring>3.2.5.RELEASE</version.spring>
+ 		<version.spring-security>3.1.4.RELEASE</version.spring-security>
  		<version.asm>3.3.1</version.asm>
  		<version.smack>3.2.1</version.smack>
- <<<<<<< HEAD
 -		<version.commandline>2.5.0</version.commandline>
 +		<!--<version.commandline>3.0.1-SNAPSHOT</version.commandline>-->
 +		<version.commandline>3.0.0</version.commandline>
- =======
- 		<version.commandline>2.4.1i-1.0.2</version.commandline>
- >>>>>>> 2.4.1i-branch
+ 		<edition.commandline>enterprise</edition.commandline>
  		<version.jdoapi>3.0.1</version.jdoapi>
  		<forker.module>server-unix-forker</forker.module>
  		<util.dir>${project.build.directory}/${project.build.finalName}/WEB-INF/classes/util</util.dir>
 +		<scufl2.version>0.9.2</scufl2.version>
+ 		<cmdline.dir>${util.dir}/taverna-commandline-${edition.commandline}-${version.commandline}</cmdline.dir>
  	</properties>
  
  	<dependencies>
@@@ -273,27 -274,21 +276,43 @@@
  			</exclusions>
  		</dependency>
  		<dependency>
+ 			<groupId>org.apache.velocity</groupId>
+ 			<artifactId>velocity</artifactId>
+ 			<version>1.7</version>
+ 		</dependency>
+ 		<dependency>
+ 			<groupId>org.apache.cxf</groupId>
+ 			<artifactId>cxf-rt-rs-extension-providers</artifactId>
+ 			<version>${version.cxf}</version>
+ 		</dependency>
+ 		<dependency>
+ 			<groupId>org.codehaus.jettison</groupId>
+ 			<artifactId>jettison</artifactId>
+ 			<version>1.3.4</version>
+ 			<scope>runtime</scope>
+ 		</dependency>
++		<dependency>
 +			<groupId>uk.org.taverna.scufl2</groupId>
 +			<artifactId>scufl2-api</artifactId>
 +			<version>${scufl2.version}</version>
 +		</dependency>
 +		<dependency>
 +			<groupId>uk.org.taverna.scufl2</groupId>
 +			<artifactId>scufl2-t2flow</artifactId>
 +			<version>${scufl2.version}</version>
 +			<scope>runtime</scope>
 +		</dependency>
 +		<dependency>
 +			<groupId>uk.org.taverna.scufl2</groupId>
 +			<artifactId>scufl2-rdfxml</artifactId>
 +			<version>${scufl2.version}</version>
 +			<scope>runtime</scope>
 +		</dependency>
 +		<dependency>
 +			<groupId>org.apache.commons</groupId>
 +			<artifactId>commons-compress</artifactId>
 +			<version>1.4.1</version>
 +		</dependency>
  	</dependencies>
  
  	<dependencyManagement>
@@@ -550,11 -557,11 +581,12 @@@
  						<configuration>
  							<artifactItems>
  								<artifactItem>
- 									<groupId>net.sf.taverna.t2</groupId>
- 									<artifactId>taverna-commandline</artifactId>
+ 									<groupId>net.sf.taverna.t2.taverna-commandline</groupId>
+ 									<artifactId>taverna-commandline-${edition.commandline}</artifactId>
  									<version>${version.commandline}</version>
 +									<classifier>bin</classifier>
  									<type>zip</type>
+ 									<classifier>bin</classifier>
  									<outputDirectory>${util.dir}</outputDirectory>
  								</artifactItem>
  							</artifactItems>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-webapp/src/main/java/org/taverna/server/master/ContentsDescriptorBuilder.java
----------------------------------------------------------------------
diff --cc server-webapp/src/main/java/org/taverna/server/master/ContentsDescriptorBuilder.java
index aea5129,f778e3a..ab43827
--- a/server-webapp/src/main/java/org/taverna/server/master/ContentsDescriptorBuilder.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/ContentsDescriptorBuilder.java
@@@ -12,11 -14,12 +12,11 @@@ import static org.taverna.server.master
  import static org.taverna.server.master.common.Uri.secure;
  
  import java.io.ByteArrayInputStream;
 -import java.util.ArrayList;
 +import java.io.IOException;
- import java.net.URI;
  import java.util.Collection;
  import java.util.HashSet;
  import java.util.Iterator;
 -import java.util.List;
+ import java.util.Set;
  
  import javax.ws.rs.core.UriBuilder;
  import javax.ws.rs.core.UriInfo;
@@@ -286,37 -380,4 +287,4 @@@ public class ContentsDescriptorBuilder 
  		}
  		return desc;
  	}
- 
- 	/**
- 	 * How to manufacture URIs to workflow runs.
- 	 * 
- 	 * @author Donal Fellows
- 	 */
- 	public interface UriBuilderFactory {
- 		/**
- 		 * Given a run, get a factory for RESTful URIs to resources associated
- 		 * with it.
- 		 * 
- 		 * @param run
- 		 *            The run in question.
- 		 * @return The {@link URI} factory.
- 		 */
- 		UriBuilder getRunUriBuilder(TavernaRun run);
- 
- 		/**
- 		 * @return a URI factory that is preconfigured to point to the base of
- 		 *         the webapp.
- 		 */
- 		UriBuilder getBaseUriBuilder();
- 
- 		/**
- 		 * Resolves a URI with respect to the base URI of the factory.
- 		 * 
- 		 * @param uri
- 		 *            The URI to resolve, or <tt>null</tt>.
- 		 * @return The resolved URI, or <tt>null</tt> if <b>uri</b> is
- 		 *         <tt>null</tt>.
- 		 */
- 		String resolve(String uri);
- 	}
--}
++}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-webapp/src/main/java/org/taverna/server/master/DirectoryREST.java
----------------------------------------------------------------------
diff --cc server-webapp/src/main/java/org/taverna/server/master/DirectoryREST.java
index 2098f9d,3284e57..116014b
--- a/server-webapp/src/main/java/org/taverna/server/master/DirectoryREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/DirectoryREST.java
@@@ -345,73 -369,4 +369,62 @@@ class DirectoryREST implements TavernaS
  		else
  			return noContent().build();
  	}
 +
 +	@Override
 +	@CallCounted
 +	public Response setFileContentsFromURL(List<PathSegment> filePath,
 +			List<URI> referenceList, UriInfo ui)
 +			throws NoDirectoryEntryException, NoUpdateException,
 +			FilesystemAccessException {
 +		support.permitUpdate(run);
 +		Directory d;
 +		String name;
 +		if (filePath == null || filePath.size() == 0)
 +			throw new FilesystemAccessException(
 +					"Cannot create a file that is not in a directory.");
 +
 +		List<PathSegment> dirPath = new ArrayList<PathSegment>(filePath);
 +		name = dirPath.remove(dirPath.size() - 1).getPath();
 +		DirectoryEntry de = fileUtils.getDirEntry(run, dirPath);
 +		if (!(de instanceof Directory)) {
 +			throw new FilesystemAccessException(
 +					"Cannot create a file that is not in a directory.");
 +		}
 +		d = (Directory) de;
 +
 +		File f = null;
 +		boolean isNew = false;
 +		for (DirectoryEntry e : d.getContents()) {
 +			if (e.getName().equals(name)) {
 +				if (e instanceof File) {
 +					f = (File) e;
 +					break;
 +				}
 +				throw new FilesystemAccessException(
 +						"Cannot create a file that is not in a directory.");
 +			}
 +		}
 +
 +		if (referenceList.isEmpty() || referenceList.size() > 1)
 +			return status(422).entity("URI list must have single URI in it")
 +					.build();
 +		;
 +
 +		if (f == null) {
 +			f = d.makeEmptyFile(support.getPrincipal(), name);
 +			isNew = true;
 +		}
 +		try {
 +			support.copyDataToFile(referenceList.get(0), f);
 +		} catch (MalformedURLException ex) {
 +			throw new NoUpdateException("failed to parse URI", ex);
 +		} catch (IOException ex) {
 +			throw new FilesystemAccessException("failed to transfer data from URI", ex);
 +		}
 +
 +		if (isNew)
 +			return created(ui.getAbsolutePath()).build();
 +		else
 +			return noContent().build();
 +	}
  }
- 
- /**
-  * Description of properties supported by {@link DirectoryREST}.
-  * 
-  * @author Donal Fellows
-  */
- interface DirectoryBean extends SupportAware {
- 	void setFileUtils(FilenameUtils fileUtils);
- 
- 	DirectoryREST connect(TavernaRun run);
- }

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-webapp/src/main/java/org/taverna/server/master/RunREST.java
----------------------------------------------------------------------
diff --cc server-webapp/src/main/java/org/taverna/server/master/RunREST.java
index 1af76d3,a0c65b3..8b948d3
--- a/server-webapp/src/main/java/org/taverna/server/master/RunREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/RunREST.java
@@@ -10,23 -12,24 +12,25 @@@ import static javax.ws.rs.core.Response
  import static javax.ws.rs.core.Response.status;
  import static org.joda.time.format.ISODateTimeFormat.dateTime;
  import static org.joda.time.format.ISODateTimeFormat.dateTimeParser;
- import static org.taverna.server.master.TavernaServerImpl.log;
+ import static org.taverna.server.master.TavernaServer.log;
+ import static org.taverna.server.master.common.Roles.SELF;
+ import static org.taverna.server.master.common.Roles.USER;
  import static org.taverna.server.master.common.Status.Initialized;
  import static org.taverna.server.master.common.Status.Operating;
+ import static org.taverna.server.master.utils.RestUtils.opt;
  
- import java.net.MalformedURLException;
- import java.net.URI;
  import java.util.Date;
  
+ import javax.annotation.security.RolesAllowed;
  import javax.ws.rs.core.Response;
  import javax.ws.rs.core.UriInfo;
+ import javax.xml.bind.JAXBException;
  
- import org.apache.abdera.model.Entry;
- import org.apache.abdera.model.Feed;
  import org.joda.time.DateTime;
+ import org.ogf.usage.JobUsageRecord;
  import org.springframework.beans.factory.annotation.Required;
- import org.taverna.server.master.TavernaServerImpl.SupportAware;
+ import org.taverna.server.master.api.RunBean;
 +import org.taverna.server.master.common.ProfileList;
  import org.taverna.server.master.common.Status;
  import org.taverna.server.master.common.Workflow;
  import org.taverna.server.master.exceptions.BadStateChangeException;
@@@ -161,19 -177,8 +178,21 @@@ abstract class RunREST implements Taver
  
  	@Override
  	@CallCounted
 +	public String getMainProfileName() {
 +		String name = run.getWorkflow().getMainProfileName();
 +		return (name == null ? "" : name);
 +	}
 +
 +	@Override
 +	@CallCounted
 +	public ProfileList getProfiles() {
 +		return support.getProfileDescriptor(run.getWorkflow());
 +	}
 +
 +	@Override
 +	@CallCounted
+ 	@PerfLogged
+ 	@RolesAllowed({ USER, SELF })
  	public DirectoryREST getWorkingDirectory() {
  		return makeDirectoryInterface().connect(run);
  	}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-webapp/src/main/java/org/taverna/server/master/TavernaServerSupport.java
----------------------------------------------------------------------
diff --cc server-webapp/src/main/java/org/taverna/server/master/TavernaServerSupport.java
index 75dc3b8,c9a8dae..5c6d938
--- a/server-webapp/src/main/java/org/taverna/server/master/TavernaServerSupport.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/TavernaServerSupport.java
@@@ -34,11 -45,16 +45,17 @@@ import org.springframework.jmx.export.a
  import org.springframework.jmx.export.annotation.ManagedMetric;
  import org.springframework.jmx.export.annotation.ManagedResource;
  import org.springframework.security.core.Authentication;
+ import org.springframework.security.core.GrantedAuthority;
  import org.springframework.security.core.context.SecurityContextHolder;
  import org.springframework.security.core.userdetails.UserDetails;
+ import org.taverna.server.master.api.ManagementModel;
+ import org.taverna.server.master.api.TavernaServerBean;
+ import org.taverna.server.master.common.Capability;
  import org.taverna.server.master.common.Permission;
 +import org.taverna.server.master.common.ProfileList;
+ import org.taverna.server.master.common.VersionedElement;
  import org.taverna.server.master.common.Workflow;
+ import org.taverna.server.master.common.version.Version;
  import org.taverna.server.master.exceptions.FilesystemAccessException;
  import org.taverna.server.master.exceptions.NoCreateException;
  import org.taverna.server.master.exceptions.NoDestroyException;
@@@ -58,12 -79,6 +80,8 @@@ import org.taverna.server.master.utils.
  import org.taverna.server.master.utils.InvocationCounter;
  import org.taverna.server.master.utils.UsernamePrincipal;
  
 +import uk.org.taverna.scufl2.api.profiles.Profile;
 +
- import edu.umd.cs.findbugs.annotations.NonNull;
- import edu.umd.cs.findbugs.annotations.Nullable;
- import edu.umd.cs.findbugs.annotations.SuppressWarnings;
- 
  /**
   * Web application support utilities.
   * 
@@@ -697,22 -866,17 +870,24 @@@ public class TavernaServerSupport 
  				if (len < 0)
  					break;
  				total += len;
- 				log.debug("read " + len + " bytes from source stream (total: "
- 						+ total + ") bound for " + name);
+ 				if (log.isDebugEnabled())
+ 					log.debug("read " + len
+ 							+ " bytes from source stream (total: " + total
+ 							+ ") bound for " + name);
 -				if (len == buffer.length)
 -					file.appendContents(buffer);
 -				else {
 +				if (len == buffer.length) {
 +					if (first)
 +						file.setContents(buffer);
 +					else
 +						file.appendContents(buffer);
 +				} else {
  					byte[] newBuf = new byte[len];
  					System.arraycopy(buffer, 0, newBuf, 0, len);
 -					file.appendContents(newBuf);
 +					if (first)
 +						file.setContents(newBuf);
 +					else
 +						file.appendContents(newBuf);
  				}
 +				first = false;
  			}
  		} catch (IOException exn) {
  			throw new FilesystemAccessException("failed to transfer bytes", exn);

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-webapp/src/main/java/org/taverna/server/master/common/Workflow.java
----------------------------------------------------------------------
diff --cc server-webapp/src/main/java/org/taverna/server/master/common/Workflow.java
index eab032d,9aa3669..ba6a68c
--- a/server-webapp/src/main/java/org/taverna/server/master/common/Workflow.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/common/Workflow.java
@@@ -1,7 -1,7 +1,7 @@@
  /*
 - * Copyright (C) 2010-2011 The University of Manchester
 + * Copyright (C) 2010-2012 The University of Manchester
   * 
-  * See the file "LICENSE.txt" for license terms.
+  * See the file "LICENSE" for license terms.
   */
  package org.taverna.server.master.common;
  
@@@ -37,25 -33,15 +37,27 @@@ import javax.xml.bind.annotation.XmlAny
  import javax.xml.bind.annotation.XmlRootElement;
  import javax.xml.bind.annotation.XmlTransient;
  import javax.xml.bind.annotation.XmlType;
 +import javax.xml.parsers.DocumentBuilderFactory;
  
 +import org.taverna.server.master.rest.handler.Scufl2DocumentHandler;
 +import org.taverna.server.master.rest.handler.T2FlowDocumentHandler;
 +import org.w3c.dom.Document;
  import org.w3c.dom.Element;
 +import org.xml.sax.SAXException;
 +
 +import uk.org.taverna.scufl2.api.common.NamedSet;
 +import uk.org.taverna.scufl2.api.container.WorkflowBundle;
 +import uk.org.taverna.scufl2.api.io.ReaderException;
 +import uk.org.taverna.scufl2.api.io.WorkflowBundleIO;
 +import uk.org.taverna.scufl2.api.io.WriterException;
 +import uk.org.taverna.scufl2.api.profiles.Profile;
+ import org.w3c.dom.Node;
+ import org.w3c.dom.NodeList;
  
  /**
 - * Encapsulation of a T2flow document.
 + * Encapsulation of a T2flow or Scufl2 document.
   * 
 - * @author dkf
 + * @author Donal K. Fellows
   */
  @XmlRootElement(name = "workflow")
  @XmlType(name = "Workflow")
@@@ -251,18 -85,13 +253,15 @@@ public class Workflow implements Serial
  	public void readExternal(ObjectInput in) throws IOException,
  			ClassNotFoundException {
  		try {
 -			int len = in.readInt();
 -			byte[] bytes = new byte[len];
 -			in.readFully(bytes);
 -			try (Reader r = new InputStreamReader(new InflaterInputStream(
 -					new ByteArrayInputStream(bytes)), ENCODING)) {
 -				this.content = ((Workflow) unmarshaller.unmarshal(r)).content;
 -			}
 +			ByteArrayInputStream bytes = readbytes(in);
- 			if (bytes != null) {
- 				Reader r = new InputStreamReader(bytes, ENCODING);
- 				Workflow w = (Workflow) unmarshaller.unmarshal(r);
- 				r.close();
- 				this.content = w.content;
- 			}
++			if (bytes != null)
++				try (Reader r = new InputStreamReader(bytes, ENCODING)) {
++					content = ((Workflow) unmarshaller.unmarshal(r)).content;
++				}
 +			bytes = readbytes(in);
- 			if (bytes != null) {
- 				this.bundle = io.readBundle(bytes, SCUFL2);
- 			}
- 			this.isBundleFirst = in.readBoolean();
++			if (bytes != null)
++				bundle = io.readBundle(bytes, SCUFL2);
++			isBundleFirst = in.readBoolean();
  			return;
  		} catch (JAXBException e) {
  			throw new IOException("failed to unmarshal", e);
@@@ -273,55 -100,72 +272,96 @@@
  		}
  	}
  
 +	private byte[] getAsT2Flow() throws IOException, JAXBException {
 +		ByteArrayOutputStream baos = new ByteArrayOutputStream();
 +		OutputStreamWriter w = new OutputStreamWriter(baos, ENCODING);
 +		marshaller.marshal(this, w);
 +		w.close();
 +		return baos.toByteArray();
 +	}
 +
 +	private byte[] getAsScufl2() throws IOException, WriterException {
 +		ByteArrayOutputStream baos = new ByteArrayOutputStream();
 +		io.writeBundle(bundle, baos, SCUFL2);
 +		baos.close();
 +		return baos.toByteArray();
 +	}
 +
  	@Override
  	public void writeExternal(ObjectOutput out) throws IOException {
- 		if (content != null)
- 			try {
- 				writebytes(out, getAsT2Flow());
- 			} catch (JAXBException e) {
- 				throw new IOException("failed to marshal t2flow", e);
- 			}
- 		else
- 			writebytes(out, null);
- 		if (bundle != null)
- 			try {
- 				writebytes(out, getAsScufl2());
- 			} catch (WriterException e) {
- 				throw new IOException("failed to marshal scufl2", e);
- 			}
- 		else
- 			writebytes(out, null);
+ 		try {
 -			ByteArrayOutputStream baos = new ByteArrayOutputStream();
 -			try (OutputStreamWriter w = new OutputStreamWriter(
 -					new DeflaterOutputStream(baos), ENCODING)) {
 -				marshaller.marshal(this, w);
 -			}
 -			byte[] bytes = baos.toByteArray();
 -			out.writeInt(bytes.length);
 -			out.write(bytes);
++			writebytes(out, (content != null) ? getAsT2Flow() : null);
+ 		} catch (JAXBException e) {
 -			throw new IOException("failed to marshal", e);
++			throw new IOException("failed to marshal t2flow", e);
+ 		}
++		try {
++			writebytes(out, (bundle != null) ? getAsScufl2() : null);
++		} catch (WriterException e) {
++			throw new IOException("failed to marshal scufl2", e);
++		}
 +		out.writeBoolean(isBundleFirst);
 +	}
 +
 +	private ByteArrayInputStream readbytes(ObjectInput in) throws IOException {
 +		int len = in.readInt();
 +		if (len > 0) {
 +			byte[] bytes = new byte[len];
 +			in.readFully(bytes);
 +			return new ByteArrayInputStream(bytes);
 +		}
 +		return null;
 +	}
 +
 +	private void writebytes(ObjectOutput out, byte[] data) throws IOException {
 +		out.writeInt(data == null ? 0 : data.length);
 +		if (data != null && data.length > 0)
 +			out.write(data);
  	}
+ 
+ 	/**
+ 	 * Make up for the lack of an integrated XPath engine.
+ 	 * 
+ 	 * @param name
+ 	 *            The element names to look up from the root of the contained
+ 	 *            document.
+ 	 * @return The looked up element, or <tt>null</tt> if it doesn't exist.
+ 	 */
+ 	private Element getEl(String... name) {
 -		Element el = null;
 -		for (Element e : content)
 -			if (e.getNamespaceURI().equals(T2FLOW)
 -					&& e.getLocalName().equals(name[0])) {
 -				el = e;
 -				break;
 -			}
++		Element el = content;
+ 		boolean skip = true;
+ 		for (String n : name) {
+ 			if (skip) {
+ 				skip = false;
+ 				continue;
+ 			}
+ 			if (el == null)
+ 				return null;
 -			NodeList nl = el.getElementsByTagNameNS(T2FLOW, n);
++			NodeList nl = el.getElementsByTagNameNS(T2FLOW_NS, n);
+ 			if (nl.getLength() == 0)
+ 				return null;
+ 			Node node = nl.item(0);
+ 			if (node instanceof Element)
+ 				el = (Element) node;
+ 			else
+ 				return null;
+ 		}
+ 		return el;
+ 	}
+ 
+ 	/**
+ 	 * @return The content of the embedded
+ 	 *         <tt>&lt;workflow&gt;&lt;dataflow&gt;&lt;name&gt;</tt> element.
+ 	 */
+ 	@XmlTransient
+ 	public String getName() {
+ 		return getEl("workflow", "dataflow", "name").getTextContent();
+ 	}
+ 
+ 	/**
+ 	 * @return The embedded <tt>&lt;workflow&gt;</tt> element.
+ 	 */
+ 	@XmlTransient
+ 	public Element getWorkflowRoot() {
+ 		return getEl("workflow");
+ 	}
  }

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java
----------------------------------------------------------------------
diff --cc server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java
index 379cbdb,4394b4b..d2c9c91
--- a/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java
@@@ -54,11 -50,14 +50,16 @@@ import org.taverna.server.master.intera
  import org.taverna.server.master.interfaces.Listener;
  import org.taverna.server.master.interfaces.SecurityContextFactory;
  import org.taverna.server.master.interfaces.TavernaRun;
+ import org.taverna.server.master.interfaces.UriBuilderFactory;
+ import org.taverna.server.master.notification.atom.EventDAO;
  import org.taverna.server.master.usage.UsageRecordRecorder;
  import org.taverna.server.master.utils.UsernamePrincipal;
+ import org.taverna.server.master.worker.FactoryBean;
+ import org.taverna.server.master.worker.RemoteRunDelegate;
+ import org.taverna.server.master.worker.RunFactoryConfiguration;
  
 +import uk.org.taverna.scufl2.api.io.WriterException;
 +
  /**
   * Bridge to remote runs via RMI.
   * 
@@@ -441,26 -374,10 +376,16 @@@ public abstract class AbstractRemoteRun
  	 * @throws JAXBException
  	 *             If serialization fails.
  	 */
 -	protected String serializeWorkflow(Workflow workflow) throws JAXBException {
 -		return workflow.marshal();
 +	protected byte[] serializeWorkflow(Workflow workflow) throws JAXBException {
 +		try {
 +			return workflow.getScufl2Bytes();
 +		} catch (IOException e) {
 +			throw new JAXBException("problem converting to scufl2", e);
 +		} catch (WriterException e) {
 +			throw new JAXBException("problem converting to scufl2", e);
 +		}
  	}
  
- 	@Override
- 	public boolean isAllowingRunsToStart() {
- 		try {
- 			return state.getOperatingLimit() > getOperatingCount();
- 		} catch (Exception e) {
- 			log.info("failed to get operating run count", e);
- 			return false;
- 		}
- 	}
- 
  	/**
  	 * Make a Remote object that can act as a consumer for usage records.
  	 * 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
----------------------------------------------------------------------
diff --cc server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
index 0ebdad2,0449471..dccfeac
--- a/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
@@@ -461,8 -345,8 +345,8 @@@ public class ForkRunFactory extends Abs
  	 * @throws RemoteException
  	 *             If anything fails (communications error, etc.)
  	 */
- 	private RemoteSingleRun getRealRun(@NonNull UsernamePrincipal creator,
- 			@NonNull byte[] wf, UUID id) throws RemoteException {
+ 	private RemoteSingleRun getRealRun(@Nonnull UsernamePrincipal creator,
 -			@Nonnull String wf, UUID id) throws RemoteException {
++			@Nonnull byte[] wf, UUID id) throws RemoteException {
  		String globaluser = "Unknown Person";
  		if (creator != null)
  			globaluser = creator.getName();

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
----------------------------------------------------------------------
diff --cc server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
index 88e136b,6edf128..1115f25
--- a/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
@@@ -431,8 -271,8 +271,8 @@@ public class IdAwareForkRunFactory exte
  	 * @throws RemoteException
  	 *             If anything fails (communications error, etc.)
  	 */
- 	private RemoteSingleRun getRealRun(@NonNull UsernamePrincipal creator,
- 			@NonNull String username, @NonNull byte[] wf, UUID id)
+ 	private RemoteSingleRun getRealRun(@Nonnull UsernamePrincipal creator,
 -			@Nonnull String username, @Nonnull String wf, UUID id)
++			@Nonnull String username, @Nonnull byte[] wf, UUID id)
  			throws RemoteException {
  		String globaluser = "Unknown Person";
  		if (creator != null)

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerDirectoryREST.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerREST.java
----------------------------------------------------------------------
diff --cc server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerREST.java
index c18cfd8,1e9f4a2..62158bb
--- a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerREST.java
@@@ -5,8 -5,20 +5,21 @@@
   */
  package org.taverna.server.master.rest;
  
+ import static org.taverna.server.master.common.Namespaces.SERVER;
  import static org.taverna.server.master.common.Roles.USER;
+ import static org.taverna.server.master.rest.ContentTypes.JSON;
+ import static org.taverna.server.master.rest.ContentTypes.URI_LIST;
+ import static org.taverna.server.master.rest.ContentTypes.XML;
+ import static org.taverna.server.master.rest.TavernaServerREST.PathNames.POL;
+ import static org.taverna.server.master.rest.TavernaServerREST.PathNames.POL_CAPABILITIES;
+ import static org.taverna.server.master.rest.TavernaServerREST.PathNames.POL_NOTIFIERS;
+ import static org.taverna.server.master.rest.TavernaServerREST.PathNames.POL_OP_LIMIT;
+ import static org.taverna.server.master.rest.TavernaServerREST.PathNames.POL_PERM_LIST;
+ import static org.taverna.server.master.rest.TavernaServerREST.PathNames.POL_PERM_WF;
+ import static org.taverna.server.master.rest.TavernaServerREST.PathNames.POL_RUN_LIMIT;
+ import static org.taverna.server.master.rest.TavernaServerREST.PathNames.ROOT;
+ import static org.taverna.server.master.rest.TavernaServerREST.PathNames.RUNS;
 +import static org.taverna.server.master.rest.handler.Scufl2DocumentHandler.SCUFL2;
  import static org.taverna.server.master.rest.handler.T2FlowDocumentHandler.T2FLOW;
  
  import java.net.URI;
@@@ -25,15 -39,14 +40,16 @@@ import javax.ws.rs.core.Context
  import javax.ws.rs.core.Response;
  import javax.ws.rs.core.UriBuilder;
  import javax.ws.rs.core.UriInfo;
- import javax.xml.bind.annotation.XmlAttribute;
  import javax.xml.bind.annotation.XmlElement;
  import javax.xml.bind.annotation.XmlRootElement;
 +import javax.xml.bind.annotation.XmlSchemaType;
- import javax.xml.bind.annotation.XmlTransient;
  import javax.xml.bind.annotation.XmlType;
 +import javax.xml.bind.annotation.XmlValue;
  
+ import org.apache.abdera.model.Entry;
+ import org.apache.abdera.model.Feed;
  import org.apache.cxf.jaxrs.model.wadl.Description;
+ import org.taverna.server.master.common.Capability;
  import org.taverna.server.master.common.RunReference;
  import org.taverna.server.master.common.Uri;
  import org.taverna.server.master.common.VersionedElement;
@@@ -42,13 -56,10 +59,10 @@@ import org.taverna.server.master.except
  import org.taverna.server.master.exceptions.NoUpdateException;
  import org.taverna.server.master.exceptions.UnknownRunException;
  import org.taverna.server.master.interfaces.TavernaRun;
- import org.taverna.server.master.notification.atom.AbstractEvent;
  import org.taverna.server.master.soap.TavernaServerSOAP;
  
- import edu.umd.cs.findbugs.annotations.NonNull;
- 
  /**
 - * The REST service interface to Taverna 2.5.4 Server.
 + * The REST service interface to Taverna 3 Server.
   * 
   * @author Donal Fellows
   * @see TavernaServerSOAP
@@@ -97,13 -116,14 +119,14 @@@ public interface TavernaServerREST 
  	 *             If the POST failed.
  	 */
  	@POST
- 	@Path("runs")
- 	@Consumes({ T2FLOW, SCUFL2, "application/xml" })
+ 	@Path(RUNS)
 -	@Consumes({ T2FLOW, XML })
++	@Consumes({ T2FLOW, SCUFL2, XML })
  	@RolesAllowed(USER)
- 	@Description("Accepts (or not) a request to create a new run executing the given workflow.")
- 	@NonNull
- 	Response submitWorkflow(@NonNull Workflow workflow,
- 			@NonNull @Context UriInfo ui) throws NoUpdateException;
+ 	@Description("Accepts (or not) a request to create a new run executing "
+ 			+ "the given workflow.")
+ 	@Nonnull
+ 	Response submitWorkflow(@Nonnull Workflow workflow,
+ 			@Nonnull @Context UriInfo ui) throws NoUpdateException;
  
  	/**
  	 * Accepts (or not) a request to create a new run executing the workflow at
@@@ -116,17 -136,27 +139,26 @@@
  	 * @return A response to the POST describing what was created.
  	 * @throws NoUpdateException
  	 *             If the POST failed.
 -	 * @throws NoCreateException
 -	 *             If the workflow couldn't be read into the server or the
 -	 *             engine rejects it.
 +	 * @throw NoCreateException If the workflow couldn't be read into the server
 +	 *        or the engine rejects it.
  	 */
  	@POST
- 	@Path("runs")
- 	@Consumes("application/xml")
+ 	@Path(RUNS)
+ 	@Consumes(URI_LIST)
  	@RolesAllowed(USER)
- 	@Description("Accepts a wrapped URL to a workflow to download and run. The URL must be hosted on a publicly-accessible service.")
- 	@NonNull
- 	Response submitWorkflowByURL(@NonNull WorkflowReference workflowReference,
- 			@NonNull @Context UriInfo ui) throws NoUpdateException;
+ 	@Description("Accepts a URL to a workflow to download and run. The URL "
+ 			+ "must be hosted on a publicly-accessible service.")
+ 	@Nonnull
+ 	Response submitWorkflowByURL(@Nonnull List<URI> referenceList,
+ 			@Nonnull @Context UriInfo ui) throws NoCreateException,
+ 			NoUpdateException;
+ 
+ 	/** Get an outline of the operations supported. */
+ 	@OPTIONS
+ 	@Path(RUNS)
+ 	@Description("Produces the description of the operations on the "
+ 			+ "collection of runs.")
+ 	Response runsOptions();
  
  	/**
  	 * @return A description of the policies supported by this server.
@@@ -488,50 -581,9 +583,22 @@@
  		 */
  		@GET
  		@Path("{id}")
- 		@Produces({ "application/xml", "application/json",
- 				"application/atom+xml;type=entry" })
+ 		@Produces("application/atom+xml;type=entry")
  		@Description("Get a particular Atom event.")
- 		@NonNull
- 		AbstractEvent getEvent(@NonNull @PathParam("id") String id);
- 	}
- 
- 	/**
- 	 * A description of an collection of events.
- 	 * 
- 	 * @author Donal Fellows
- 	 */
- 	@XmlType(name = "Events")
- 	public static abstract class Events extends VersionedElement {
- 		/**
- 		 * @return The owner of the events in question.
- 		 */
- 		@XmlAttribute
- 		public abstract String getOwner();
- 
- 		/**
- 		 * @return The actual list of events.
- 		 */
- 		@XmlElement
- 		public abstract List<AbstractEvent> getEvents();
- 
- 		/**
- 		 * @param id
- 		 *            The identifier of a particular event.
- 		 * @return The details about that event.
- 		 */
- 		public abstract AbstractEvent getEvent(String id);
+ 		@Nonnull
+ 		Entry getEvent(@Nonnull @PathParam("id") String id);
  	}
 +
 +	/**
 +	 * A reference to a workflow hosted on some public HTTP server.
 +	 * 
 +	 * @author Donal Fellows
 +	 */
 +	@XmlRootElement(name = "workflowurl")
 +	@XmlType(name = "WorkflowReference")
 +	public static class WorkflowReference {
 +		@XmlValue
 +		@XmlSchemaType(name = "anyURI")
 +		public URI url;
 +	}
  }

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerRunREST.java
----------------------------------------------------------------------
diff --cc server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerRunREST.java
index 335b05c,536c455..2b328fd
--- a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerRunREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerRunREST.java
@@@ -8,8 -8,30 +8,32 @@@ package org.taverna.server.master.rest
  import static javax.ws.rs.core.UriBuilder.fromUri;
  import static org.joda.time.format.ISODateTimeFormat.basicDateTime;
  import static org.taverna.server.master.common.Roles.USER;
 +import static org.taverna.server.master.rest.handler.Scufl2DocumentHandler.SCUFL2;
  import static org.taverna.server.master.interaction.InteractionFeedSupport.FEED_URL_DIR;
+ import static org.taverna.server.master.rest.ContentTypes.JSON;
+ import static org.taverna.server.master.rest.ContentTypes.ROBUNDLE;
+ import static org.taverna.server.master.rest.ContentTypes.TEXT;
+ import static org.taverna.server.master.rest.ContentTypes.XML;
+ import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.DIR;
+ import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.GENERATE_PROVENANCE;
+ import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.IN;
+ import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.LISTEN;
+ import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.LOG;
+ import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.NAME;
+ import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.OUT;
++import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.PROFILE;
+ import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.ROOT;
+ import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.RUNBUNDLE;
+ import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.SEC;
+ import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.STATUS;
+ import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.STDERR;
+ import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.STDOUT;
+ import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.T_CREATE;
+ import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.T_EXPIRE;
+ import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.T_FINISH;
+ import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.T_START;
+ import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.USAGE;
+ import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.WF;
  import static org.taverna.server.master.rest.handler.T2FlowDocumentHandler.T2FLOW;
  
  import java.net.URI;
@@@ -93,39 -124,50 +127,84 @@@ public interface TavernaServerRunREST 
  	 * @return The workflow document.
  	 */
  	@GET
- 	@Path("workflow")
- 	@Produces({ T2FLOW, SCUFL2, "application/xml", "application/json" })
+ 	@Path(WF)
 -	@Produces({ T2FLOW, XML, JSON })
++	@Produces({ T2FLOW, SCUFL2, XML, JSON })
  	@Description("Gives the workflow document used to create the workflow run.")
- 	@NonNull
+ 	@Nonnull
  	public Workflow getWorkflow();
  
+ 	/** Get an outline of the operations supported. */
+ 	@OPTIONS
+ 	@Path(WF)
+ 	@Description("Produces the description of the run workflow.")
+ 	Response workflowOptions();
+ 
+ 	/** Get the workflow name. */
+ 	@GET
+ 	@Path(NAME)
+ 	@Produces(TEXT)
+ 	@Description("Gives the descriptive name of the workflow run.")
+ 	@Nonnull
+ 	public String getName();
+ 
+ 	/**
+ 	 * Set the workflow name.
+ 	 * 
+ 	 * @throws NoUpdateException
+ 	 *             If the user is not permitted to change the workflow.
+ 	 */
+ 	@PUT
+ 	@Path(NAME)
+ 	@Consumes(TEXT)
+ 	@Produces(TEXT)
+ 	@Description("Set the descriptive name of the workflow run. Note that "
+ 			+ "this value may be arbitrarily truncated by the implementation.")
+ 	@Nonnull
+ 	public String setName(String name) throws NoUpdateException;
+ 
+ 	/** Produce the workflow name HTTP operations. */
+ 	@OPTIONS
+ 	@Path(NAME)
+ 	@Description("Produces the description of the operations on the run's "
+ 			+ "descriptive name.")
+ 	@Nonnull
+ 	Response nameOptions();
+ 
  	/**
 +	 * Produces the name of the workflow's main profile.
 +	 * 
 +	 * @return The main profile name, or the empty string if there is no such
 +	 *         profile.
 +	 */
 +	@GET
- 	@Path("profile")
- 	@Produces("text/plain")
++	@Path(PROFILE)
++	@Produces(TEXT)
 +	@Description("Gives the name of the workflow's main profile, or the empty string if none is defined.")
- 	@NonNull
++	@Nonnull
 +	String getMainProfileName();
 +
 +	/**
 +	 * Get a description of the profiles supported by the workflow document used
 +	 * to create this run.
 +	 * 
 +	 * @return A description of the supported profiles.
 +	 */
 +	@GET
- 	@Path("profile")
- 	@Produces({ "application/xml", "application/json" })
++	@Path(PROFILE)
++	@Produces({ XML, JSON })
 +	@Description("Describes what profiles exist on the workflow.")
- 	@NonNull
++	@Nonnull
 +	ProfileList getProfiles();
 +
++	/** Produce the workflow profile HTTP operations. */
++	@OPTIONS
++	@Path(PROFILE)
++	@Description("Produces the description of the operations on the run's "
++			+ "profile.")
++	@Nonnull
++	Response profileOptions();
++
 +	/**
  	 * Returns a resource that represents the workflow run's security
  	 * properties. These may only be accessed by the owner.
  	 * 
@@@ -346,6 -433,155 +470,156 @@@
  	InteractionFeedREST getInteractionFeed();
  
  	/**
+ 	 * @return The stdout for the workflow run, or empty string if the run has
+ 	 *         not yet started.
+ 	 * @throws NoListenerException
+ 	 */
+ 	@GET
+ 	@Path(STDOUT)
+ 	@Description("Return the stdout for the workflow run.")
+ 	@Produces(TEXT)
+ 	@Nonnull
+ 	String getStdout() throws NoListenerException;
+ 
+ 	/** Get an outline of the operations supported. */
+ 	@OPTIONS
+ 	@Path(STDOUT)
+ 	@Description("Return the stdout for the workflow run.")
+ 	Response stdoutOptions();
+ 
+ 	/**
+ 	 * @return The stderr for the workflow run, or empty string if the run has
+ 	 *         not yet started.
+ 	 * @throws NoListenerException
+ 	 */
+ 	@GET
+ 	@Path(STDERR)
+ 	@Description("Return the stderr for the workflow run.")
+ 	@Produces(TEXT)
+ 	@Nonnull
+ 	String getStderr() throws NoListenerException;
+ 
+ 	/** Get an outline of the operations supported. */
+ 	@OPTIONS
+ 	@Path(STDERR)
+ 	@Description("Return the stderr for the workflow run.")
+ 	Response stderrOptions();
+ 
+ 	/**
+ 	 * @return The usage record for the workflow run, wrapped in a Response, or
+ 	 *         "empty content" if the run has not yet finished.
+ 	 * @throws NoListenerException
+ 	 * @throws JAXBException
+ 	 */
+ 	@GET
+ 	@Path(USAGE)
+ 	@Description("Return the usage record for the workflow run.")
+ 	@Produces(XML)
+ 	@Nonnull
+ 	Response getUsage() throws NoListenerException, JAXBException;
+ 
+ 	/** Get an outline of the operations supported. */
+ 	@OPTIONS
+ 	@Path(USAGE)
+ 	@Description("Return the usage record for the workflow run.")
+ 	Response usageOptions();
+ 
+ 	/**
+ 	 * @return The log for the workflow run, or empty string if the run has not
+ 	 *         yet started.
+ 	 */
+ 	@GET
+ 	@Path(LOG)
+ 	@Description("Return the log for the workflow run.")
+ 	@Produces(TEXT)
+ 	@Nonnull
+ 	Response getLogContents();
+ 
+ 	/** Get an outline of the operations supported. */
+ 	@OPTIONS
+ 	@Path(LOG)
+ 	@Description("Return the log for the workflow run.")
+ 	Response logOptions();
+ 
+ 	/**
+ 	 * @return The log for the workflow run, or empty string if the run has not
+ 	 *         yet started.
+ 	 */
+ 	@GET
+ 	@Path(RUNBUNDLE)
+ 	@Description("Return the run bundle for the workflow run.")
+ 	@Produces(ROBUNDLE)
+ 	@Nonnull
+ 	Response getRunBundle();
+ 
+ 	/** Get an outline of the operations supported. */
+ 	@OPTIONS
+ 	@Path(RUNBUNDLE)
+ 	@Description("Return the run bundle for the workflow run.")
+ 	Response runBundleOptions();
+ 
+ 	/**
+ 	 * @return Whether to create the run bundle for the workflow run. Only
+ 	 *         usefully set-able before the start of the run.
+ 	 */
+ 	@GET
+ 	@Path(GENERATE_PROVENANCE)
+ 	@Description("Whether to create the run bundle for the workflow run.")
+ 	@Produces(TEXT)
+ 	@Nonnull
+ 	boolean getGenerateProvenance();
+ 
+ 	/**
+ 	 * @param provenanceFlag
+ 	 *            Whether to create the run bundle for the workflow run. Only
+ 	 *            usefully set-able before the start of the run.
+ 	 * @return What it was actually set to.
+ 	 * @throws NoUpdateException 
+ 	 */
+ 	@PUT
+ 	@Path(GENERATE_PROVENANCE)
+ 	@Description("Whether to create the run bundle for the workflow run.")
+ 	@Consumes(TEXT)
+ 	@Produces(TEXT)
+ 	@Nonnull
+ 	boolean setGenerateProvenance(boolean provenanceFlag) throws NoUpdateException;
+ 
+ 	/** Get an outline of the operations supported. */
+ 	@OPTIONS
+ 	@Path(GENERATE_PROVENANCE)
+ 	@Description("Whether to create the run bundle for the workflow run.")
+ 	Response generateProvenanceOptions();
+ 
+ 	/**
+ 	 * Factored out path names used in the {@link TavernaServerRunREST}
+ 	 * interface and related places.
+ 	 * 
+ 	 * @author Donal Fellows
+ 	 */
+ 	interface PathNames {
+ 		public static final String ROOT = "/";
+ 		public static final String WF = "workflow";
+ 		public static final String DIR = "wd";
+ 		public static final String NAME = "name";
+ 		public static final String T_EXPIRE = "expiry";
+ 		public static final String T_CREATE = "createTime";
+ 		public static final String T_START = "startTime";
+ 		public static final String T_FINISH = "finishTime";
+ 		public static final String STATUS = "status";
+ 		public static final String IN = "input";
+ 		public static final String OUT = "output";
++		public static final String PROFILE = "profile";
+ 		public static final String LISTEN = "listeners";
+ 		public static final String SEC = "security";
+ 		public static final String STDOUT = "stdout";
+ 		public static final String STDERR = "stderr";
+ 		public static final String USAGE = "usage";
+ 		public static final String LOG = "log";
+ 		public static final String RUNBUNDLE = "run-bundle";
+ 		public static final String GENERATE_PROVENANCE = "generate-provenance";
+ 	}
+ 
+ 	/**
  	 * The description of where everything is in a RESTful view of a workflow
  	 * run. Done with JAXB.
  	 * 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-webapp/src/main/java/org/taverna/server/master/rest/handler/T2FlowDocumentHandler.java
----------------------------------------------------------------------
diff --cc server-webapp/src/main/java/org/taverna/server/master/rest/handler/T2FlowDocumentHandler.java
index 56419dc,78ee822..4227d80
--- a/server-webapp/src/main/java/org/taverna/server/master/rest/handler/T2FlowDocumentHandler.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/rest/handler/T2FlowDocumentHandler.java
@@@ -44,10 -43,10 +42,10 @@@ public class T2FlowDocumentHandler impl
  	private static final MediaType T2FLOW_TYPE = new MediaType("application",
  			"vnd.taverna.t2flow+xml");
  	public static final String T2FLOW = "application/vnd.taverna.t2flow+xml";
 -	private static final String T2FLOW_ROOTNAME = "workflow";
 -	private static final String T2FLOW_NS = "http://taverna.sf.net/2008/xml/t2flow";
 +	public static final String T2FLOW_ROOTNAME = "workflow";
 +	public static final String T2FLOW_NS = "http://taverna.sf.net/2008/xml/t2flow";
- 	private DocumentBuilder db;
- 	private Transformer transformer;
+ 	private DocumentBuilderFactory db;
+ 	private TransformerFactory transformer;
  
  	public T2FlowDocumentHandler() throws ParserConfigurationException,
  			TransformerConfigurationException {
@@@ -73,11 -70,14 +69,13 @@@
  			throws IOException, WebApplicationException {
  		Document doc;
  		try {
- 			doc = db.parse(entityStream);
+ 			doc = db.newDocumentBuilder().parse(entityStream);
  		} catch (SAXException e) {
  			throw new WebApplicationException(e, 403);
+ 		} catch (ParserConfigurationException e) {
+ 			throw new WebApplicationException(e);
  		}
 -		Workflow workflow = new Workflow();
 -		workflow.content = new Element[] { doc.getDocumentElement() };
 +		Workflow workflow = new Workflow(doc.getDocumentElement());
  		if (doc.getDocumentElement().getNamespaceURI().equals(T2FLOW_NS)
  				&& doc.getDocumentElement().getNodeName()
  						.equals(T2FLOW_ROOTNAME))
@@@ -108,9 -108,12 +106,12 @@@
  			OutputStream entityStream) throws IOException,
  			WebApplicationException {
  		try {
- 			transformer.transform(new DOMSource(workflow.getT2flowWorkflow()),
+ 			transformer.newTransformer().transform(
 -					new DOMSource(workflow.content[0]),
++					new DOMSource(workflow.getT2flowWorkflow()),
  					new StreamResult(entityStream));
  		} catch (TransformerException e) {
+ 			if (e.getCause() != null && e.getCause() instanceof IOException)
+ 				throw (IOException) e.getCause();
  			throw new WebApplicationException(e);
  		}
  	}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-webapp/src/main/java/org/taverna/server/master/rest/handler/URIListHandler.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-webapp/src/main/java/org/taverna/server/master/soap/TavernaServerSOAP.java
----------------------------------------------------------------------
diff --cc server-webapp/src/main/java/org/taverna/server/master/soap/TavernaServerSOAP.java
index d593149,72aca5e..69bca0f
--- a/server-webapp/src/main/java/org/taverna/server/master/soap/TavernaServerSOAP.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/soap/TavernaServerSOAP.java
@@@ -9,21 -9,22 +9,25 @@@ import static org.taverna.server.master
  import static org.taverna.server.master.common.Roles.USER;
  
  import java.net.URI;
 +import java.net.URL;
  import java.util.Date;
+ import java.util.List;
  
  import javax.annotation.security.RolesAllowed;
  import javax.jws.WebMethod;
  import javax.jws.WebParam;
  import javax.jws.WebResult;
  import javax.jws.WebService;
+ import javax.xml.bind.annotation.XmlElement;
  
  import org.apache.cxf.annotations.WSDLDocumentation;
+ import org.ogf.usage.JobUsageRecord;
+ import org.taverna.server.master.common.Capability;
  import org.taverna.server.master.common.Credential;
 +import org.taverna.server.master.common.DirEntryReference;
  import org.taverna.server.master.common.InputDescription;
  import org.taverna.server.master.common.Permission;
 +import org.taverna.server.master.common.ProfileList;
  import org.taverna.server.master.common.RunReference;
  import org.taverna.server.master.common.Status;
  import org.taverna.server.master.common.Trust;
@@@ -63,37 -66,8 +69,38 @@@ public interface TavernaServerSOAP 
  	 */
  	@WebResult(name = "Run")
  	@WSDLDocumentation("Make a run for a particular workflow.")
- 	RunReference submitWorkflow(@WebParam(name = "workflow") Workflow workflow)
- 			throws NoUpdateException, NoCreateException;
+ 	RunReference submitWorkflow(
+ 			@WebParam(name = "workflow") @XmlElement(required = true) Workflow workflow)
++					throws NoUpdateException, NoCreateException;
 +
 +	/**
 +	 * Make a run for a particular workflow.
 +	 * 
 +	 * @param workflow
 +	 *            The workflow to instantiate.
 +	 * @return Annotated handle for created run.
 +	 * @throws NoUpdateException
 +	 * @throws NoCreateException
 +	 */
 +	@WebResult(name = "Run")
 +	@WSDLDocumentation("Make a run for a particular workflow.")
 +	RunReference submitWorkflowMTOM(
- 			@WebParam(name = "workflow") WrappedWorkflow workflow)
++			@WebParam(name = "workflow") @XmlElement(required = true) WrappedWorkflow workflow)
 +			throws NoUpdateException;
 +
 +	/**
 +	 * Make a run for a workflow at a particular URL.
 +	 * 
 +	 * @param workflowURL
 +	 *            The public URL of the workflow to instantiate.
 +	 * @return Annotated handle for created run.
 +	 * @throws NoUpdateException
 +	 * @throws NoCreateException
 +	 */
 +	@WebResult(name = "Run")
 +	@WSDLDocumentation("Make a run for a workflow at a particular public URL.")
 +	RunReference submitWorkflowReference(
- 			@WebParam(name = "reference") URL workflowURL)
++			@WebParam(name = "reference") @XmlElement(required = true) URL workflowURL)
  			throws NoUpdateException, NoCreateException;
  
  	/**
@@@ -183,39 -179,44 +212,77 @@@
  			throws UnknownRunException;
  
  	/**
 +	 * Get the workflow document used to create the given run.
 +	 * 
 +	 * @param runName
 +	 *            The handle of the run.
 +	 * @return The workflow document.
 +	 * @throws UnknownRunException
 +	 *             If the server doesn't know about the run or if the user is
 +	 *             not permitted to see it.
 +	 */
 +	@WebResult(name = "CreationWorkflow")
 +	@WSDLDocumentation("Get the workflow document used to create the given run.")
 +	WrappedWorkflow getRunWorkflowMTOM(
 +			@WebParam(name = "runName") String runName)
 +			throws UnknownRunException;
 +
 +	/**
 +	 * Get a description of the profiles supported by the workflow document used
 +	 * to create the given run.
 +	 * 
 +	 * @param runName
 +	 *            The handle of the run.
 +	 * @return A description of the supported profiles.
 +	 * @throws UnknownRunException
 +	 *             If the server doesn't know about the run or if the user is
 +	 *             not permitted to see it.
 +	 */
 +	@WebResult(name = "Profiles")
 +	@WSDLDocumentation("Get a description of the profiles supported by the workflow document used to create the given run.")
 +	ProfileList getRunWorkflowProfiles(
 +			@WebParam(name = "runName") String runName)
 +			throws UnknownRunException;
 +
 +	/**
+ 	 * Get the descriptive name of the workflow run. The descriptive name
+ 	 * carries no deep information.
+ 	 * 
+ 	 * @param runName
+ 	 *            The handle of the run.
+ 	 * @return The descriptive name of the run.
+ 	 * @throws UnknownRunException
+ 	 *             If the server doesn't know about the run or if the user is
+ 	 *             not permitted to see it.
+ 	 */
+ 	@WebResult(name = "DescriptiveName")
+ 	@WSDLDocumentation("Get the descriptive name of the workflow run. Carries no deep information.")
+ 	String getRunDescriptiveName(
+ 			@WebParam(name = "runName") @XmlElement(required = true) String runName)
+ 			throws UnknownRunException;
+ 
+ 	/**
+ 	 * Set the descriptive name of the workflow run. The descriptive name
+ 	 * carries no deep information.
+ 	 * 
+ 	 * @param runName
+ 	 *            The handle of the run.
+ 	 * @param descriptiveName
+ 	 *            The new descriptive name to set. Note that the implementation
+ 	 *            is allowed to arbitrarily truncate this value.
+ 	 * @throws UnknownRunException
+ 	 *             If the server doesn't know about the run or if the user is
+ 	 *             not permitted to see it.
+ 	 * @throws NoUpdateException
+ 	 *             If the user is not permitted to update this run.
+ 	 */
+ 	@WSDLDocumentation("Set the descriptive name of the workflow run. Carries no deep information.")
+ 	void setRunDescriptiveName(
+ 			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+ 			@WebParam(name = "descriptiveName") @XmlElement(required = true) String descriptiveName)
+ 			throws UnknownRunException, NoUpdateException;
+ 
+ 	/**
  	 * Get the description of the inputs to the workflow run.
  	 * 
  	 * @param runName

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-webapp/src/main/replacementscripts/executeworkflow.sh
----------------------------------------------------------------------
diff --cc server-webapp/src/main/replacementscripts/executeworkflow.sh
index a2cf39f,23b2ebe..e698aa1
--- a/server-webapp/src/main/replacementscripts/executeworkflow.sh
+++ b/server-webapp/src/main/replacementscripts/executeworkflow.sh
@@@ -8,7 -8,7 +8,7 @@@ permsize=-XX:MaxPermSize=140
  
  ## Parse the command line to extract the pieces to move around to before or
  ## after the JAR filename...
--pre=
++pre=-Djava.awt.headless=true 
  post=
  for arg
  do
@@@ -48,18 -48,24 +48,21 @@@ RUNID_PROP
  if test x != "x$TAVERNA_RUN_ID"; then
      RUNID_PROP="-Dtaverna.runid=$TAVERNA_RUN_ID"
  fi
--INTERACTION_PROPS= 
++INTERACTION_PROPS=-Dtaverna.interaction.ignore_requests=true
  if test x != "x$INTERACTION_HOST"; then
--    INTERACTION_PROPS="-Dtaverna.interaction.host=$INTERACTION_HOST"
++    INTERACTION_PROPS="$INTERACTION_PROPS -Dtaverna.interaction.host=$INTERACTION_HOST"
      INTERACTION_PROPS="$INTERACTION_PROPS -Dtaverna.interaction.port=$INTERACTION_PORT"
      INTERACTION_PROPS="$INTERACTION_PROPS -Dtaverna.interaction.webdav_path=$INTERACTION_WEBDAV"
      INTERACTION_PROPS="$INTERACTION_PROPS -Dtaverna.interaction.feed_path=$INTERACTION_FEED"
  fi
  
+ MainClass=net.sf.taverna.t2.commandline.CommandLineLauncher
+ 
+ echo "pid:$$"
  exec "$javabin" $memlimit $permsize \
 -  "-Draven.profile=file://$taverna_home/conf/current-profile.xml" \
 -  "-Dtaverna.startup=$taverna_home" $RAVEN_APPHOME_PROP $RUNID_PROP \
 -  $INTERACTION_PROPS $pre \
 -  -Djava.system.class.loader=net.sf.taverna.raven.prelauncher.BootstrapClassLoader \
 -  -Draven.launcher.app.main=$MainClass \
 -  -Draven.launcher.show_splashscreen=false \
 -  -Djava.awt.headless=true -Dtaverna.interaction.ignore_requests=true \
 -  -jar "$taverna_home/lib/"prelauncher-*.jar \
 -  "$@"
 +  "-Dlog4j.configuration=file://$taverna_home/conf/log4j.properties " \
 +  "-Djava.util.logging.config.file=$taverna_home/conf/logging.properties " \
 +  "-Dtaverna.app.startup=$taverna_home" \
 +  $APPHOME_PROP $RUNID_PROP $INTERACTION_PROPS $pre \
 +  -jar "$taverna_home/lib/taverna-command-line-0.1.1.jar" \
 +  ${1+"$@"}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-webapp/src/main/resources/welcome.html
----------------------------------------------------------------------
diff --cc server-webapp/src/main/resources/welcome.html
index 8ff7e14,81b3b06..f80da4a
--- a/server-webapp/src/main/resources/welcome.html
+++ b/server-webapp/src/main/resources/welcome.html
@@@ -2,19 -2,12 +2,19 @@@
  <html>
  <head>
  <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
- <title>Taverna Server 3</title>
+ <title>Taverna Server %{VERSION}</title>
  </head>
  <body>
- <h1>Taverna Server 3</h1>
+ <h1>Taverna Server %{VERSION}</h1>
 +<div style="text-align;center">
 +	<p>
 +		<i>Note that this is a pre-release version. Significant known
 +			issues remain open and it is not guaranteed that the service API
 +			will be stable.</i>
 +	</p>
 +</div>
  <p>For a full list of operations, see the <a
-     href="SERVICE_URI/services">service listing</a> generated by Apache
+     href="%{BASEURL}/services">service listing</a> generated by Apache
  CXF, which indicates where to access the WSDL and WADL descriptions of
  the T2Server interface.</p>
  <p>What follows below is a simple guide to using the server. It does

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-webapp/src/main/webapp/WEB-INF/providers.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-webapp/src/main/webapp/WEB-INF/webappBeans.xml
----------------------------------------------------------------------
diff --cc server-webapp/src/main/webapp/WEB-INF/webappBeans.xml
index 7bc603c,9d2af65..1b979b4
--- a/server-webapp/src/main/webapp/WEB-INF/webappBeans.xml
+++ b/server-webapp/src/main/webapp/WEB-INF/webappBeans.xml
@@@ -92,9 -92,10 +92,11 @@@
  			<ref bean="MessagingProvider.InputStream" />
  			<ref bean="MessagingProvider.T2flow" />
  			<ref bean="MessagingProvider.Permission" />
 -			<ref bean="MessagingProvider.ZipStream"/>
 +			<ref bean="MessagingProvider.URIList" />
 +			<ref bean="MessagingProvider.ZipStream" />
  			<ref bean="jsonProvider" />
+ 			<ref bean="atomEntryHandler" />
+ 			<ref bean="atomFeedHandler" />
  		</jaxrs:providers>
  		<jaxrs:outInterceptors>
  			<ref bean="Interceptor.FlushThreadLocalCache" />
@@@ -143,17 -145,19 +146,27 @@@
  
  	<bean id="root_facade" class="org.taverna.server.master.facade.Facade">
  		<property name="file" value="/welcome.html" />
- 		<property name="pattern" value="SERVICE_URI/" />
+ 		<property name="contextualizer" ref="contextualizer" />
  	</bean>
  
+ 	<bean class="org.taverna.server.master.common.Uri.Rewriter"
+ 		autowire="byType" id="URI-Rewriter-Thunk">
+ 		<property name="suppressSecurity" value="${suppressRewriteEngine}" />
+ 		<property name="rewriteTarget" value="${default.webapp}" />
+ 	</bean>
+ 	<security:authentication-manager>
+ 		<security:authentication-provider ref="workflowInternalAuthProvder" />
+ 		<security:authentication-provider ref="authProvider" />
+ 	</security:authentication-manager>
+ 
 +	<bean id="WSDLHeadOptionsInterceptor"
 +		class="org.taverna.server.master.utils.WSDLHeadOptionsInterceptor" />
 +	<cxf:bus>
 +		<cxf:inInterceptors>
 +			<ref bean="WSDLHeadOptionsInterceptor" />
 +		</cxf:inInterceptors>
 +	</cxf:bus>
 +
  	<aop:aspectj-autoproxy proxy-target-class="true" />
  	<security:global-method-security
  		jsr250-annotations="enabled" />

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ad1aa3b5/server-webapp/src/test/java/org/taverna/server/master/JaxbSanityTest.java
----------------------------------------------------------------------
diff --cc server-webapp/src/test/java/org/taverna/server/master/JaxbSanityTest.java
index dd4d3b9,3b6f75d..79c026b
--- a/server-webapp/src/test/java/org/taverna/server/master/JaxbSanityTest.java
+++ b/server-webapp/src/test/java/org/taverna/server/master/JaxbSanityTest.java
@@@ -243,11 -245,21 +246,26 @@@ public class JaxbSanityTest 
  	}
  
  	@Test
 +	public void testJAXBForProfileList() throws Exception {
 +		testJAXB(ProfileList.class);
 +	}
 +
 +	@Test
+ 	public void testJAXBForDirEntry() throws Exception {
+ 		testJAXB(DirEntry.class);
+ 	}
+ 
+ 	@Test
+ 	public void testJAXBForCapability() throws Exception {
+ 		testJAXB(Capability.class);
+ 	}
+ 
+ 	@Test
+ 	public void testJAXBForCapabilityList() throws Exception {
+ 		testJAXB(CapabilityList.class);
+ 	}
+ 
+ 	@Test
  	public void testJAXBForEverythingREST() throws Exception {
  		testJAXB(DirEntryReference.class, InputDescription.class,
  				RunReference.class, Workflow.class, Status.class,
@@@ -264,16 -276,16 +282,16 @@@
  				TavernaServerSecurityREST.Descriptor.class,
  				TavernaServerSecurityREST.PermissionDescription.class,
  				TavernaServerSecurityREST.PermissionsDescription.class,
- 				ProfileList.class);
 -				Capability.class, CapabilityList.class);
++				ProfileList.class, Capability.class, CapabilityList.class);
  	}
  
  	@Test
  	public void testJAXBForEverythingSOAP() throws Exception {
- 		testJAXB(DirEntryReference.class, FileContents.class,
- 				InputDescription.class, Permission.class, PermissionList.class,
+ 		testJAXB(DirEntry.class, FileContents.class, InputDescription.class,
+ 				Permission.class, PermissionList.class,
  				PermissionList.SinglePermissionMapping.class,
  				RunReference.class, Status.class, Trust.class, Uri.class,
- 				Workflow.class);
 -				Workflow.class, Capability.class);
++				ProfileList.class, Workflow.class, Capability.class);
  	}
  
  	@Test


[46/50] [abbrv] incubator-taverna-server git commit: Refactoring the persistence manager so it doesn't use thread-local storage as a cache in a way that I can't clear.

Posted by st...@apache.org.
Refactoring the persistence manager so it doesn't use thread-local
storage as a cache in a way that I can't clear.

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/d13e9a5d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/d13e9a5d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/d13e9a5d

Branch: refs/heads/master
Commit: d13e9a5db14faf71094dc33fbc29e1cfc3d99a03
Parents: 3465ccf
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Thu Aug 21 11:08:37 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Thu Aug 21 11:08:37 2014 +0100

----------------------------------------------------------------------
 .../master/usage/UsageRecordRecorder.java       |  2 -
 .../taverna/server/master/utils/JDOSupport.java | 76 +++++++++++++++-----
 server-webapp/src/main/webapp/WEB-INF/beans.xml | 15 ++--
 3 files changed, 68 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/d13e9a5d/server-webapp/src/main/java/org/taverna/server/master/usage/UsageRecordRecorder.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/usage/UsageRecordRecorder.java b/server-webapp/src/main/java/org/taverna/server/master/usage/UsageRecordRecorder.java
index 52fe73c..12de304 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/usage/UsageRecordRecorder.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/usage/UsageRecordRecorder.java
@@ -155,10 +155,8 @@ public class UsageRecordRecorder extends JDOSupport<UsageRecord> {
 		return result;
 	}
 
-	@Override
 	@PreDestroy
 	public void close() {
-		super.close();
 		if (writer != null)
 			writer.close();
 	}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/d13e9a5d/server-webapp/src/main/java/org/taverna/server/master/utils/JDOSupport.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/utils/JDOSupport.java b/server-webapp/src/main/java/org/taverna/server/master/utils/JDOSupport.java
index 9bfe8b4..b9cf1e6 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/utils/JDOSupport.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/utils/JDOSupport.java
@@ -9,8 +9,10 @@ import static java.lang.annotation.ElementType.METHOD;
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 import static org.apache.commons.logging.LogFactory.getLog;
 
+import java.lang.annotation.Documented;
 import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
+import java.util.WeakHashMap;
 
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
@@ -37,7 +39,7 @@ import org.springframework.beans.factory.annotation.Required;
  */
 public abstract class JDOSupport<T> {
 	private Class<T> contextClass;
-	PersistenceManager pm;
+	private PersistenceManagerBuilder pmb;
 
 	/**
 	 * Instantiate this class, supplying it a handle to the class that will be
@@ -51,18 +53,19 @@ public abstract class JDOSupport<T> {
 	}
 
 	/**
-	 * @param persistenceManagerFactory
+	 * @param persistenceManagerBuilder
 	 *            The JDO engine to use for managing persistence.
 	 */
 	@Required
-	public void setPersistenceManagerFactory(
-			PersistenceManagerFactory persistenceManagerFactory) {
-		pm = persistenceManagerFactory.getPersistenceManagerProxy();
+	public void setPersistenceManagerBuilder(
+			PersistenceManagerBuilder persistenceManagerBuilder) {
+		pmb = persistenceManagerBuilder;
 	}
 
-	@PreDestroy
-	public void close() {
-		pm.close();
+	private PersistenceManager pm() {
+		if (isPersistent())
+			return pmb.getPersistenceManager();
+		return null;
 	}
 
 	/**
@@ -72,7 +75,7 @@ public abstract class JDOSupport<T> {
 	 * @return Whether there is a persistence manager installed.
 	 */
 	protected boolean isPersistent() {
-		return pm != null;
+		return pmb != null;
 	}
 
 	/**
@@ -84,7 +87,7 @@ public abstract class JDOSupport<T> {
 	 */
 	@Nonnull
 	protected Query query(@Nonnull String filter) {
-		return pm.newQuery(contextClass, filter);
+		return pm().newQuery(contextClass, filter);
 	}
 
 	/**
@@ -98,7 +101,7 @@ public abstract class JDOSupport<T> {
 	 */
 	@Nonnull
 	protected Query namedQuery(@Nonnull String name) {
-		return pm.newNamedQuery(contextClass, name);
+		return pm().newNamedQuery(contextClass, name);
 	}
 
 	/**
@@ -113,7 +116,7 @@ public abstract class JDOSupport<T> {
 	protected T persist(@Nullable T value) {
 		if (value == null)
 			return null;
-		return pm.makePersistent(value);
+		return pm().makePersistent(value);
 	}
 
 	/**
@@ -128,7 +131,7 @@ public abstract class JDOSupport<T> {
 	protected T detach(@Nullable T value) {
 		if (value == null)
 			return null;
-		return pm.detachCopy(value);
+		return pm().detachCopy(value);
 	}
 
 	/**
@@ -141,7 +144,7 @@ public abstract class JDOSupport<T> {
 	@Nullable
 	protected T getById(Object id) {
 		try {
-			return pm.getObjectById(contextClass, id);
+			return pm().getObjectById(contextClass, id);
 		} catch (Exception e) {
 			return null;
 		}
@@ -155,7 +158,7 @@ public abstract class JDOSupport<T> {
 	 */
 	protected void delete(@Nullable T value) {
 		if (value != null)
-			pm.deletePersistent(value);
+			pm().deletePersistent(value);
 	}
 
 	/**
@@ -173,9 +176,9 @@ public abstract class JDOSupport<T> {
 		Object applyTransaction(ProceedingJoinPoint pjp, JDOSupport<?> support)
 				throws Throwable {
 			synchronized (lock) {
+				PersistenceManager pm = support.pm();
 				int id = ++txid;
-				Transaction tx = support.pm == null ? null : support.pm
-						.currentTransaction();
+				Transaction tx = (pm == null) ? null : pm.currentTransaction();
 				if (tx != null && tx.isActive())
 					tx = null;
 				if (tx != null) {
@@ -217,6 +220,45 @@ public abstract class JDOSupport<T> {
 	 */
 	@Target(METHOD)
 	@Retention(RUNTIME)
+	@Documented
 	public @interface WithinSingleTransaction {
 	}
+
+	public static class PersistenceManagerBuilder {
+		private PersistenceManagerFactory pmf;
+		private WeakHashMap<Thread, PersistenceManager> cache = new WeakHashMap<>();
+
+		/**
+		 * @param persistenceManagerFactory
+		 *            The JDO engine to use for managing persistence.
+		 */
+		@Required
+		public void setPersistenceManagerFactory(
+				PersistenceManagerFactory persistenceManagerFactory) {
+			pmf = persistenceManagerFactory;
+		}
+
+		@Nonnull
+		public PersistenceManager getPersistenceManager() {
+			if (cache == null)
+				return pmf.getPersistenceManager();
+			Thread t = Thread.currentThread();
+			PersistenceManager pm = cache.get(t);
+			if (pm == null && pmf != null) {
+				pm = pmf.getPersistenceManager();
+				cache.put(t, pm);
+			}
+			return pm;
+		}
+
+		@PreDestroy
+		void clearThreadCache() {
+			WeakHashMap<Thread, PersistenceManager> cache = this.cache;
+			this.cache = null;
+			for (PersistenceManager pm : cache.values())
+				if (pm != null)
+					pm.close();
+			cache.clear();
+		}
+	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/d13e9a5d/server-webapp/src/main/webapp/WEB-INF/beans.xml
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/webapp/WEB-INF/beans.xml b/server-webapp/src/main/webapp/WEB-INF/beans.xml
index af0d8cf..693557a 100644
--- a/server-webapp/src/main/webapp/WEB-INF/beans.xml
+++ b/server-webapp/src/main/webapp/WEB-INF/beans.xml
@@ -62,7 +62,7 @@
 		<property name="logIncomingWorkflows" value="${default.logworkflows}" />
 		<property name="allowNewWorkflowRuns" value="${default.permitsubmit}" />
 		<property name="logOutgoingExceptions" value="${default.logexceptions}" />
-		<property name="persistenceManagerFactory" ref="pmf" />
+		<property name="persistenceManagerBuilder" ref="pmb" />
 		<property name="self" ref="webapp.state" />
 	</bean>
 
@@ -179,7 +179,7 @@
 	<bean id="passwordEncoder"
 		class="org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder" />
 	<bean class="org.taverna.server.master.identity.UserStore" id="userStore">
-		<property name="persistenceManagerFactory" ref="pmf" />
+		<property name="persistenceManagerBuilder" ref="pmb" />
 		<property name="baselineUserProperties">
 			<util:properties location="/WEB-INF/security/users.properties" />
 		</property>
@@ -212,6 +212,9 @@
 			</props>
 		</property>
 	</bean>
+	<bean id="pmb" class="org.taverna.server.master.utils.JDOSupport.PersistenceManagerBuilder">
+		<property name="persistenceManagerFactory" ref="pmf" />
+	</bean>
 	<bean id="transactionAspect"
 		class="org.taverna.server.master.utils.JDOSupport.TransactionAspect" />
 
@@ -245,7 +248,7 @@
 	<bean id="usageRecordSink" class="org.taverna.server.master.usage.UsageRecordRecorder">
 		<property name="state" ref="webapp.state" />
 		<property name="contextualizer" ref="contextualizer" />
-		<property name="persistenceManagerFactory" ref="pmf" />
+		<property name="persistenceManagerBuilder" ref="pmb" />
 		<property name="self" ref="usageRecordSink" />
 		<property name="disableDB" value="${usage.disableDB}" />
 		<property name="logFile" value="${usage.logFile}" />
@@ -326,7 +329,7 @@
 				the subprocess to complete its registration.
 			</description>
 		</property>
-		<property name="persistenceManagerFactory" ref="pmf" />
+		<property name="persistenceManagerBuilder" ref="pmb" />
 		<!-- <property name="javaBinary"> <description>The name of the java executable 
 			used to run the server worker. Defaults to the executable used to run the 
 			hosting environment.</description> </property> -->
@@ -388,7 +391,7 @@
 			The implementation of the catalog of workflow runs
 			supported by the localworker run engine.
 		</description>
-		<property name="persistenceManagerFactory" ref="pmf" />
+		<property name="persistenceManagerBuilder" ref="pmb" />
 		<property name="facade" ref="worker.rundb" />
 	</bean>
 	<task:scheduled-tasks scheduler="taskScheduler">
@@ -451,7 +454,7 @@
 
 	<bean id="dispatch.atom" class="org.taverna.server.master.notification.atom.EventDAO">
 		<property name="expiryAgeDays" value="${atom.lifespan}" />
-		<property name="persistenceManagerFactory" ref="pmf" />
+		<property name="persistenceManagerBuilder" ref="pmb" />
 		<property name="uriBuilderFactory" ref="feed" />
 		<property name="self" ref="dispatch.atom" />
 	</bean>


[10/50] [abbrv] incubator-taverna-server git commit: Merge branch 'experimental/input-delimiter' into 2.5-branch

Posted by st...@apache.org.
Merge branch 'experimental/input-delimiter' into 2.5-branch

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/71eb1e65
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/71eb1e65
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/71eb1e65

Branch: refs/heads/master
Commit: 71eb1e657b3ac6311f906a30c60022b0860799ae
Parents: 91f7bcf 3859af0
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Fri Apr 11 14:03:39 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Fri Apr 11 14:03:39 2014 +0100

----------------------------------------------------------------------
 .../server/port_description/AbstractPort.java   |  2 ++
 .../server/localworker/remote/RemoteInput.java  | 31 +++++++++++++---
 .../org/taverna/server/master/InputREST.java    | 25 ++++++++-----
 .../taverna/server/master/TavernaServer.java    | 25 +++++++++++++
 .../server/master/common/InputDescription.java  |  6 ++++
 .../taverna/server/master/interfaces/Input.java | 27 ++++++++++++++
 .../master/rest/TavernaServerInputREST.java     | 31 +++++++++++++---
 .../server/master/soap/TavernaServerSOAP.java   | 32 +++++++++++++++++
 .../server/master/worker/RemoteRunDelegate.java | 20 +++++++++++
 .../taverna/server/master/mocks/ExampleRun.java | 17 +++++++++
 .../taverna/server/localworker/api/Worker.java  | 11 +++---
 .../server/localworker/impl/LocalWorker.java    | 37 +++++++++++++++++---
 .../server/localworker/impl/WorkerCore.java     | 25 +++++++++----
 .../localworker/impl/LocalWorkerTest.java       |  7 ++--
 14 files changed, 260 insertions(+), 36 deletions(-)
----------------------------------------------------------------------



[29/50] [abbrv] incubator-taverna-server git commit: 2.5.5-SNAPSHOT

Posted by st...@apache.org.
2.5.5-SNAPSHOT


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/a18fb0d0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/a18fb0d0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/a18fb0d0

Branch: refs/heads/master
Commit: a18fb0d014fea7e894ffb82e5799ce11ae3937c0
Parents: b8e9c40
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Authored: Tue May 13 10:24:16 2014 +0100
Committer: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Committed: Tue May 13 10:24:16 2014 +0100

----------------------------------------------------------------------
 pom.xml                         | 2 +-
 server-distribution/pom.xml     | 2 +-
 server-port-description/pom.xml | 2 +-
 server-rmidaemon/pom.xml        | 2 +-
 server-runinterface/pom.xml     | 2 +-
 server-unix-forker/pom.xml      | 2 +-
 server-usagerecord/pom.xml      | 2 +-
 server-webapp/pom.xml           | 2 +-
 server-worker/pom.xml           | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/a18fb0d0/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index bda829b..4bb31dc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
 	<groupId>uk.org.taverna.server</groupId>
 	<artifactId>server</artifactId>
 	<packaging>pom</packaging>
-	<version>2.5.4</version>
+	<version>2.5.5-SNAPSHOT</version>
 	<name>Taverna Server</name>
 	<description>Taverna Server is a service that provides execution of Taverna Workflows, provided they do not access the user interface while executing.</description>
 	<url>http://www.taverna.org.uk/</url>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/a18fb0d0/server-distribution/pom.xml
----------------------------------------------------------------------
diff --git a/server-distribution/pom.xml b/server-distribution/pom.xml
index 017011c..6f5a146 100644
--- a/server-distribution/pom.xml
+++ b/server-distribution/pom.xml
@@ -4,7 +4,7 @@
 	<parent>
 		<artifactId>server</artifactId>
 		<groupId>uk.org.taverna.server</groupId>
-		<version>2.5.4</version>
+		<version>2.5.5-SNAPSHOT</version>
 		<relativePath>..</relativePath>
 	</parent>
 	<artifactId>server-distribution</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/a18fb0d0/server-port-description/pom.xml
----------------------------------------------------------------------
diff --git a/server-port-description/pom.xml b/server-port-description/pom.xml
index c699175..2382504 100644
--- a/server-port-description/pom.xml
+++ b/server-port-description/pom.xml
@@ -3,7 +3,7 @@
 	<parent>
 		<artifactId>server</artifactId>
 		<groupId>uk.org.taverna.server</groupId>
-		<version>2.5.4</version>
+		<version>2.5.5-SNAPSHOT</version>
 	</parent>
 	<artifactId>server-port-description</artifactId>
 	<name>Workflow Port Descriptor Types</name>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/a18fb0d0/server-rmidaemon/pom.xml
----------------------------------------------------------------------
diff --git a/server-rmidaemon/pom.xml b/server-rmidaemon/pom.xml
index 1903f74..0e76a90 100644
--- a/server-rmidaemon/pom.xml
+++ b/server-rmidaemon/pom.xml
@@ -4,7 +4,7 @@
 	<parent>
 		<groupId>uk.org.taverna.server</groupId>
 		<artifactId>server</artifactId>
-		<version>2.5.4</version>
+		<version>2.5.5-SNAPSHOT</version>
 	</parent>
 	<artifactId>server-rmidaemon</artifactId>
 	<name>RMI registry daemon</name>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/a18fb0d0/server-runinterface/pom.xml
----------------------------------------------------------------------
diff --git a/server-runinterface/pom.xml b/server-runinterface/pom.xml
index 83cb36c..d828299 100644
--- a/server-runinterface/pom.xml
+++ b/server-runinterface/pom.xml
@@ -6,7 +6,7 @@
 	<parent>
 		<groupId>uk.org.taverna.server</groupId>
 		<artifactId>server</artifactId>
-		<version>2.5.4</version>
+		<version>2.5.5-SNAPSHOT</version>
 		<relativePath>..</relativePath>
 	</parent>
 	<scm>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/a18fb0d0/server-unix-forker/pom.xml
----------------------------------------------------------------------
diff --git a/server-unix-forker/pom.xml b/server-unix-forker/pom.xml
index 0823b9f..bf228a2 100644
--- a/server-unix-forker/pom.xml
+++ b/server-unix-forker/pom.xml
@@ -4,7 +4,7 @@
 	<parent>
 		<artifactId>server</artifactId>
 		<groupId>uk.org.taverna.server</groupId>
-		<version>2.5.4</version>
+		<version>2.5.5-SNAPSHOT</version>
 	</parent>
 	<artifactId>server-unix-forker</artifactId>
 	<scm>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/a18fb0d0/server-usagerecord/pom.xml
----------------------------------------------------------------------
diff --git a/server-usagerecord/pom.xml b/server-usagerecord/pom.xml
index c3fc520..e654df7 100644
--- a/server-usagerecord/pom.xml
+++ b/server-usagerecord/pom.xml
@@ -3,7 +3,7 @@
 	<parent>
 		<artifactId>server</artifactId>
 		<groupId>uk.org.taverna.server</groupId>
-		<version>2.5.4</version>
+		<version>2.5.5-SNAPSHOT</version>
 		<relativePath>..</relativePath>
 	</parent>
 	<artifactId>server-usagerecord</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/a18fb0d0/server-webapp/pom.xml
----------------------------------------------------------------------
diff --git a/server-webapp/pom.xml b/server-webapp/pom.xml
index 05cdf3f..0a6b22b 100644
--- a/server-webapp/pom.xml
+++ b/server-webapp/pom.xml
@@ -7,7 +7,7 @@
 	<parent>
 		<groupId>uk.org.taverna.server</groupId>
 		<artifactId>server</artifactId>
-		<version>2.5.4</version>
+		<version>2.5.5-SNAPSHOT</version>
 		<relativePath>..</relativePath>
 	</parent>
 	<scm>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/a18fb0d0/server-worker/pom.xml
----------------------------------------------------------------------
diff --git a/server-worker/pom.xml b/server-worker/pom.xml
index 42270ff..df2ada8 100644
--- a/server-worker/pom.xml
+++ b/server-worker/pom.xml
@@ -6,7 +6,7 @@
 	<parent>
 		<groupId>uk.org.taverna.server</groupId>
 		<artifactId>server</artifactId>
-		<version>2.5.4</version>
+		<version>2.5.5-SNAPSHOT</version>
 		<relativePath>..</relativePath>
 	</parent>
 	<scm>


[20/50] [abbrv] incubator-taverna-server git commit: Advance the build version

Posted by st...@apache.org.
Advance the build version

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/feaa3ad0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/feaa3ad0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/feaa3ad0

Branch: refs/heads/master
Commit: feaa3ad0f7710b18a12eb39154b3e4cf01509647
Parents: cb956ed
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Tue Apr 22 15:36:53 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Tue Apr 22 15:36:53 2014 +0100

----------------------------------------------------------------------
 pom.xml                         | 2 +-
 server-distribution/pom.xml     | 2 +-
 server-port-description/pom.xml | 2 +-
 server-rmidaemon/pom.xml        | 2 +-
 server-runinterface/pom.xml     | 2 +-
 server-unix-forker/pom.xml      | 2 +-
 server-usagerecord/pom.xml      | 2 +-
 server-webapp/pom.xml           | 2 +-
 server-worker/pom.xml           | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/feaa3ad0/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 3922b4a..89f0fc5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
 	<groupId>uk.org.taverna.server</groupId>
 	<artifactId>server</artifactId>
 	<packaging>pom</packaging>
-	<version>2.5.4-SNAPSHOT</version>
+	<version>2.5.4</version>
 	<name>Taverna Server</name>
 	<description>Taverna Server is a service that provides execution of Taverna Workflows, provided they do not access the user interface while executing.</description>
 	<url>http://www.taverna.org.uk/</url>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/feaa3ad0/server-distribution/pom.xml
----------------------------------------------------------------------
diff --git a/server-distribution/pom.xml b/server-distribution/pom.xml
index f09facf..017011c 100644
--- a/server-distribution/pom.xml
+++ b/server-distribution/pom.xml
@@ -4,7 +4,7 @@
 	<parent>
 		<artifactId>server</artifactId>
 		<groupId>uk.org.taverna.server</groupId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.5.4</version>
 		<relativePath>..</relativePath>
 	</parent>
 	<artifactId>server-distribution</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/feaa3ad0/server-port-description/pom.xml
----------------------------------------------------------------------
diff --git a/server-port-description/pom.xml b/server-port-description/pom.xml
index 3170b27..c699175 100644
--- a/server-port-description/pom.xml
+++ b/server-port-description/pom.xml
@@ -3,7 +3,7 @@
 	<parent>
 		<artifactId>server</artifactId>
 		<groupId>uk.org.taverna.server</groupId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.5.4</version>
 	</parent>
 	<artifactId>server-port-description</artifactId>
 	<name>Workflow Port Descriptor Types</name>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/feaa3ad0/server-rmidaemon/pom.xml
----------------------------------------------------------------------
diff --git a/server-rmidaemon/pom.xml b/server-rmidaemon/pom.xml
index f3020fa..1903f74 100644
--- a/server-rmidaemon/pom.xml
+++ b/server-rmidaemon/pom.xml
@@ -4,7 +4,7 @@
 	<parent>
 		<groupId>uk.org.taverna.server</groupId>
 		<artifactId>server</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.5.4</version>
 	</parent>
 	<artifactId>server-rmidaemon</artifactId>
 	<name>RMI registry daemon</name>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/feaa3ad0/server-runinterface/pom.xml
----------------------------------------------------------------------
diff --git a/server-runinterface/pom.xml b/server-runinterface/pom.xml
index 973c518..83cb36c 100644
--- a/server-runinterface/pom.xml
+++ b/server-runinterface/pom.xml
@@ -6,7 +6,7 @@
 	<parent>
 		<groupId>uk.org.taverna.server</groupId>
 		<artifactId>server</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.5.4</version>
 		<relativePath>..</relativePath>
 	</parent>
 	<scm>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/feaa3ad0/server-unix-forker/pom.xml
----------------------------------------------------------------------
diff --git a/server-unix-forker/pom.xml b/server-unix-forker/pom.xml
index 098d09e..0823b9f 100644
--- a/server-unix-forker/pom.xml
+++ b/server-unix-forker/pom.xml
@@ -4,7 +4,7 @@
 	<parent>
 		<artifactId>server</artifactId>
 		<groupId>uk.org.taverna.server</groupId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.5.4</version>
 	</parent>
 	<artifactId>server-unix-forker</artifactId>
 	<scm>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/feaa3ad0/server-usagerecord/pom.xml
----------------------------------------------------------------------
diff --git a/server-usagerecord/pom.xml b/server-usagerecord/pom.xml
index 5bb0e3d..c3fc520 100644
--- a/server-usagerecord/pom.xml
+++ b/server-usagerecord/pom.xml
@@ -3,7 +3,7 @@
 	<parent>
 		<artifactId>server</artifactId>
 		<groupId>uk.org.taverna.server</groupId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.5.4</version>
 		<relativePath>..</relativePath>
 	</parent>
 	<artifactId>server-usagerecord</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/feaa3ad0/server-webapp/pom.xml
----------------------------------------------------------------------
diff --git a/server-webapp/pom.xml b/server-webapp/pom.xml
index 9de52a1..4a1cdfa 100644
--- a/server-webapp/pom.xml
+++ b/server-webapp/pom.xml
@@ -7,7 +7,7 @@
 	<parent>
 		<groupId>uk.org.taverna.server</groupId>
 		<artifactId>server</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.5.4</version>
 		<relativePath>..</relativePath>
 	</parent>
 	<scm>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/feaa3ad0/server-worker/pom.xml
----------------------------------------------------------------------
diff --git a/server-worker/pom.xml b/server-worker/pom.xml
index 532e37f..42270ff 100644
--- a/server-worker/pom.xml
+++ b/server-worker/pom.xml
@@ -6,7 +6,7 @@
 	<parent>
 		<groupId>uk.org.taverna.server</groupId>
 		<artifactId>server</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.5.4</version>
 		<relativePath>..</relativePath>
 	</parent>
 	<scm>


[22/50] [abbrv] incubator-taverna-server git commit: TAVSERV-103: Mark non-optional parameters as non-optional; now that we are using Java 7, JAXB 2.2 supports that.

Posted by st...@apache.org.
TAVSERV-103: Mark non-optional parameters as non-optional; now that we
are using Java 7, JAXB 2.2 supports that.

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/88716a87
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/88716a87
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/88716a87

Branch: refs/heads/master
Commit: 88716a87873711c3d16e9ce350e33f8243bf29f7
Parents: e20667d
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Thu Apr 24 10:47:07 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Thu Apr 24 10:47:07 2014 +0100

----------------------------------------------------------------------
 release-notes.txt                               |   2 +
 .../server/master/soap/TavernaServerSOAP.java   | 250 +++++++++++--------
 2 files changed, 151 insertions(+), 101 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/88716a87/release-notes.txt
----------------------------------------------------------------------
diff --git a/release-notes.txt b/release-notes.txt
index 362545a..0f3396d 100644
--- a/release-notes.txt
+++ b/release-notes.txt
@@ -87,6 +87,8 @@ TAVSERV-329 Master feed broken
 TAVSERV-332 Massively degraded performance of 2.5.2
 ---- 2.5.3 release ----
     Updated to use Taverna 2.5.0 Enterprise Execution Core
+TAVSERV-103 Generated WSDL interface incorrectly claims that parameters are
+            optional
 TAVSERV-331 Add an option for the provenance export using the new -provbundle
             command line tool switch
 TAVSERV-336 Support splitting inputs 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/88716a87/server-webapp/src/main/java/org/taverna/server/master/soap/TavernaServerSOAP.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/soap/TavernaServerSOAP.java b/server-webapp/src/main/java/org/taverna/server/master/soap/TavernaServerSOAP.java
index 46b1273..72aca5e 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/soap/TavernaServerSOAP.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/soap/TavernaServerSOAP.java
@@ -17,6 +17,7 @@ import javax.jws.WebMethod;
 import javax.jws.WebParam;
 import javax.jws.WebResult;
 import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlElement;
 
 import org.apache.cxf.annotations.WSDLDocumentation;
 import org.ogf.usage.JobUsageRecord;
@@ -65,7 +66,8 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "Run")
 	@WSDLDocumentation("Make a run for a particular workflow.")
-	RunReference submitWorkflow(@WebParam(name = "workflow") Workflow workflow)
+	RunReference submitWorkflow(
+			@WebParam(name = "workflow") @XmlElement(required = true) Workflow workflow)
 			throws NoUpdateException, NoCreateException;
 
 	/**
@@ -81,7 +83,7 @@ public interface TavernaServerSOAP {
 	@WebResult(name = "Run")
 	@WSDLDocumentation("Make a run for a particular workflow where that workflow is given by publicly readable URI.")
 	RunReference submitWorkflowByURI(
-			@WebParam(name = "workflowURI") URI workflowURI)
+			@WebParam(name = "workflowURI") @XmlElement(required = true) URI workflowURI)
 			throws NoCreateException, NoUpdateException;
 
 	/**
@@ -156,7 +158,8 @@ public interface TavernaServerSOAP {
 	 *             run.
 	 */
 	@WSDLDocumentation("Destroy a run immediately.")
-	void destroyRun(@WebParam(name = "runName") String runName)
+	void destroyRun(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName)
 			throws UnknownRunException, NoUpdateException;
 
 	/**
@@ -171,7 +174,8 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "CreationWorkflow")
 	@WSDLDocumentation("Get the workflow document used to create the given run.")
-	Workflow getRunWorkflow(@WebParam(name = "runName") String runName)
+	Workflow getRunWorkflow(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName)
 			throws UnknownRunException;
 
 	/**
@@ -187,7 +191,8 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "DescriptiveName")
 	@WSDLDocumentation("Get the descriptive name of the workflow run. Carries no deep information.")
-	String getRunDescriptiveName(@WebParam(name = "runName") String runName)
+	String getRunDescriptiveName(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName)
 			throws UnknownRunException;
 
 	/**
@@ -206,8 +211,9 @@ public interface TavernaServerSOAP {
 	 *             If the user is not permitted to update this run.
 	 */
 	@WSDLDocumentation("Set the descriptive name of the workflow run. Carries no deep information.")
-	void setRunDescriptiveName(@WebParam(name = "runName") String runName,
-			@WebParam(name = "descriptiveName") String descriptiveName)
+	void setRunDescriptiveName(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "descriptiveName") @XmlElement(required = true) String descriptiveName)
 			throws UnknownRunException, NoUpdateException;
 
 	/**
@@ -222,7 +228,8 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "RunInputDescription")
 	@WSDLDocumentation("Get the description of the inputs currently set up for the given workflow run.")
-	InputDescription getRunInputs(@WebParam(name = "runName") String runName)
+	InputDescription getRunInputs(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName)
 			throws UnknownRunException;
 
 	/**
@@ -239,7 +246,7 @@ public interface TavernaServerSOAP {
 	@WebResult(name = "RunInputDescriptor")
 	@WSDLDocumentation("Get a description of what inputs the given workflow run expects to receive.")
 	org.taverna.server.port_description.InputDescription getRunInputDescriptor(
-			@WebParam(name = "runName") String runName)
+			@WebParam(name = "runName") @XmlElement(required = true) String runName)
 			throws UnknownRunException;
 
 	/**
@@ -262,7 +269,8 @@ public interface TavernaServerSOAP {
 	 *             Initialized} state
 	 */
 	@WSDLDocumentation("Tells the given run to use the given already-uploaded Baclava file for all inputs.")
-	void setRunInputBaclavaFile(@WebParam(name = "runName") String runName,
+	void setRunInputBaclavaFile(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
 			@WebParam(name = "baclavaFileName") String fileName)
 			throws UnknownRunException, NoUpdateException,
 			FilesystemAccessException, BadStateChangeException;
@@ -294,9 +302,10 @@ public interface TavernaServerSOAP {
 	 *             given file.
 	 */
 	@WSDLDocumentation("Tells the given run to use the given file for input on the given port.")
-	void setRunInputPortFile(@WebParam(name = "runName") String runName,
-			@WebParam(name = "portName") String portName,
-			@WebParam(name = "portFileName") String portFilename)
+	void setRunInputPortFile(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "portName") @XmlElement(required = true) String portName,
+			@WebParam(name = "portFileName") @XmlElement(required = true) String portFilename)
 			throws UnknownRunException, NoUpdateException,
 			FilesystemAccessException, BadStateChangeException,
 			BadPropertyValueException;
@@ -326,9 +335,10 @@ public interface TavernaServerSOAP {
 	 *             value.
 	 */
 	@WSDLDocumentation("Tells the given run to use the given literal string value for input on the given port.")
-	void setRunInputPortValue(@WebParam(name = "runName") String runName,
-			@WebParam(name = "portName") String portName,
-			@WebParam(name = "portValue") String portValue)
+	void setRunInputPortValue(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "portName") @XmlElement(required = true) String portName,
+			@WebParam(name = "portValue") @XmlElement(required = true) String portValue)
 			throws UnknownRunException, NoUpdateException,
 			BadStateChangeException, BadPropertyValueException;
 
@@ -358,8 +368,8 @@ public interface TavernaServerSOAP {
 	 */
 	@WSDLDocumentation("Tells the given run to use the given list delimiter (a single-character string value) for splitting the input on the given port. Note that nullability of the delimiter is supported here.")
 	void setRunInputPortListDelimiter(
-			@WebParam(name = "runName") String runName,
-			@WebParam(name = "portName") String portName,
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "portName") @XmlElement(required = true) String portName,
 			@WebParam(name = "delimiter") String delimiter)
 			throws UnknownRunException, NoUpdateException,
 			BadStateChangeException, BadPropertyValueException;
@@ -377,7 +387,8 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "OutputBaclavaFile")
 	@WSDLDocumentation("Get the Baclava file where the output of the run will be written.")
-	String getRunOutputBaclavaFile(@WebParam(name = "runName") String runName)
+	String getRunOutputBaclavaFile(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName)
 			throws UnknownRunException;
 
 	/**
@@ -402,7 +413,8 @@ public interface TavernaServerSOAP {
 	 *             Initialized} state
 	 */
 	@WSDLDocumentation("Set the Baclava file where the output of the run will be written.")
-	void setRunOutputBaclavaFile(@WebParam(name = "runName") String runName,
+	void setRunOutputBaclavaFile(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
 			@WebParam(name = "baclavaFileName") String outputFile)
 			throws UnknownRunException, NoUpdateException,
 			FilesystemAccessException, BadStateChangeException;
@@ -427,7 +439,7 @@ public interface TavernaServerSOAP {
 	@WebResult(name = "OutputDescription")
 	@WSDLDocumentation("Return a description of the outputs of a run. Only known during/after the run.")
 	OutputDescription getRunOutputDescription(
-			@WebParam(name = "runName") String runName)
+			@WebParam(name = "runName") @XmlElement(required = true) String runName)
 			throws UnknownRunException, BadStateChangeException,
 			FilesystemAccessException, NoDirectoryEntryException;
 
@@ -445,7 +457,8 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "Expiry")
 	@WSDLDocumentation("Get the time when the run will be eligible to be automatically deleted.")
-	Date getRunExpiry(@WebParam(name = "runName") String runName)
+	Date getRunExpiry(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName)
 			throws UnknownRunException;
 
 	/**
@@ -465,9 +478,10 @@ public interface TavernaServerSOAP {
 	 *             run.
 	 */
 	@WSDLDocumentation("Set when the run will be eligible to be automatically deleted.")
-	void setRunExpiry(@WebParam(name = "runName") String runName,
-			@WebParam(name = "expiry") Date expiry) throws UnknownRunException,
-			NoUpdateException;
+	void setRunExpiry(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "expiry") @XmlElement(required = true) Date expiry)
+			throws UnknownRunException, NoUpdateException;
 
 	/**
 	 * Get the time when the run was created.
@@ -482,7 +496,8 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "CreationTime")
 	@WSDLDocumentation("Get the time when the run was created.")
-	Date getRunCreationTime(@WebParam(name = "runName") String runName)
+	Date getRunCreationTime(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName)
 			throws UnknownRunException;
 
 	/**
@@ -498,7 +513,8 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "StartTime")
 	@WSDLDocumentation("Get the time when the run was started.")
-	Date getRunStartTime(@WebParam(name = "runName") String runName)
+	Date getRunStartTime(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName)
 			throws UnknownRunException;
 
 	/**
@@ -515,7 +531,8 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "FinishTime")
 	@WSDLDocumentation("Get the time when the run was detected as having finished.")
-	Date getRunFinishTime(@WebParam(name = "runName") String runName)
+	Date getRunFinishTime(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName)
 			throws UnknownRunException;
 
 	/**
@@ -530,7 +547,8 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "Status")
 	@WSDLDocumentation("Get the current status of the given workflow run.")
-	Status getRunStatus(@WebParam(name = "runName") String runName)
+	Status getRunStatus(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName)
 			throws UnknownRunException;
 
 	/**
@@ -555,8 +573,9 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "PartialityReason")
 	@WSDLDocumentation("Set the status of a given workflow run.")
-	String setRunStatus(@WebParam(name = "runName") String runName,
-			@WebParam(name = "status") Status status)
+	String setRunStatus(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "status") @XmlElement(required = true) Status status)
 			throws UnknownRunException, NoUpdateException,
 			BadStateChangeException;
 
@@ -572,7 +591,8 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "ListenerName")
 	@WSDLDocumentation("Get the names of the event listeners attached to the run.")
-	String[] getRunListeners(@WebParam(name = "runName") String runName)
+	String[] getRunListeners(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName)
 			throws UnknownRunException;
 
 	/**
@@ -599,9 +619,10 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "ListenerName")
 	@WSDLDocumentation("Adds an event listener to the run.")
-	String addRunListener(@WebParam(name = "runName") String runName,
-			@WebParam(name = "listenerType") String listenerType,
-			@WebParam(name = "configuration") String configuration)
+	String addRunListener(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "listenerType") @XmlElement(required = true) String listenerType,
+			@WebParam(name = "configuration") @XmlElement(required = true) String configuration)
 			throws UnknownRunException, NoUpdateException, NoListenerException;
 
 	/**
@@ -620,7 +641,8 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "StandardOutput")
 	@WSDLDocumentation("Returns the stdout from the run engine.")
-	String getRunStdout(@WebParam(name = "runName") String runName)
+	String getRunStdout(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName)
 			throws UnknownRunException;
 
 	/**
@@ -639,7 +661,8 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "StandardError")
 	@WSDLDocumentation("Returns the stderr from the run engine.")
-	String getRunStderr(@WebParam(name = "runName") String runName)
+	String getRunStderr(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName)
 			throws UnknownRunException;
 
 	/**
@@ -658,7 +681,8 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "ResourceUsage")
 	@WSDLDocumentation("Returns the resource usage from the run engine.")
-	JobUsageRecord getRunUsageRecord(@WebParam(name = "runName") String runName)
+	JobUsageRecord getRunUsageRecord(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName)
 			throws UnknownRunException;
 
 	/**
@@ -677,7 +701,8 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "Log")
 	@WSDLDocumentation("Returns the detailed log from the run engine.")
-	String getRunLog(@WebParam(name = "runName") String runName)
+	String getRunLog(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName)
 			throws UnknownRunException;
 
 	/**
@@ -698,7 +723,8 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "RunBundle")
 	@WSDLDocumentation("Gets the run bundle of a finished run. MTOM support recommended!")
-	FileContents getRunBundle(@WebParam(name = "runName") String runName)
+	FileContents getRunBundle(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName)
 			throws UnknownRunException, FilesystemAccessException,
 			NoDirectoryEntryException;
 
@@ -714,7 +740,8 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "GenerateProvenance")
 	@WSDLDocumentation("Gets whether a run generates provenance.")
-	boolean getRunGenerateProvenance(@WebParam(name = "runName") String runName)
+	boolean getRunGenerateProvenance(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName)
 			throws UnknownRunException;
 
 	/**
@@ -732,8 +759,9 @@ public interface TavernaServerSOAP {
 	 */
 	@WSDLDocumentation("Sets whether a run generates provenance. "
 			+ "Only usefully settable before the run is started.")
-	void setRunGenerateProvenance(@WebParam(name = "runName") String runName,
-			@WebParam(name = "generateProvenance") boolean generateProvenance)
+	void setRunGenerateProvenance(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "generateProvenance") @XmlElement(required = true) boolean generateProvenance)
 			throws UnknownRunException, NoUpdateException;
 
 	/**
@@ -748,7 +776,8 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "Owner")
 	@WSDLDocumentation("Get the owner of the given workflow run.")
-	String getRunOwner(@WebParam(name = "runName") String runName)
+	String getRunOwner(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName)
 			throws UnknownRunException;
 
 	/**
@@ -766,7 +795,8 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "PermissionList")
 	@WSDLDocumentation("Get the list of permissions associated with a given workflow run.")
-	PermissionList listRunPermissions(@WebParam(name = "runName") String runName)
+	PermissionList listRunPermissions(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName)
 			throws UnknownRunException, NotOwnerException;
 
 	/**
@@ -787,9 +817,10 @@ public interface TavernaServerSOAP {
 	 *             current user may see but where they are not the owner of it.
 	 */
 	@WSDLDocumentation("Set the permission for a user to access and update a given workflow run.")
-	void setRunPermission(@WebParam(name = "runName") String runName,
-			@WebParam(name = "userName") String userName,
-			@WebParam(name = "permission") Permission permission)
+	void setRunPermission(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "userName") @XmlElement(required = true) String userName,
+			@WebParam(name = "permission") @XmlElement(required = true) Permission permission)
 			throws UnknownRunException, NotOwnerException;
 
 	/**
@@ -807,7 +838,8 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "Credentials")
 	@WSDLDocumentation("Get the credentials (passwords, private keys) associated with the given workflow run. Only the owner may do this.")
-	Credential[] getRunCredentials(@WebParam(name = "runName") String runName)
+	Credential[] getRunCredentials(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName)
 			throws UnknownRunException, NotOwnerException;
 
 	/**
@@ -838,9 +870,10 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "credentialID")
 	@WSDLDocumentation("Set a credential (password, private key, etc.) associated with the given run. Only the owner may do this.")
-	String setRunCredential(@WebParam(name = "runName") String runName,
-			@WebParam(name = "credentialID") String credentialID,
-			@WebParam(name = "credential") Credential credential)
+	String setRunCredential(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "credentialID") @XmlElement(required = true) String credentialID,
+			@WebParam(name = "credential") @XmlElement(required = true) Credential credential)
 			throws UnknownRunException, NotOwnerException,
 			InvalidCredentialException, NoCredentialException,
 			BadStateChangeException;
@@ -866,8 +899,9 @@ public interface TavernaServerSOAP {
 	 *             workflow has started running.
 	 */
 	@WSDLDocumentation("Delete a credential associated with the given run. Only the owner may do this.")
-	void deleteRunCredential(@WebParam(name = "runName") String runName,
-			@WebParam(name = "credentialID") String credentialID)
+	void deleteRunCredential(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "credentialID") @XmlElement(required = true) String credentialID)
 			throws UnknownRunException, NotOwnerException,
 			NoCredentialException, BadStateChangeException;
 
@@ -886,7 +920,8 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "CertificateCollections")
 	@WSDLDocumentation("Get the trusted (server or CA) certificates associated with the run. Only the owner may do this.")
-	Trust[] getRunCertificates(@WebParam(name = "runName") String runName)
+	Trust[] getRunCertificates(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName)
 			throws UnknownRunException, NotOwnerException;
 
 	/**
@@ -917,9 +952,10 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "certificateID")
 	@WSDLDocumentation("Set a trusted (server or CA) certificate associated with the run. Only the owner may do this.")
-	String setRunCertificates(@WebParam(name = "runName") String runName,
+	String setRunCertificates(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
 			@WebParam(name = "certificateID") String certificateID,
-			@WebParam(name = "certificate") Trust certificate)
+			@WebParam(name = "certificate") @XmlElement(required = true) Trust certificate)
 			throws UnknownRunException, NotOwnerException,
 			InvalidCredentialException, NoCredentialException,
 			BadStateChangeException;
@@ -930,8 +966,7 @@ public interface TavernaServerSOAP {
 	 * @param runName
 	 *            The handle of the run.
 	 * @param certificateID
-	 *            The handle of the credential to delete. If empty, a new
-	 *            credential will be created.
+	 *            The handle of the credential to delete.
 	 * @throws UnknownRunException
 	 *             If the server doesn't know about the run or if the user is
 	 *             not permitted to see it.
@@ -945,8 +980,9 @@ public interface TavernaServerSOAP {
 	 *             workflow has started running.
 	 */
 	@WSDLDocumentation("Delete a trusted (server or CA) certificate associated with the run. Only the owner may do this.")
-	void deleteRunCertificates(@WebParam(name = "runName") String runName,
-			@WebParam(name = "certificateID") String certificateID)
+	void deleteRunCertificates(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "certificateID") @XmlElement(required = true) String certificateID)
 			throws UnknownRunException, NotOwnerException,
 			NoCredentialException, BadStateChangeException;
 
@@ -973,8 +1009,8 @@ public interface TavernaServerSOAP {
 	@WebResult(name = "DirectoryEntry")
 	@WSDLDocumentation("Get the contents of any directory at/under the run's working directory.")
 	DirEntry[] getRunDirectoryContents(
-			@WebParam(name = "runName") String runName,
-			@WebParam(name = "directory") DirEntry directory)
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "directory") @XmlElement(required = true) DirEntry directory)
 			throws UnknownRunException, FilesystemAccessException,
 			NoDirectoryEntryException;
 
@@ -1000,8 +1036,9 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "ZipFile")
 	@WSDLDocumentation("Get the contents of any directory (and its subdirectories) at/under the run's working directory, returning it as a compressed ZIP file.")
-	byte[] getRunDirectoryAsZip(@WebParam(name = "runName") String runName,
-			@WebParam(name = "directory") DirEntry directory)
+	byte[] getRunDirectoryAsZip(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "directory") @XmlElement(required = true) DirEntry directory)
 			throws UnknownRunException, FilesystemAccessException,
 			NoDirectoryEntryException;
 
@@ -1028,8 +1065,8 @@ public interface TavernaServerSOAP {
 	@WebResult(name = "ZipStream")
 	@WSDLDocumentation("Get the contents of any directory (and its subdirectories) at/under the run's working directory, returning it as a compressed ZIP file that is streamed by MTOM.")
 	ZippedDirectory getRunDirectoryAsZipMTOM(
-			@WebParam(name = "runName") String runName,
-			@WebParam(name = "directory") DirEntry directory)
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "directory") @XmlElement(required = true) DirEntry directory)
 			throws UnknownRunException, FilesystemAccessException,
 			NoDirectoryEntryException;
 
@@ -1062,9 +1099,10 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "CreatedDirectory")
 	@WSDLDocumentation("Make a new empty directory beneath an existing one, all relative to the given run's main working directory.")
-	DirEntry makeRunDirectory(@WebParam(name = "runName") String runName,
-			@WebParam(name = "parentDirectory") DirEntry parent,
-			@WebParam(name = "directoryName") String name)
+	DirEntry makeRunDirectory(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "parentDirectory") @XmlElement(required = true) DirEntry parent,
+			@WebParam(name = "directoryName") @XmlElement(required = true) String name)
 			throws UnknownRunException, NoUpdateException,
 			FilesystemAccessException, NoDirectoryEntryException;
 
@@ -1096,9 +1134,10 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "CreatedFile")
 	@WSDLDocumentation("Make a new empty file in an existing directory, which may be the run's working directory or any directory beneath it.")
-	DirEntry makeRunFile(@WebParam(name = "runName") String runName,
-			@WebParam(name = "parentDirectory") DirEntry parent,
-			@WebParam(name = "fileNameTail") String name)
+	DirEntry makeRunFile(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "parentDirectory") @XmlElement(required = true) DirEntry parent,
+			@WebParam(name = "fileNameTail") @XmlElement(required = true) String name)
 			throws UnknownRunException, NoUpdateException,
 			FilesystemAccessException, NoDirectoryEntryException;
 
@@ -1124,8 +1163,9 @@ public interface TavernaServerSOAP {
 	 *             If the name of the file or directory can't be looked up.
 	 */
 	@WSDLDocumentation("Destroy an entry (file or directory) in or beneath a run's working directory.")
-	void destroyRunDirectoryEntry(@WebParam(name = "runName") String runName,
-			@WebParam(name = "directoryEntry") DirEntry dirEntry)
+	void destroyRunDirectoryEntry(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "directoryEntry") @XmlElement(required = true) DirEntry dirEntry)
 			throws UnknownRunException, NoUpdateException,
 			FilesystemAccessException, NoDirectoryEntryException;
 
@@ -1150,8 +1190,9 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "FileContents")
 	@WSDLDocumentation("Get the contents of a file under the run's working directory.")
-	byte[] getRunFileContents(@WebParam(name = "runName") String runName,
-			@WebParam(name = "fileName") DirEntry file)
+	byte[] getRunFileContents(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "fileName") @XmlElement(required = true) DirEntry file)
 			throws UnknownRunException, FilesystemAccessException,
 			NoDirectoryEntryException;
 
@@ -1177,8 +1218,8 @@ public interface TavernaServerSOAP {
 	@WebResult(name = "FileContentsMTOM")
 	@WSDLDocumentation("Get the contents of a file via MTOM.")
 	FileContents getRunFileContentsMTOM(
-			@WebParam(name = "runName") String runName,
-			@WebParam(name = "fileName") DirEntry file)
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "fileName") @XmlElement(required = true) DirEntry file)
 			throws UnknownRunException, FilesystemAccessException,
 			NoDirectoryEntryException;
 
@@ -1205,9 +1246,10 @@ public interface TavernaServerSOAP {
 	 *             If the file doesn't exist.
 	 */
 	@WSDLDocumentation("Set the contents of a file under the run's working directory.")
-	void setRunFileContents(@WebParam(name = "runName") String runName,
-			@WebParam(name = "fileName") DirEntry file,
-			@WebParam(name = "contents") byte[] newContents)
+	void setRunFileContents(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "fileName") @XmlElement(required = true) DirEntry file,
+			@WebParam(name = "contents") @XmlElement(required = true) byte[] newContents)
 			throws UnknownRunException, NoUpdateException,
 			FilesystemAccessException, NoDirectoryEntryException;
 
@@ -1232,8 +1274,9 @@ public interface TavernaServerSOAP {
 	 *             If the file doesn't exist.
 	 */
 	@WSDLDocumentation("Set the contents of a file under the run's working directory.")
-	void setRunFileContentsMTOM(@WebParam(name = "runName") String runName,
-			@WebParam(name = "contents") FileContents newContents)
+	void setRunFileContentsMTOM(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "contents") @XmlElement(required = true) FileContents newContents)
 			throws UnknownRunException, NoUpdateException,
 			FilesystemAccessException, NoDirectoryEntryException;
 
@@ -1258,8 +1301,9 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "FileLength")
 	@WSDLDocumentation("Get the length of any file (in bytes) at/under the run's working directory.")
-	long getRunFileLength(@WebParam(name = "runName") String runName,
-			@WebParam(name = "fileName") DirEntry file)
+	long getRunFileLength(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "fileName") @XmlElement(required = true) DirEntry file)
 			throws UnknownRunException, FilesystemAccessException,
 			NoDirectoryEntryException;
 
@@ -1285,8 +1329,9 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "FileModified")
 	@WSDLDocumentation("Get the length of any file (in bytes) at/under the run's working directory.")
-	Date getRunFileModified(@WebParam(name = "runName") String runName,
-			@WebParam(name = "fileName") DirEntry file)
+	Date getRunFileModified(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "fileName") @XmlElement(required = true) DirEntry file)
 			throws UnknownRunException, FilesystemAccessException,
 			NoDirectoryEntryException;
 
@@ -1311,8 +1356,9 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "FileContentType")
 	@WSDLDocumentation("Get the content type of any file at/under the run's working directory.")
-	String getRunFileType(@WebParam(name = "runName") String runName,
-			@WebParam(name = "fileName") DirEntry file)
+	String getRunFileType(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "fileName") @XmlElement(required = true) DirEntry file)
 			throws UnknownRunException, FilesystemAccessException,
 			NoDirectoryEntryException;
 
@@ -1333,8 +1379,8 @@ public interface TavernaServerSOAP {
 	@WebResult(name = "ListenerConfiguration")
 	@WSDLDocumentation("Get the configuration document for an event listener attached to a run.")
 	String getRunListenerConfiguration(
-			@WebParam(name = "runName") String runName,
-			@WebParam(name = "listenerName") String listenerName)
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "listenerName") @XmlElement(required = true) String listenerName)
 			throws UnknownRunException, NoListenerException;
 
 	/**
@@ -1355,8 +1401,8 @@ public interface TavernaServerSOAP {
 	@WebResult(name = "ListenerPropertyName")
 	@WSDLDocumentation("Get the list of properties supported by an event listener attached to a run.")
 	String[] getRunListenerProperties(
-			@WebParam(name = "runName") String runName,
-			@WebParam(name = "listenerName") String listenerName)
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "listenerName") @XmlElement(required = true) String listenerName)
 			throws UnknownRunException, NoListenerException;
 
 	/**
@@ -1378,9 +1424,10 @@ public interface TavernaServerSOAP {
 	 */
 	@WebResult(name = "ListenerPropertyValue")
 	@WSDLDocumentation("Get the value of a property for an event listener attached to a run.")
-	String getRunListenerProperty(@WebParam(name = "runName") String runName,
-			@WebParam(name = "listenerName") String listenerName,
-			@WebParam(name = "propertyName") String propertyName)
+	String getRunListenerProperty(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "listenerName") @XmlElement(required = true) String listenerName,
+			@WebParam(name = "propertyName") @XmlElement(required = true) String propertyName)
 			throws UnknownRunException, NoListenerException;
 
 	/**
@@ -1405,10 +1452,11 @@ public interface TavernaServerSOAP {
 	 *             If the user is not allowed to make modifications to the run.
 	 */
 	@WSDLDocumentation("Set the value of a property for an event listener attached to a run.")
-	void setRunListenerProperty(@WebParam(name = "runName") String runName,
-			@WebParam(name = "listenerName") String listenerName,
-			@WebParam(name = "propertyName") String propertyName,
-			@WebParam(name = "propertyValue") String value)
+	void setRunListenerProperty(
+			@WebParam(name = "runName") @XmlElement(required = true) String runName,
+			@WebParam(name = "listenerName") @XmlElement(required = true) String listenerName,
+			@WebParam(name = "propertyName") @XmlElement(required = true) String propertyName,
+			@WebParam(name = "propertyValue") @XmlElement(required = true) String value)
 			throws UnknownRunException, NoUpdateException, NoListenerException;
 
 	/**


[27/50] [abbrv] incubator-taverna-server git commit: Newer parent. Contributor Soiland -> Soiland-Reyes

Posted by st...@apache.org.
Newer parent. Contributor Soiland -> Soiland-Reyes


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/7ed66db1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/7ed66db1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/7ed66db1

Branch: refs/heads/master
Commit: 7ed66db1c2feed6dca0495a7b370ebaef5ead6ae
Parents: d285a5f
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Authored: Mon May 12 17:25:16 2014 +0100
Committer: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Committed: Mon May 12 17:25:16 2014 +0100

----------------------------------------------------------------------
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/7ed66db1/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 89f0fc5..bda829b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,7 @@
 	<parent>
 		<groupId>net.sf.taverna</groupId>
 		<artifactId>parent</artifactId>
-		<version>0.2.2011-02-17</version>
+		<version>0.2.2014-03-19</version>
 	</parent>
 	<prerequisites>
 		<maven>2.2</maven>
@@ -97,7 +97,7 @@
 			</roles>
 		</contributor>
 		<contributor>
-			<name>Stian Soiland</name>
+			<name>Stian Soiland-Reyes</name>
 			<organization>The University of Manchester</organization>
 			<organizationUrl>http://www.manchester.ac.uk/</organizationUrl>
 			<timezone>0</timezone>


[15/50] [abbrv] incubator-taverna-server git commit: Merge branch 'experimental/java7' into 2.5-branch

Posted by st...@apache.org.
Merge branch 'experimental/java7' into 2.5-branch

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/fde99380
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/fde99380
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/fde99380

Branch: refs/heads/master
Commit: fde99380f1739730b4f531f4f1214a605b879c38
Parents: 1262673 6ce771d
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Mon Apr 14 12:03:12 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Mon Apr 14 12:03:12 2014 +0100

----------------------------------------------------------------------
 pom.xml                                         |   8 +-
 .../port_description/InputDescription.java      |   2 +-
 .../server/port_description/ListValue.java      |   2 +-
 .../port_description/OutputDescription.java     |   2 +-
 .../org/taverna/server/rmidaemon/Registry.java  |  32 ++--
 .../localworker/remote/RemoteDirectory.java     |  12 +-
 .../remote/RemoteDirectoryEntry.java            |   8 +-
 .../server/localworker/remote/RemoteFile.java   |  14 +-
 .../server/localworker/remote/RemoteInput.java  |  10 +-
 .../localworker/remote/RemoteListener.java      |  16 +-
 .../localworker/remote/RemoteRunFactory.java    |  14 +-
 .../remote/RemoteSecurityContext.java           |  17 +-
 .../localworker/remote/RemoteSingleRun.java     |  36 ++---
 .../org/taverna/server/unixforker/Forker.java   |  13 +-
 .../master/ContentsDescriptorBuilder.java       |  13 +-
 .../taverna/server/master/DirectoryREST.java    |   8 +-
 .../server/master/FileConcatenation.java        |   6 +-
 .../org/taverna/server/master/InputREST.java    |   2 +-
 .../taverna/server/master/ListenersREST.java    |   7 +-
 .../taverna/server/master/TavernaServer.java    |  40 ++---
 .../server/master/TavernaServerSupport.java     |  65 ++++----
 .../org/taverna/server/master/admin/Admin.java  |  71 ++++-----
 .../taverna/server/master/admin/AdminBean.java  |   2 +-
 .../server/master/api/TavernaServerBean.java    |  22 +--
 .../server/master/common/Credential.java        |   4 +-
 .../server/master/common/InputDescription.java  |   2 +-
 .../org/taverna/server/master/common/Uri.java   |  21 ++-
 .../server/master/common/VersionedElement.java  |  14 +-
 .../taverna/server/master/common/Workflow.java  |  17 +-
 .../identity/StrippedDownAuthProvider.java      |   2 +-
 .../taverna/server/master/identity/User.java    |   2 +-
 .../server/master/identity/UserStore.java       |   8 +-
 .../identity/WorkflowInternalAuthProvider.java  |  17 +-
 .../interaction/InteractionFeedSupport.java     |   4 +-
 .../taverna/server/master/interfaces/Input.java |   8 +-
 .../master/interfaces/MessageDispatcher.java    |   8 +-
 .../localworker/AbstractRemoteRunFactory.java   |  23 ++-
 .../master/localworker/ForkRunFactory.java      |  17 +-
 .../localworker/IdAwareForkRunFactory.java      |  24 ++-
 .../master/localworker/PersistedState.java      |   4 +-
 .../master/notification/NotificationEngine.java |   6 +-
 .../notification/RateLimitedDispatcher.java     |   2 +-
 .../master/notification/SMSDispatcher.java      |  12 +-
 .../master/notification/atom/EventDAO.java      |  19 ++-
 .../server/master/rest/DirectoryContents.java   |   4 +-
 .../master/rest/TavernaServerDirectoryREST.java |  27 ++--
 .../master/rest/TavernaServerInputREST.java     |  25 ++-
 .../master/rest/TavernaServerListenersREST.java |  47 +++---
 .../server/master/rest/TavernaServerREST.java   |  67 ++++----
 .../master/rest/TavernaServerRunREST.java       |  79 +++++----
 .../master/rest/TavernaServerSecurityREST.java  | 126 ++++++++-------
 .../master/rest/handler/EntryHandler.java       |  22 ++-
 .../master/rest/handler/URIListHandler.java     |   2 +-
 .../server/master/soap/FileContents.java        |   5 +-
 .../master/usage/UsageRecordRecorder.java       |   7 +-
 .../server/master/utils/CapabilityLister.java   |  11 +-
 .../master/utils/CertificateChainFetcher.java   |  10 +-
 .../taverna/server/master/utils/JDOSupport.java |  15 +-
 .../master/utils/WebappAwareDataSource.java     |   3 -
 .../taverna/server/master/utils/X500Utils.java  |   5 +-
 .../server/master/worker/PolicyImpl.java        |   3 -
 .../server/master/worker/RemoteRunDelegate.java |  36 ++---
 .../server/master/worker/RunConnection.java     |  23 ++-
 .../server/master/worker/RunDBSupport.java      |  10 +-
 .../server/master/worker/RunDatabase.java       |  16 +-
 .../server/master/worker/RunDatabaseDAO.java    |  46 +++---
 .../master/worker/RunFactoryConfiguration.java  |  23 ++-
 .../master/worker/SecurityContextDelegate.java  | 159 +++++++++----------
 .../master/worker/SecurityContextFactory.java   |   4 -
 .../server/master/TavernaServerImplTest.java    |   4 -
 .../master/WorkflowSerializationTest.java       |  15 +-
 .../taverna/server/master/mocks/ExampleRun.java |   9 +-
 .../taverna/server/master/mocks/MockPolicy.java |   5 +-
 .../master/mocks/SimpleListenerFactory.java     |   4 +-
 .../mocks/SimpleNonpersistentRunStore.java      |   9 +-
 .../localworker/impl/DirectoryDelegate.java     |  16 +-
 .../server/localworker/impl/FileDelegate.java   |  34 +---
 .../server/localworker/impl/LocalWorker.java    |  21 +--
 .../localworker/impl/TavernaRunManager.java     |  11 +-
 .../server/localworker/impl/WorkerCore.java     | 110 ++++++-------
 .../localworker/impl/utils/TimingOutTask.java   |   2 +-
 .../localworker/impl/LocalWorkerTest.java       |  12 +-
 82 files changed, 750 insertions(+), 913 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/fde99380/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerInputREST.java
----------------------------------------------------------------------


[44/50] [abbrv] incubator-taverna-server git commit: Trying to plug a bunch of memory leaks in class loaders

Posted by st...@apache.org.
Trying to plug a bunch of memory leaks in class loaders

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/0bb7d2ec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/0bb7d2ec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/0bb7d2ec

Branch: refs/heads/master
Commit: 0bb7d2ec059ea270fad1f2889aca269f5120fa5a
Parents: 92c8fb0
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Wed Aug 20 10:01:25 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Wed Aug 20 10:47:47 2014 +0100

----------------------------------------------------------------------
 .../master/ContentsDescriptorBuilder.java       |  6 +-
 .../taverna/server/master/DirectoryREST.java    |  4 +-
 .../server/master/ListenerPropertyREST.java     |  4 +-
 .../java/org/taverna/server/master/RunREST.java |  4 +-
 .../taverna/server/master/TavernaServer.java    |  2 +-
 .../server/master/TavernaServerSupport.java     |  2 +-
 .../server/master/identity/UserStore.java       |  2 +-
 .../identity/WorkflowInternalAuthProvider.java  |  4 +-
 .../localworker/AbstractRemoteRunFactory.java   |  1 +
 .../master/localworker/ForkRunFactory.java      | 96 ++++++--------------
 .../localworker/IdAwareForkRunFactory.java      | 56 ++----------
 .../server/master/localworker/StreamLogger.java | 60 ++++++++++++
 .../master/notification/atom/EventDAO.java      | 38 ++++++--
 .../master/rest/handler/FileMessageHandler.java |  4 +-
 .../server/master/rest/handler/HandlerCore.java |  4 +-
 .../master/usage/UsageRecordRecorder.java       |  4 +-
 .../master/utils/WebappAwareDataSource.java     | 22 +++++
 17 files changed, 171 insertions(+), 142 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0bb7d2ec/server-webapp/src/main/java/org/taverna/server/master/ContentsDescriptorBuilder.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/ContentsDescriptorBuilder.java b/server-webapp/src/main/java/org/taverna/server/master/ContentsDescriptorBuilder.java
index f778e3a..8b4b947 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/ContentsDescriptorBuilder.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/ContentsDescriptorBuilder.java
@@ -10,7 +10,7 @@ import static javax.ws.rs.core.MediaType.APPLICATION_OCTET_STREAM_TYPE;
 import static javax.ws.rs.core.UriBuilder.fromUri;
 import static javax.xml.xpath.XPathConstants.NODE;
 import static javax.xml.xpath.XPathConstants.NODESET;
-import static org.taverna.server.master.TavernaServerSupport.log;
+import static org.apache.commons.logging.LogFactory.getLog;
 import static org.taverna.server.master.common.Uri.secure;
 
 import java.io.ByteArrayInputStream;
@@ -28,6 +28,7 @@ import javax.xml.xpath.XPathExpression;
 import javax.xml.xpath.XPathExpressionException;
 import javax.xml.xpath.XPathFactory;
 
+import org.apache.commons.logging.Log;
 import org.springframework.beans.factory.annotation.Required;
 import org.springframework.util.xml.SimpleNamespaceContext;
 import org.taverna.server.master.exceptions.FilesystemAccessException;
@@ -58,6 +59,7 @@ import org.w3c.dom.NodeList;
  * @author Donal Fellows
  */
 public class ContentsDescriptorBuilder {
+	private Log log = getLog("Taverna.Server.Webapp");
 	/** Namespace for use when pulling apart a .t2flow document. */
 	private static final String T2FLOW_NS = "http://taverna.sf.net/2008/xml/t2flow";
 	/** Prefix for t2flow namespace. */
@@ -380,4 +382,4 @@ public class ContentsDescriptorBuilder {
 		}
 		return desc;
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0bb7d2ec/server-webapp/src/main/java/org/taverna/server/master/DirectoryREST.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/DirectoryREST.java b/server-webapp/src/main/java/org/taverna/server/master/DirectoryREST.java
index 3284e57..cc7d08a 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/DirectoryREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/DirectoryREST.java
@@ -11,7 +11,7 @@ import static javax.ws.rs.core.Response.noContent;
 import static javax.ws.rs.core.Response.ok;
 import static javax.ws.rs.core.Response.seeOther;
 import static javax.ws.rs.core.Response.status;
-import static org.taverna.server.master.TavernaServer.log;
+import static org.apache.commons.logging.LogFactory.getLog;
 import static org.taverna.server.master.api.ContentTypes.APPLICATION_ZIP_TYPE;
 import static org.taverna.server.master.api.ContentTypes.DIRECTORY_VARIANTS;
 import static org.taverna.server.master.api.ContentTypes.INITIAL_FILE_VARIANTS;
@@ -37,6 +37,7 @@ import javax.ws.rs.core.UriInfo;
 import javax.ws.rs.core.Variant;
 import javax.xml.ws.Holder;
 
+import org.apache.commons.logging.Log;
 import org.springframework.beans.factory.annotation.Required;
 import org.taverna.server.master.api.DirectoryBean;
 import org.taverna.server.master.exceptions.FilesystemAccessException;
@@ -61,6 +62,7 @@ import org.taverna.server.master.utils.InvocationCounter.CallCounted;
  * @author Donal Fellows
  */
 class DirectoryREST implements TavernaServerDirectoryREST, DirectoryBean {
+	private Log log = getLog("Taverna.Server.Webapp");
 	private TavernaServerSupport support;
 	private TavernaRun run;
 	private FilenameUtils fileUtils;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0bb7d2ec/server-webapp/src/main/java/org/taverna/server/master/ListenerPropertyREST.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/ListenerPropertyREST.java b/server-webapp/src/main/java/org/taverna/server/master/ListenerPropertyREST.java
index 2822de3..3e983a9 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/ListenerPropertyREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/ListenerPropertyREST.java
@@ -5,11 +5,12 @@
  */
 package org.taverna.server.master;
 
-import static org.taverna.server.master.TavernaServer.log;
+import static org.apache.commons.logging.LogFactory.getLog;
 import static org.taverna.server.master.utils.RestUtils.opt;
 
 import javax.ws.rs.core.Response;
 
+import org.apache.commons.logging.Log;
 import org.taverna.server.master.api.ListenerPropertyBean;
 import org.taverna.server.master.exceptions.NoListenerException;
 import org.taverna.server.master.exceptions.NoUpdateException;
@@ -26,6 +27,7 @@ import org.taverna.server.master.utils.InvocationCounter.CallCounted;
  */
 class ListenerPropertyREST implements TavernaServerListenersREST.Property,
 		ListenerPropertyBean {
+	private Log log = getLog("Taverna.Server.Webapp");
 	private TavernaServerSupport support;
 	private Listener listen;
 	private String propertyName;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0bb7d2ec/server-webapp/src/main/java/org/taverna/server/master/RunREST.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/RunREST.java b/server-webapp/src/main/java/org/taverna/server/master/RunREST.java
index a0c65b3..a8cffec 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/RunREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/RunREST.java
@@ -10,9 +10,9 @@ import static javax.ws.rs.core.MediaType.TEXT_PLAIN;
 import static javax.ws.rs.core.Response.noContent;
 import static javax.ws.rs.core.Response.ok;
 import static javax.ws.rs.core.Response.status;
+import static org.apache.commons.logging.LogFactory.getLog;
 import static org.joda.time.format.ISODateTimeFormat.dateTime;
 import static org.joda.time.format.ISODateTimeFormat.dateTimeParser;
-import static org.taverna.server.master.TavernaServer.log;
 import static org.taverna.server.master.common.Roles.SELF;
 import static org.taverna.server.master.common.Roles.USER;
 import static org.taverna.server.master.common.Status.Initialized;
@@ -26,6 +26,7 @@ import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriInfo;
 import javax.xml.bind.JAXBException;
 
+import org.apache.commons.logging.Log;
 import org.joda.time.DateTime;
 import org.ogf.usage.JobUsageRecord;
 import org.springframework.beans.factory.annotation.Required;
@@ -57,6 +58,7 @@ import org.taverna.server.port_description.OutputDescription;
  * @author Donal Fellows
  */
 abstract class RunREST implements TavernaServerRunREST, RunBean {
+	private Log log = getLog("Taverna.Server.Webapp");
 	private String runName;
 	private TavernaRun run;
 	private TavernaServerSupport support;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0bb7d2ec/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java b/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java
index b8e5a22..62daf7d 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java
@@ -125,7 +125,7 @@ public abstract class TavernaServer implements TavernaServerSOAP,
 			+ Version.JAVA + ",name=";
 
 	/** The logger for the server framework. */
-	public static Log log = getLog("Taverna.Server.Webapp");
+	public Log log = getLog("Taverna.Server.Webapp");
 
 	@PreDestroy
 	void closeLog() {

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0bb7d2ec/server-webapp/src/main/java/org/taverna/server/master/TavernaServerSupport.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/TavernaServerSupport.java b/server-webapp/src/main/java/org/taverna/server/master/TavernaServerSupport.java
index c9a8dae..c5c219b 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/TavernaServerSupport.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/TavernaServerSupport.java
@@ -88,7 +88,7 @@ import org.taverna.server.master.utils.UsernamePrincipal;
 		+ Version.JAVA + " web-application interface.")
 public class TavernaServerSupport {
 	/** The main webapp log. */
-	public static Log log = getLog("Taverna.Server.Webapp");
+	private Log log = getLog("Taverna.Server.Webapp");
 	private Log accessLog = getLog("Taverna.Server.Webapp.Access");;
 	/** Bean used to log counts of external calls. */
 	private InvocationCounter counter;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0bb7d2ec/server-webapp/src/main/java/org/taverna/server/master/identity/UserStore.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/identity/UserStore.java b/server-webapp/src/main/java/org/taverna/server/master/identity/UserStore.java
index fdd615b..054d932 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/identity/UserStore.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/identity/UserStore.java
@@ -50,7 +50,7 @@ import org.taverna.server.master.utils.JDOSupport;
 public class UserStore extends JDOSupport<User> implements UserDetailsService,
 		UserStoreAPI {
 	/** The logger for the user store. */
-	private static Log log = getLog("Taverna.Server.UserDB");
+	private transient Log log = getLog("Taverna.Server.UserDB");
 
 	public UserStore() {
 		super(User.class);

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0bb7d2ec/server-webapp/src/main/java/org/taverna/server/master/identity/WorkflowInternalAuthProvider.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/identity/WorkflowInternalAuthProvider.java b/server-webapp/src/main/java/org/taverna/server/master/identity/WorkflowInternalAuthProvider.java
index d8361e5..9219a60 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/identity/WorkflowInternalAuthProvider.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/identity/WorkflowInternalAuthProvider.java
@@ -54,7 +54,7 @@ import org.taverna.server.master.worker.RunDatabaseDAO;
  */
 public class WorkflowInternalAuthProvider extends
 		AbstractUserDetailsAuthenticationProvider {
-	private static Log log = LogFactory.getLog("Taverna.Server.UserDB");
+	private Log log = LogFactory.getLog("Taverna.Server.UserDB");
 	private static final boolean logDecisions = true;
 	public static final String PREFIX = "wfrun_";
 	private RunDatabaseDAO dao;
@@ -265,7 +265,7 @@ public class WorkflowInternalAuthProvider extends
 	}
 
 	public static class WorkflowSelfIDMapper implements LocalIdentityMapper {
-		private static Log log = LogFactory.getLog("Taverna.Server.UserDB");
+		private Log log = LogFactory.getLog("Taverna.Server.UserDB");
 		private RunStore runStore;
 
 		@PreDestroy

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0bb7d2ec/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java b/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java
index 248baa6..233023c 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java
@@ -143,6 +143,7 @@ public abstract class AbstractRemoteRunFactory extends RunFactoryConfiguration
 		}
 	}
 
+	/** Get a handle to a new instance of the RMI registry. */
 	private Registry makeRegistry(int port) throws RemoteException {
 		ProcessBuilder p = new ProcessBuilder(getJavaBinary());
 		p.command().add("-jar");

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0bb7d2ec/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java b/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
index 0449471..f1abf9b 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
@@ -13,10 +13,7 @@ import static java.util.UUID.randomUUID;
 import static org.apache.commons.logging.LogFactory.getLog;
 import static org.taverna.server.master.TavernaServer.JMX_ROOT;
 
-import java.io.BufferedReader;
 import java.io.File;
-import java.io.IOException;
-import java.io.InputStreamReader;
 import java.rmi.ConnectException;
 import java.rmi.ConnectIOException;
 import java.rmi.NotBoundException;
@@ -26,6 +23,7 @@ import java.util.UUID;
 
 import javax.annotation.Nonnull;
 import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
 import javax.xml.bind.JAXBException;
 
 import org.apache.commons.logging.Log;
@@ -146,14 +144,8 @@ public class ForkRunFactory extends AbstractRemoteRunFactory implements
 		// Spawn the subprocess
 		log.info("about to create subprocess: " + p.command());
 		factoryProcess = p.start();
-		Thread logger = new Thread(new OutputLogger(factoryProcessName,
-				factoryProcess), factoryProcessName + ".Logger");
-		logger.setDaemon(true);
-		logger.start();
-		Thread logger2 = new Thread(new ErrorLogger(factoryProcessName,
-				factoryProcess), factoryProcessName + ".Logger");
-		logger2.setDaemon(true);
-		logger2.start();
+		outlog = new OutputLogger(factoryProcessName, factoryProcess);
+		errlog = new ErrorLogger(factoryProcessName, factoryProcess);
 
 		// Wait for the subprocess to register itself in the RMI registry
 		Calendar deadline = Calendar.getInstance();
@@ -192,6 +184,18 @@ public class ForkRunFactory extends AbstractRemoteRunFactory implements
 		throw lastException;
 	}
 
+	private OutputLogger outlog;
+	private ErrorLogger errlog;
+
+	private void stopLoggers() {
+		if (outlog != null)
+			outlog.stop();
+		outlog = null;
+		if (errlog != null)
+			errlog.stop();
+		errlog = null;
+	}
+
 	private RemoteRunFactory getRemoteFactoryHandle(String name)
 			throws RemoteException, NotBoundException {
 		log.info("about to look up resource called " + name);
@@ -207,81 +211,38 @@ public class ForkRunFactory extends AbstractRemoteRunFactory implements
 		return rrf;
 	}
 
-	private static class OutputLogger implements Runnable {
+	private static class OutputLogger extends StreamLogger {
 		private final Log log;
 
 		OutputLogger(String name, Process process) {
+			super(name, process.getInputStream());
 			log = getLog("Taverna.Server.LocalWorker." + name);
-			this.uniqueName = name;
-			this.br = new BufferedReader(new InputStreamReader(
-					process.getInputStream()));
 		}
 
-		private String uniqueName;
-		private BufferedReader br;
-
 		@Override
-		public void run() {
-			try {
-				String line;
-				while (true) {
-					line = br.readLine();
-					if (line == null)
-						break;
-					log.info(uniqueName + " subprocess output: " + line);
-				}
-			} catch (IOException e) {
-				// Do nothing...
-			} catch (Exception e) {
-				log.warn("failure in reading from " + uniqueName, e);
-			} finally {
-				try {
-					br.close();
-				} catch (Throwable e) {
-				}
-			}
+		protected void write(String msg) {
+			log.info("stdout: " + msg);
 		}
 	}
 
-	private static class ErrorLogger implements Runnable {
+	private static class ErrorLogger extends StreamLogger {
 		private final Log log;
 
 		ErrorLogger(String name, Process process) {
+			super(name, process.getInputStream());
 			log = getLog("Taverna.Server.LocalWorker." + name);
-			this.uniqueName = name;
-			this.br = new BufferedReader(new InputStreamReader(
-					process.getErrorStream()));
 		}
 
-		private String uniqueName;
-		private BufferedReader br;
-
 		@Override
-		public void run() {
-			try {
-				String line;
-				while (true) {
-					line = br.readLine();
-					if (line == null)
-						break;
-					log.info(uniqueName + " subprocess error: " + line);
-				}
-			} catch (IOException e) {
-				// Do nothing...
-			} catch (Exception e) {
-				log.warn("failure in reading from " + uniqueName, e);
-			} finally {
-				try {
-					br.close();
-				} catch (Throwable e) {
-				}
-			}
+		protected void write(String msg) {
+			log.info("stderr: " + msg);
 		}
 	}
 
 	/**
 	 * Destroys the subprocess that manufactures runs.
 	 */
+	@PreDestroy
 	public void killFactory() {
 		if (factory != null) {
 			log.info("requesting shutdown of " + factoryProcessName);
@@ -315,6 +276,7 @@ public class ForkRunFactory extends AbstractRemoteRunFactory implements
 				}
 			} finally {
 				factoryProcess = null;
+				stopLoggers();
 			}
 			if (code > 128) {
 				log.info(factoryProcessName + " died with signal="
@@ -327,12 +289,6 @@ public class ForkRunFactory extends AbstractRemoteRunFactory implements
 		}
 	}
 
-	@Override
-	protected void finalize() throws Throwable {
-		killFactory();
-		super.finalize();
-	}
-
 	/**
 	 * The real core of the run builder, factored out from its reliability
 	 * support.
@@ -347,6 +303,7 @@ public class ForkRunFactory extends AbstractRemoteRunFactory implements
 	 */
 	private RemoteSingleRun getRealRun(@Nonnull UsernamePrincipal creator,
 			@Nonnull String wf, UUID id) throws RemoteException {
+		@Nonnull
 		String globaluser = "Unknown Person";
 		if (creator != null)
 			globaluser = creator.getName();
@@ -359,6 +316,7 @@ public class ForkRunFactory extends AbstractRemoteRunFactory implements
 	@Override
 	protected RemoteSingleRun getRealRun(UsernamePrincipal creator,
 			Workflow workflow, UUID id) throws Exception {
+		@Nonnull
 		String wf = serializeWorkflow(workflow);
 		for (int i = 0; i < 3; i++) {
 			initFactory();

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0bb7d2ec/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java b/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
index 6edf128..667f1d8 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
@@ -10,15 +10,11 @@ import static java.lang.Thread.sleep;
 import static java.util.Arrays.asList;
 import static java.util.Calendar.SECOND;
 import static java.util.UUID.randomUUID;
-import static org.apache.commons.logging.LogFactory.getLog;
 import static org.taverna.server.master.TavernaServer.JMX_ROOT;
 
-import java.io.BufferedReader;
 import java.io.BufferedWriter;
 import java.io.File;
 import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
 import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
 import java.rmi.ConnectException;
@@ -335,50 +331,6 @@ public class IdAwareForkRunFactory extends AbstractRemoteRunFactory implements
 	}
 }
 
-abstract class StreamLogger {
-	protected final Log log;
-
-	protected StreamLogger(String name, InputStream is) {
-		log = getLog("Taverna.Server.LocalWorker." + name);
-		final String uniqueName = name;
-		final BufferedReader br = new BufferedReader(new InputStreamReader(is));
-		Thread t = new Thread(new Runnable() {
-			@Override
-			public void run() {
-				String line;
-				try {
-					while ((line = br.readLine()) != null)
-						if (!line.isEmpty())
-							write(line);
-				} catch (IOException e) {
-					// Do nothing...
-				} catch (Exception e) {
-					log.warn("failure in reading from " + uniqueName, e);
-				} finally {
-					try {
-						br.close();
-					} catch (Throwable e) {
-					}
-				}
-			}
-		}, name + ".StreamLogger");
-		t.setDaemon(true);
-		t.start();
-	}
-
-	/**
-	 * Write a line read from the subproces to the log.
-	 * <p>
-	 * This needs to be implemented by subclasses in order for the log to be
-	 * correctly written with the class name.
-	 * 
-	 * @param msg
-	 *            The message to write. Guaranteed to have no newline characters
-	 *            in it and to be non-empty.
-	 */
-	protected abstract void write(String msg);
-}
-
 class StdOut extends StreamLogger {
 	StdOut(Process process) {
 		super("forker", process.getInputStream());
@@ -414,6 +366,8 @@ class SecureFork implements IdAwareForkRunFactory.MetaFactory {
 	private Integer lastExitCode;
 	private Log log;
 	private LocalWorkerState state;
+	private StdOut out;
+	private StdErr err;
 
 	/**
 	 * Construct the command to run the meta-factory process.
@@ -456,8 +410,8 @@ class SecureFork implements IdAwareForkRunFactory.MetaFactory {
 		channel = new PrintWriter(new BufferedWriter(new OutputStreamWriter(
 				process.getOutputStream())), true);
 		// Log the responses
-		new StdOut(process);
-		new StdErr(process);
+		out=new StdOut(process);
+		err=new StdErr(process);
 	}
 
 	@Override
@@ -495,6 +449,8 @@ class SecureFork implements IdAwareForkRunFactory.MetaFactory {
 		} finally {
 			process = null;
 			channel = null;
+			out.stop();
+			err.stop();
 		}
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0bb7d2ec/server-webapp/src/main/java/org/taverna/server/master/localworker/StreamLogger.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/localworker/StreamLogger.java b/server-webapp/src/main/java/org/taverna/server/master/localworker/StreamLogger.java
new file mode 100644
index 0000000..b45129c
--- /dev/null
+++ b/server-webapp/src/main/java/org/taverna/server/master/localworker/StreamLogger.java
@@ -0,0 +1,60 @@
+package org.taverna.server.master.localworker;
+
+import static java.lang.Thread.interrupted;
+import static org.apache.commons.logging.LogFactory.getLog;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+import org.apache.commons.logging.Log;
+
+abstract class StreamLogger {
+	protected final Log log;
+	private Thread t;
+	private InputStream in;
+
+	protected StreamLogger(final String name, final InputStream is) {
+		log = getLog("Taverna.Server.LocalWorker." + name);
+		in = is;
+		t = new Thread(new Runnable() {
+			@Override
+			public void run() {
+				try (BufferedReader br = new BufferedReader(
+						new InputStreamReader(is))) {
+					String line;
+					while (!interrupted() && (line = br.readLine()) != null)
+						if (!line.isEmpty())
+							write(line);
+				} catch (IOException e) {
+					// Do nothing...
+				} catch (Exception e) {
+					log.warn("failure in reading from " + name, e);
+				}
+			}
+		}, name + ".StreamLogger");
+		t.setDaemon(true);
+		t.start();
+	}
+
+	/**
+	 * Write a line read from the subprocess to the log.
+	 * <p>
+	 * This needs to be implemented by subclasses in order for the log to be
+	 * correctly written with the class name.
+	 * 
+	 * @param msg
+	 *            The message to write. Guaranteed to have no newline characters
+	 *            in it and to be non-empty.
+	 */
+	protected abstract void write(String msg);
+
+	public void stop() {
+		t.interrupt();
+		try {
+			in.close();
+		} catch (IOException e) {
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0bb7d2ec/server-webapp/src/main/java/org/taverna/server/master/notification/atom/EventDAO.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/notification/atom/EventDAO.java b/server-webapp/src/main/java/org/taverna/server/master/notification/atom/EventDAO.java
index ac33133..0d95f54 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/notification/atom/EventDAO.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/notification/atom/EventDAO.java
@@ -5,6 +5,10 @@
  */
 package org.taverna.server.master.notification.atom;
 
+import static java.lang.Thread.interrupted;
+import static java.lang.Thread.sleep;
+import static java.util.Arrays.asList;
+
 import java.sql.Timestamp;
 import java.util.ArrayList;
 import java.util.Date;
@@ -13,6 +17,7 @@ import java.util.concurrent.ArrayBlockingQueue;
 import java.util.concurrent.BlockingQueue;
 
 import javax.annotation.Nonnull;
+import javax.annotation.PreDestroy;
 import javax.jdo.annotations.PersistenceAware;
 
 import org.apache.commons.logging.Log;
@@ -155,25 +160,38 @@ public class EventDAO extends JDOSupport<Event> implements MessageDispatcher {
 				messageSubject, messageContent));
 	}
 
+	private Thread eventDaemon;
+
 	@Required
 	public void setSelf(final EventDAO dao) {
-		Thread t = new Thread(new Runnable() {
+		eventDaemon = new Thread(new Runnable() {
 			@Override
 			public void run() {
 				try {
-					while (true) {
-						ArrayList<Event> e = new ArrayList<>();
-						e.add(insertQueue.take());
-						insertQueue.drainTo(e);
-						dao.storeEvents(e);
-						Thread.sleep(5000);
+					while (!interrupted()) {
+						transferEvents(dao, new ArrayList<Event>(
+								asList(insertQueue.take())));
+						sleep(5000);
 					}
 				} catch (InterruptedException e) {
+				} finally {
+					transferEvents(dao, new ArrayList<Event>());
 				}
 			}
-		});
-		t.setDaemon(true);
-		t.start();
+		}, "ATOM event daemon");
+		eventDaemon.setDaemon(true);
+		eventDaemon.start();
+	}
+
+	private void transferEvents(EventDAO dao, List<Event> e) {
+		insertQueue.drainTo(e);
+		dao.storeEvents(e);
+	}
+
+	@PreDestroy
+	void stopDaemon() {
+		if (eventDaemon != null)
+			eventDaemon.interrupt();
 	}
 
 	@WithinSingleTransaction

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0bb7d2ec/server-webapp/src/main/java/org/taverna/server/master/rest/handler/FileMessageHandler.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/rest/handler/FileMessageHandler.java b/server-webapp/src/main/java/org/taverna/server/master/rest/handler/FileMessageHandler.java
index f181a61..0aeb816 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/rest/handler/FileMessageHandler.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/rest/handler/FileMessageHandler.java
@@ -5,7 +5,7 @@
  */
 package org.taverna.server.master.rest.handler;
 
-import static org.taverna.server.master.TavernaServer.log;
+import static org.apache.commons.logging.LogFactory.getLog;
 
 import java.io.IOException;
 import java.io.OutputStream;
@@ -18,6 +18,7 @@ import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Provider;
 
+import org.apache.commons.logging.Log;
 import org.taverna.server.master.exceptions.FilesystemAccessException;
 import org.taverna.server.master.interfaces.File;
 
@@ -28,6 +29,7 @@ import org.taverna.server.master.interfaces.File;
  */
 @Provider
 public class FileMessageHandler implements MessageBodyWriter<File> {
+	private Log log = getLog("Taverna.Server.Webapp");
 	/** How much to pull from the worker in one read. */
 	private int maxChunkSize;
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0bb7d2ec/server-webapp/src/main/java/org/taverna/server/master/rest/handler/HandlerCore.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/rest/handler/HandlerCore.java b/server-webapp/src/main/java/org/taverna/server/master/rest/handler/HandlerCore.java
index efaf47d..0e3fb51 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/rest/handler/HandlerCore.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/rest/handler/HandlerCore.java
@@ -7,10 +7,11 @@ package org.taverna.server.master.rest.handler;
 
 import static javax.ws.rs.core.MediaType.TEXT_PLAIN_TYPE;
 import static javax.ws.rs.core.Response.status;
-import static org.taverna.server.master.TavernaServer.log;
+import static org.apache.commons.logging.LogFactory.getLog;
 
 import javax.ws.rs.core.Response;
 
+import org.apache.commons.logging.Log;
 import org.taverna.server.master.api.ManagementModel;
 
 /**
@@ -20,6 +21,7 @@ import org.taverna.server.master.api.ManagementModel;
  * @author Donal Fellows
  */
 public class HandlerCore {
+	private Log log = getLog("Taverna.Server.Webapp");
 	private ManagementModel managementModel;
 
 	/**

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0bb7d2ec/server-webapp/src/main/java/org/taverna/server/master/usage/UsageRecordRecorder.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/usage/UsageRecordRecorder.java b/server-webapp/src/main/java/org/taverna/server/master/usage/UsageRecordRecorder.java
index 16f8689..52fe73c 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/usage/UsageRecordRecorder.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/usage/UsageRecordRecorder.java
@@ -5,7 +5,7 @@
  */
 package org.taverna.server.master.usage;
 
-import static org.taverna.server.master.TavernaServer.log;
+import static org.apache.commons.logging.LogFactory.getLog;
 
 import java.io.FileWriter;
 import java.io.IOException;
@@ -17,6 +17,7 @@ import java.util.List;
 import javax.annotation.PreDestroy;
 import javax.xml.bind.JAXBException;
 
+import org.apache.commons.logging.Log;
 import org.ogf.usage.JobUsageRecord;
 import org.springframework.beans.factory.annotation.Required;
 import org.taverna.server.master.api.ManagementModel;
@@ -30,6 +31,7 @@ import org.taverna.server.master.utils.JDOSupport;
  * @author Donal Fellows
  */
 public class UsageRecordRecorder extends JDOSupport<UsageRecord> {
+	private Log log = getLog("Taverna.Server.Webapp");
 	public UsageRecordRecorder() {
 		super(UsageRecord.class);
 	}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0bb7d2ec/server-webapp/src/main/java/org/taverna/server/master/utils/WebappAwareDataSource.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/utils/WebappAwareDataSource.java b/server-webapp/src/main/java/org/taverna/server/master/utils/WebappAwareDataSource.java
index ca1f19f..03fc749 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/utils/WebappAwareDataSource.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/utils/WebappAwareDataSource.java
@@ -5,12 +5,17 @@
  */
 package org.taverna.server.master.utils;
 
+import static java.lang.Thread.currentThread;
+import static java.sql.DriverManager.deregisterDriver;
+import static java.sql.DriverManager.getDrivers;
 import static org.taverna.server.master.utils.Contextualizer.ROOT_PLACEHOLDER;
 
 import java.io.PrintWriter;
 import java.sql.Connection;
+import java.sql.Driver;
 import java.sql.DriverManager;
 import java.sql.SQLException;
+import java.util.Enumeration;
 
 import javax.annotation.PreDestroy;
 
@@ -49,6 +54,7 @@ public class WebappAwareDataSource extends BasicDataSource {
 	private void doInit() {
 		synchronized (this) {
 			if (!init) {
+				setDriverClassLoader(currentThread().getContextClassLoader());
 				String url = getUrl();
 				if (url.contains(ROOT_PLACEHOLDER)) {
 					String newurl = ctxt.contextualize(url);
@@ -108,5 +114,21 @@ public class WebappAwareDataSource extends BasicDataSource {
 			// Expected; ignore it
 		}
 		log = null;
+		dropDriver();
+	}
+
+	private void dropDriver() {
+		Enumeration<Driver> drivers = getDrivers();
+		while (drivers.hasMoreElements()) {
+			Driver d = drivers.nextElement();
+			if (d.getClass().getClassLoader() == getDriverClassLoader()
+					&& d.getClass().getName().equals(getDriverClassName())) {
+				try {
+					deregisterDriver(d);
+				} catch (SQLException e) {
+				}
+				break;
+			}
+		}
 	}
 }


[35/50] [abbrv] incubator-taverna-server git commit: Update admin.js

Posted by st...@apache.org.
Update admin.js

Include new function to empty WF URIs list

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/29837dcf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/29837dcf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/29837dcf

Branch: refs/heads/master
Commit: 29837dcf89067f8816d574980e4e1f76c7ffeb22
Parents: 183c785
Author: Giancarlo <gi...@gmail.com>
Authored: Thu Jun 5 10:51:51 2014 +0200
Committer: Giancarlo <gi...@gmail.com>
Committed: Thu Jun 5 10:51:51 2014 +0200

----------------------------------------------------------------------
 .../src/main/resources/static/admin.js          | 24 ++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/29837dcf/server-webapp/src/main/resources/static/admin.js
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/resources/static/admin.js b/server-webapp/src/main/resources/static/admin.js
index c2b4406..c2c41bf 100644
--- a/server-webapp/src/main/resources/static/admin.js
+++ b/server-webapp/src/main/resources/static/admin.js
@@ -194,8 +194,9 @@ function userRowHTML(idx) {
 
 /** How to get the list of permitted workflows; called on demand */
 function refreshWorkflows() {
-	var wftable = $("#workflows"), wfbut = $("#saveWorkflows"), wfref = $("#refreshWorkflows");
+	var wftable = $("#workflows"), wfbut = $("#saveWorkflows"), wfbut1 = $("#emptyWorkflows"), wfref = $("#refreshWorkflows");
 	wfbut.button("disable");
+	wfbut1.button("disable");
 	wfref.button("disable");
 	getJSON(where("permittedWorkflowURIs"), function(data) {
 		var s = "";
@@ -204,19 +205,32 @@ function refreshWorkflows() {
 		});
 		wftable.val($.trim(s));
 		wfbut.button("enable");
+		wfbut1.button("enable");
 		wfref.button("enable");
 	});
 }
 /** How to set the list of permitted workflows; called when the user clicks */
 function saveWorkflows() {
-	var wftable = $("#workflows"), wfbut = $("#saveWorkflows");
+	var wftable = $("#workflows"), wfbut = $("#saveWorkflows"), wfbut1 = $("#emptyWorkflows");
 	var xml = NodeAll("stringList", "string", wftable.val().split("\n"));
 	wfbut.button("disable");
+	wfbut1.button("disable");
 	putXML(where("permittedWorkflowURIs"), xml, function() {
 		refreshWorkflows();
 	});
 }
 
+/** How to empty the list of permitted workflows; called when the user clicks */
+function emptyWorkflows() {
+        var wftable = $("#workflows"), wfbut = $("#saveWorkflows"), wfbut1 = $("#emptyWorkflows");
+        var xml = NodeAll("stringList", "string", "");
+        wfbut.button("disable");
+        wfbut1.button("disable");
+        putXML(where("permittedWorkflowURIs"), xml, function() {
+                refreshWorkflows();
+        });
+}
+
 /** How to update the table of users; called on demand */
 function refreshUsers() {
 	var usertable = $("#userList");
@@ -497,6 +511,12 @@ $(function() {
 		refreshWorkflows();
 		event.preventDefault();
 	});
+	$("#emptyWorkflows").button({
+                disabled : true
+        }).click(function(event) {
+                emptyWorkflows();
+                event.preventDefault();
+        });
 
 	// Make the link to the list of usage records point correctly
 	// Original plan called for browsable table, but that's too slow


[12/50] [abbrv] incubator-taverna-server git commit: Use JSR 305 nullability assertions instead of findbugs ones.

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerRunREST.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerRunREST.java b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerRunREST.java
index 80f27ae..536c455 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerRunREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerRunREST.java
@@ -18,7 +18,9 @@ import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.GENE
 import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.IN;
 import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.LISTEN;
 import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.LOG;
+import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.NAME;
 import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.OUT;
+import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.ROOT;
 import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.RUNBUNDLE;
 import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.SEC;
 import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.STATUS;
@@ -26,8 +28,6 @@ import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.STDE
 import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.STDOUT;
 import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.T_CREATE;
 import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.T_EXPIRE;
-import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.NAME;
-import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.ROOT;
 import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.T_FINISH;
 import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.T_START;
 import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.USAGE;
@@ -38,6 +38,7 @@ import java.net.URI;
 import java.util.ArrayList;
 import java.util.List;
 
+import javax.annotation.Nonnull;
 import javax.annotation.security.RolesAllowed;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.DELETE;
@@ -75,8 +76,6 @@ import org.taverna.server.master.interfaces.Listener;
 import org.taverna.server.master.interfaces.TavernaRun;
 import org.taverna.server.port_description.OutputDescription;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-
 /**
  * This represents how a Taverna Server workflow run looks to a RESTful API.
  * 
@@ -97,8 +96,8 @@ public interface TavernaServerRunREST {
 	@Path(ROOT)
 	@Description("Describes a workflow run.")
 	@Produces({ XML, JSON })
-	@NonNull
-	public RunDescription getDescription(@NonNull @Context UriInfo ui);
+	@Nonnull
+	public RunDescription getDescription(@Nonnull @Context UriInfo ui);
 
 	/**
 	 * Deletes a workflow run.
@@ -110,7 +109,7 @@ public interface TavernaServerRunREST {
 	@DELETE
 	@Path(ROOT)
 	@Description("Deletes a workflow run.")
-	@NonNull
+	@Nonnull
 	public Response destroy() throws NoUpdateException;
 
 	/** Get an outline of the operations supported. */
@@ -128,7 +127,7 @@ public interface TavernaServerRunREST {
 	@Path(WF)
 	@Produces({ T2FLOW, XML, JSON })
 	@Description("Gives the workflow document used to create the workflow run.")
-	@NonNull
+	@Nonnull
 	public Workflow getWorkflow();
 
 	/** Get an outline of the operations supported. */
@@ -142,7 +141,7 @@ public interface TavernaServerRunREST {
 	@Path(NAME)
 	@Produces(TEXT)
 	@Description("Gives the descriptive name of the workflow run.")
-	@NonNull
+	@Nonnull
 	public String getName();
 
 	/**
@@ -157,7 +156,7 @@ public interface TavernaServerRunREST {
 	@Produces(TEXT)
 	@Description("Set the descriptive name of the workflow run. Note that "
 			+ "this value may be arbitrarily truncated by the implementation.")
-	@NonNull
+	@Nonnull
 	public String setName(String name) throws NoUpdateException;
 
 	/** Produce the workflow name HTTP operations. */
@@ -165,7 +164,7 @@ public interface TavernaServerRunREST {
 	@Path(NAME)
 	@Description("Produces the description of the operations on the run's "
 			+ "descriptive name.")
-	@NonNull
+	@Nonnull
 	Response nameOptions();
 
 	/**
@@ -178,7 +177,7 @@ public interface TavernaServerRunREST {
 	 */
 	@Path(SEC)
 	@Description("Access the workflow run's security.")
-	@NonNull
+	@Nonnull
 	public TavernaServerSecurityREST getSecurity() throws NotOwnerException;
 
 	/**
@@ -192,7 +191,7 @@ public interface TavernaServerRunREST {
 	@Produces(TEXT)
 	@Description("Gives the time when the workflow run becomes eligible for "
 			+ "automatic deletion.")
-	@NonNull
+	@Nonnull
 	public String getExpiryTime();
 
 	/**
@@ -212,8 +211,8 @@ public interface TavernaServerRunREST {
 	@Produces(TEXT)
 	@Description("Sets the time when the workflow run becomes eligible for "
 			+ "automatic deletion.")
-	@NonNull
-	public String setExpiryTime(@NonNull String expiry)
+	@Nonnull
+	public String setExpiryTime(@Nonnull String expiry)
 			throws NoUpdateException;
 
 	/** Get an outline of the operations supported. */
@@ -232,7 +231,7 @@ public interface TavernaServerRunREST {
 	@Produces(TEXT)
 	@Description("Gives the time when the workflow run was first submitted "
 			+ "to the server.")
-	@NonNull
+	@Nonnull
 	public String getCreateTime();
 
 	/** Get an outline of the operations supported. */
@@ -252,7 +251,7 @@ public interface TavernaServerRunREST {
 	@Produces(TEXT)
 	@Description("Gives the time when the workflow run was started, or an "
 			+ "empty string if the run has not yet started.")
-	@NonNull
+	@Nonnull
 	public String getStartTime();
 
 	/** Get an outline of the operations supported. */
@@ -272,7 +271,7 @@ public interface TavernaServerRunREST {
 	@Description("Gives the time when the workflow run was first detected as "
 			+ "finished, or an empty string if it has not yet finished "
 			+ "(including if it has never started).")
-	@NonNull
+	@Nonnull
 	public String getFinishTime();
 
 	/** Get an outline of the operations supported. */
@@ -290,7 +289,7 @@ public interface TavernaServerRunREST {
 	@Path(STATUS)
 	@Produces(TEXT)
 	@Description("Gives the current status of the workflow run.")
-	@NonNull
+	@Nonnull
 	public String getStatus();
 
 	/**
@@ -311,8 +310,8 @@ public interface TavernaServerRunREST {
 	@Consumes(TEXT)
 	@Produces(TEXT)
 	@Description("Attempts to update the status of the workflow run.")
-	@NonNull
-	public Response setStatus(@NonNull String status) throws NoUpdateException,
+	@Nonnull
+	public Response setStatus(@Nonnull String status) throws NoUpdateException,
 			BadStateChangeException;
 
 	/** Get an outline of the operations supported. */
@@ -328,7 +327,7 @@ public interface TavernaServerRunREST {
 	 */
 	@Path(DIR)
 	@Description("Get the working directory of this workflow run.")
-	@NonNull
+	@Nonnull
 	public TavernaServerDirectoryREST getWorkingDirectory();
 
 	/**
@@ -338,7 +337,7 @@ public interface TavernaServerRunREST {
 	 */
 	@Path(LISTEN)
 	@Description("Get the event listeners attached to this workflow run.")
-	@NonNull
+	@Nonnull
 	public TavernaServerListenersREST getListeners();
 
 	/**
@@ -350,8 +349,8 @@ public interface TavernaServerRunREST {
 	 */
 	@Path(IN)
 	@Description("Get the inputs to this workflow run.")
-	@NonNull
-	public TavernaServerInputREST getInputs(@NonNull @Context UriInfo ui);
+	@Nonnull
+	public TavernaServerInputREST getInputs(@Nonnull @Context UriInfo ui);
 
 	/**
 	 * Get the output Baclava file for this workflow run.
@@ -364,7 +363,7 @@ public interface TavernaServerRunREST {
 	@Produces(TEXT)
 	@Description("Gives the Baclava file where output will be written; empty "
 			+ "means use multiple simple files in the out directory.")
-	@NonNull
+	@Nonnull
 	public String getOutputFile();
 
 	/**
@@ -385,8 +384,8 @@ public interface TavernaServerRunREST {
 	@Path(OUT)
 	@Produces({ XML, JSON })
 	@Description("Gives a description of the outputs, as currently understood")
-	@NonNull
-	public OutputDescription getOutputDescription(@NonNull @Context UriInfo ui)
+	@Nonnull
+	public OutputDescription getOutputDescription(@Nonnull @Context UriInfo ui)
 			throws BadStateChangeException, FilesystemAccessException,
 			NoDirectoryEntryException;
 
@@ -412,8 +411,8 @@ public interface TavernaServerRunREST {
 	@Produces(TEXT)
 	@Description("Sets the Baclava file where output will be written; empty "
 			+ "means use multiple simple files in the out directory.")
-	@NonNull
-	public String setOutputFile(@NonNull String filename)
+	@Nonnull
+	public String setOutputFile(@Nonnull String filename)
 			throws NoUpdateException, FilesystemAccessException,
 			BadStateChangeException;
 
@@ -430,7 +429,7 @@ public interface TavernaServerRunREST {
 	 */
 	@Path(FEED_URL_DIR)
 	@Description("Access the interaction feed for the workflow run.")
-	@NonNull
+	@Nonnull
 	InteractionFeedREST getInteractionFeed();
 
 	/**
@@ -442,7 +441,7 @@ public interface TavernaServerRunREST {
 	@Path(STDOUT)
 	@Description("Return the stdout for the workflow run.")
 	@Produces(TEXT)
-	@NonNull
+	@Nonnull
 	String getStdout() throws NoListenerException;
 
 	/** Get an outline of the operations supported. */
@@ -460,7 +459,7 @@ public interface TavernaServerRunREST {
 	@Path(STDERR)
 	@Description("Return the stderr for the workflow run.")
 	@Produces(TEXT)
-	@NonNull
+	@Nonnull
 	String getStderr() throws NoListenerException;
 
 	/** Get an outline of the operations supported. */
@@ -479,7 +478,7 @@ public interface TavernaServerRunREST {
 	@Path(USAGE)
 	@Description("Return the usage record for the workflow run.")
 	@Produces(XML)
-	@NonNull
+	@Nonnull
 	Response getUsage() throws NoListenerException, JAXBException;
 
 	/** Get an outline of the operations supported. */
@@ -496,7 +495,7 @@ public interface TavernaServerRunREST {
 	@Path(LOG)
 	@Description("Return the log for the workflow run.")
 	@Produces(TEXT)
-	@NonNull
+	@Nonnull
 	Response getLogContents();
 
 	/** Get an outline of the operations supported. */
@@ -513,7 +512,7 @@ public interface TavernaServerRunREST {
 	@Path(RUNBUNDLE)
 	@Description("Return the run bundle for the workflow run.")
 	@Produces(ROBUNDLE)
-	@NonNull
+	@Nonnull
 	Response getRunBundle();
 
 	/** Get an outline of the operations supported. */
@@ -530,7 +529,7 @@ public interface TavernaServerRunREST {
 	@Path(GENERATE_PROVENANCE)
 	@Description("Whether to create the run bundle for the workflow run.")
 	@Produces(TEXT)
-	@NonNull
+	@Nonnull
 	boolean getGenerateProvenance();
 
 	/**
@@ -545,7 +544,7 @@ public interface TavernaServerRunREST {
 	@Description("Whether to create the run bundle for the workflow run.")
 	@Consumes(TEXT)
 	@Produces(TEXT)
-	@NonNull
+	@Nonnull
 	boolean setGenerateProvenance(boolean provenanceFlag) throws NoUpdateException;
 
 	/** Get an outline of the operations supported. */

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerSecurityREST.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerSecurityREST.java b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerSecurityREST.java
index c76f54b..73000e8 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerSecurityREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerSecurityREST.java
@@ -27,6 +27,7 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
+import javax.annotation.Nonnull;
 import javax.annotation.security.RolesAllowed;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.DELETE;
@@ -59,8 +60,6 @@ import org.taverna.server.master.exceptions.BadStateChangeException;
 import org.taverna.server.master.exceptions.InvalidCredentialException;
 import org.taverna.server.master.exceptions.NoCredentialException;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-
 /**
  * Manages the security of the workflow run. In general, only the owner of a run
  * may access this resource. Many of these security-related resources may only
@@ -96,8 +95,8 @@ public interface TavernaServerSecurityREST {
 	@Produces({ XML, JSON })
 	@Description("Gives a description of the security information supported "
 			+ "by the workflow run.")
-	@NonNull
-	Descriptor describe(@NonNull @Context UriInfo ui);
+	@Nonnull
+	Descriptor describe(@Nonnull @Context UriInfo ui);
 
 	/** Get an outline of the operations supported. */
 	@OPTIONS
@@ -114,7 +113,7 @@ public interface TavernaServerSecurityREST {
 	@Path(OWNER)
 	@Produces(TEXT)
 	@Description("Gives the identity of who owns the workflow run.")
-	@NonNull
+	@Nonnull
 	String getOwner();
 
 	/** Get an outline of the operations supported. */
@@ -124,8 +123,8 @@ public interface TavernaServerSecurityREST {
 	Response ownerOptions();
 
 	/*
-	 * @PUT @Path("/") @Consumes(ContentTypes.BYTES) @CallCounted @NonNull
-	 * public void set(@NonNull InputStream contents, @NonNull @Context UriInfo
+	 * @PUT @Path("/") @Consumes(ContentTypes.BYTES) @CallCounted @Nonnull
+	 * public void set(@Nonnull InputStream contents, @Nonnull @Context UriInfo
 	 * ui);
 	 */
 
@@ -136,7 +135,7 @@ public interface TavernaServerSecurityREST {
 	@Path(CREDS)
 	@Produces({ XML, JSON })
 	@Description("Gives a list of credentials supplied to this workflow run.")
-	@NonNull
+	@Nonnull
 	CredentialList listCredentials();
 
 	/** Get an outline of the operations supported. */
@@ -164,8 +163,8 @@ public interface TavernaServerSecurityREST {
 	@Path(ONE_CRED)
 	@Produces({ XML, JSON })
 	@Description("Describes a particular credential.")
-	@NonNull
-	CredentialHolder getParticularCredential(@NonNull @PathParam("id") String id)
+	@Nonnull
+	CredentialHolder getParticularCredential(@Nonnull @PathParam("id") String id)
 			throws NoCredentialException;
 
 	/**
@@ -188,10 +187,10 @@ public interface TavernaServerSecurityREST {
 	@Consumes({ XML, JSON })
 	@Produces({ XML, JSON })
 	@Description("Updates a particular credential.")
-	@NonNull
+	@Nonnull
 	CredentialHolder setParticularCredential(
-			@NonNull @PathParam("id") String id, @NonNull CredentialHolder c,
-			@NonNull @Context UriInfo ui) throws InvalidCredentialException,
+			@Nonnull @PathParam("id") String id, @Nonnull CredentialHolder c,
+			@Nonnull @Context UriInfo ui) throws InvalidCredentialException,
 			BadStateChangeException;
 
 	/**
@@ -211,9 +210,9 @@ public interface TavernaServerSecurityREST {
 	@Path(CREDS)
 	@Consumes({ XML, JSON })
 	@Description("Creates a new credential.")
-	@NonNull
-	Response addCredential(@NonNull CredentialHolder c,
-			@NonNull @Context UriInfo ui) throws InvalidCredentialException,
+	@Nonnull
+	Response addCredential(@Nonnull CredentialHolder c,
+			@Nonnull @Context UriInfo ui) throws InvalidCredentialException,
 			BadStateChangeException;
 
 	/**
@@ -228,8 +227,8 @@ public interface TavernaServerSecurityREST {
 	@DELETE
 	@Path(CREDS)
 	@Description("Deletes all credentials.")
-	@NonNull
-	Response deleteAllCredentials(@NonNull @Context UriInfo ui)
+	@Nonnull
+	Response deleteAllCredentials(@Nonnull @Context UriInfo ui)
 			throws BadStateChangeException;
 
 	/**
@@ -246,9 +245,9 @@ public interface TavernaServerSecurityREST {
 	@DELETE
 	@Path(ONE_CRED)
 	@Description("Deletes a particular credential.")
-	@NonNull
-	Response deleteCredential(@NonNull @PathParam("id") String id,
-			@NonNull @Context UriInfo ui) throws BadStateChangeException;
+	@Nonnull
+	Response deleteCredential(@Nonnull @PathParam("id") String id,
+			@Nonnull @Context UriInfo ui) throws BadStateChangeException;
 
 	/** Get an outline of the operations supported. */
 	@OPTIONS
@@ -272,7 +271,7 @@ public interface TavernaServerSecurityREST {
 	@Produces({ XML, JSON })
 	@Description("Gives a list of trusted identities supplied to this "
 			+ "workflow run.")
-	@NonNull
+	@Nonnull
 	TrustList listTrusted();
 
 	/**
@@ -288,8 +287,8 @@ public interface TavernaServerSecurityREST {
 	@Path(ONE_TRUST)
 	@Produces({ XML, JSON })
 	@Description("Describes a particular trusted identity.")
-	@NonNull
-	Trust getParticularTrust(@NonNull @PathParam("id") String id)
+	@Nonnull
+	Trust getParticularTrust(@Nonnull @PathParam("id") String id)
 			throws NoCredentialException;
 
 	/**
@@ -312,9 +311,9 @@ public interface TavernaServerSecurityREST {
 	@Consumes({ XML, JSON })
 	@Produces({ XML, JSON })
 	@Description("Updates a particular trusted identity.")
-	@NonNull
-	Trust setParticularTrust(@NonNull @PathParam("id") String id,
-			@NonNull Trust t, @NonNull @Context UriInfo ui)
+	@Nonnull
+	Trust setParticularTrust(@Nonnull @PathParam("id") String id,
+			@Nonnull Trust t, @Nonnull @Context UriInfo ui)
 			throws InvalidCredentialException, BadStateChangeException;
 
 	/**
@@ -334,8 +333,8 @@ public interface TavernaServerSecurityREST {
 	@Path(TRUSTS)
 	@Consumes({ XML, JSON })
 	@Description("Adds a new trusted identity.")
-	@NonNull
-	Response addTrust(@NonNull Trust t, @NonNull @Context UriInfo ui)
+	@Nonnull
+	Response addTrust(@Nonnull Trust t, @Nonnull @Context UriInfo ui)
 			throws InvalidCredentialException, BadStateChangeException;
 
 	/**
@@ -350,8 +349,8 @@ public interface TavernaServerSecurityREST {
 	@DELETE
 	@Path(TRUSTS)
 	@Description("Deletes all trusted identities.")
-	@NonNull
-	Response deleteAllTrusts(@NonNull @Context UriInfo ui)
+	@Nonnull
+	Response deleteAllTrusts(@Nonnull @Context UriInfo ui)
 			throws BadStateChangeException;
 
 	/**
@@ -368,9 +367,9 @@ public interface TavernaServerSecurityREST {
 	@DELETE
 	@Path(ONE_TRUST)
 	@Description("Deletes a particular trusted identity.")
-	@NonNull
-	Response deleteTrust(@NonNull @PathParam("id") String id,
-			@NonNull @Context UriInfo ui) throws BadStateChangeException;
+	@Nonnull
+	Response deleteTrust(@Nonnull @PathParam("id") String id,
+			@Nonnull @Context UriInfo ui) throws BadStateChangeException;
 
 	/** Get an outline of the operations supported. */
 	@OPTIONS
@@ -396,8 +395,8 @@ public interface TavernaServerSecurityREST {
 	@Description("Gives a list of all non-default permissions associated with "
 			+ "the enclosing workflow run. By default, nobody has any access "
 			+ "at all except for the owner of the run.")
-	@NonNull
-	PermissionsDescription describePermissions(@NonNull @Context UriInfo ui);
+	@Nonnull
+	PermissionsDescription describePermissions(@Nonnull @Context UriInfo ui);
 
 	/**
 	 * Describe the particular permission granted to a user.
@@ -410,8 +409,8 @@ public interface TavernaServerSecurityREST {
 	@Path(ONE_PERM)
 	@Produces(TEXT)
 	@Description("Describes the permission granted to a particular user.")
-	@NonNull
-	Permission describePermission(@NonNull @PathParam("id") String id);
+	@Nonnull
+	Permission describePermission(@Nonnull @PathParam("id") String id);
 
 	/**
 	 * Update the permission granted to a user.
@@ -428,9 +427,9 @@ public interface TavernaServerSecurityREST {
 	@Produces(TEXT)
 	@Path(ONE_PERM)
 	@Description("Updates the permissions granted to a particular user.")
-	@NonNull
-	Permission setPermission(@NonNull @PathParam("id") String id,
-			@NonNull Permission perm);
+	@Nonnull
+	Permission setPermission(@Nonnull @PathParam("id") String id,
+			@Nonnull Permission perm);
 
 	/**
 	 * Delete the permissions associated with a user, which restores them to the
@@ -446,9 +445,9 @@ public interface TavernaServerSecurityREST {
 	@Path(ONE_PERM)
 	@Description("Deletes (by resetting to default) the permissions "
 			+ "associated with a particular user.")
-	@NonNull
-	Response deletePermission(@NonNull @PathParam("id") String id,
-			@NonNull @Context UriInfo ui);
+	@Nonnull
+	Response deletePermission(@Nonnull @PathParam("id") String id,
+			@Nonnull @Context UriInfo ui);
 
 	/**
 	 * Manufacture a permission setting for a previously-unknown user.
@@ -464,9 +463,9 @@ public interface TavernaServerSecurityREST {
 	@Path(PERMS)
 	@Consumes({ XML, JSON })
 	@Description("Creates a new assignment of permissions to a particular user.")
-	@NonNull
-	Response makePermission(@NonNull PermissionDescription desc,
-			@NonNull @Context UriInfo ui);
+	@Nonnull
+	Response makePermission(@Nonnull PermissionDescription desc,
+			@Nonnull @Context UriInfo ui);
 
 	/**
 	 * A description of the security resources associated with a workflow run.
@@ -505,8 +504,8 @@ public interface TavernaServerSecurityREST {
 		 * @param trust
 		 *            The trusted certificates associated with the context.
 		 */
-		public Descriptor(@NonNull UriBuilder ub, @NonNull String owner,
-				@NonNull Credential[] credential, @NonNull Trust[] trust) {
+		public Descriptor(@Nonnull UriBuilder ub, @Nonnull String owner,
+				@Nonnull Credential[] credential, @Nonnull Trust[] trust) {
 			super(true);
 			this.owner = owner;
 			this.permissions = new Uri(ub, PERMS);
@@ -541,8 +540,8 @@ public interface TavernaServerSecurityREST {
 			 * @param credential
 			 *            The credentials in the collection.
 			 */
-			public Credentials(@NonNull URI uri,
-					@NonNull Credential[] credential) {
+			public Credentials(@Nonnull URI uri,
+					@Nonnull Credential[] credential) {
 				this.href = uri;
 				for (Credential c : credential)
 					this.credential.add(new CredentialHolder(c));
@@ -575,7 +574,7 @@ public interface TavernaServerSecurityREST {
 			 * @param trust
 			 *            The trusted certificates in the collection.
 			 */
-			public Trusts(@NonNull URI uri, @NonNull Trust[] trust) {
+			public Trusts(@Nonnull URI uri, @Nonnull Trust[] trust) {
 				this.href = uri;
 				this.trust = trust.clone();
 			}
@@ -638,7 +637,7 @@ public interface TavernaServerSecurityREST {
 	public static final class CredentialList extends VersionedElement {
 		/** The descriptions of the credentials */
 		@XmlElement
-		@NonNull
+		@Nonnull
 		public List<CredentialHolder> credential = new ArrayList<>();
 
 		public CredentialList() {
@@ -650,7 +649,7 @@ public interface TavernaServerSecurityREST {
 		 * @param credential
 		 *            The descriptions of individual credentials.
 		 */
-		public CredentialList(@NonNull Credential[] credential) {
+		public CredentialList(@Nonnull Credential[] credential) {
 			super(true);
 			for (Credential c : credential)
 				this.credential.add(new CredentialHolder(c));
@@ -677,7 +676,7 @@ public interface TavernaServerSecurityREST {
 		 * @param trust
 		 *            The descriptions of individual certificates.
 		 */
-		public TrustList(@NonNull Trust[] trust) {
+		public TrustList(@Nonnull Trust[] trust) {
 			super(true);
 			this.trust = trust.clone();
 		}
@@ -722,8 +721,8 @@ public interface TavernaServerSecurityREST {
 			 * @param strings
 			 *            Parameters to the URI builder.
 			 */
-			LinkedPermissionDescription(@NonNull UriBuilder ub,
-					@NonNull String userName, @NonNull Permission permission,
+			LinkedPermissionDescription(@Nonnull UriBuilder ub,
+					@Nonnull String userName, @Nonnull Permission permission,
 					String... strings) {
 				super(ub, strings);
 				this.userName = userName;
@@ -748,8 +747,8 @@ public interface TavernaServerSecurityREST {
 		 * @param permissionMap
 		 *            The permissions to describe.
 		 */
-		public PermissionsDescription(@NonNull UriBuilder ub,
-				@NonNull Map<String, Permission> permissionMap) {
+		public PermissionsDescription(@Nonnull UriBuilder ub,
+				@Nonnull Map<String, Permission> permissionMap) {
 			permission = new ArrayList<>();
 			List<String> userNames = new ArrayList<>(permissionMap.keySet());
 			Collections.sort(userNames);

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/utils/JDOSupport.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/utils/JDOSupport.java b/server-webapp/src/main/java/org/taverna/server/master/utils/JDOSupport.java
index 722cfa4..9bfe8b4 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/utils/JDOSupport.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/utils/JDOSupport.java
@@ -12,6 +12,8 @@ import static org.apache.commons.logging.LogFactory.getLog;
 import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
 
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.annotation.PreDestroy;
 import javax.jdo.JDOException;
 import javax.jdo.PersistenceManager;
@@ -25,9 +27,6 @@ import org.aspectj.lang.annotation.Around;
 import org.aspectj.lang.annotation.Aspect;
 import org.springframework.beans.factory.annotation.Required;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-import edu.umd.cs.findbugs.annotations.Nullable;
-
 /**
  * Simple support class that wraps up and provides access to the correct parts
  * of JDO.
@@ -47,7 +46,7 @@ public abstract class JDOSupport<T> {
 	 * @param contextClass
 	 *            Must match the type parameter to the class itself.
 	 */
-	protected JDOSupport(@NonNull Class<T> contextClass) {
+	protected JDOSupport(@Nonnull Class<T> contextClass) {
 		this.contextClass = contextClass;
 	}
 
@@ -83,8 +82,8 @@ public abstract class JDOSupport<T> {
 	 *            The filter part of the query.
 	 * @return The query, which should be executed to retrieve the results.
 	 */
-	@NonNull
-	protected Query query(@NonNull String filter) {
+	@Nonnull
+	protected Query query(@Nonnull String filter) {
 		return pm.newQuery(contextClass, filter);
 	}
 
@@ -97,8 +96,8 @@ public abstract class JDOSupport<T> {
 	 * @return The query, which should be executed to retrieve the results.
 	 * @see javax.jdo.annotations.Query
 	 */
-	@NonNull
-	protected Query namedQuery(@NonNull String name) {
+	@Nonnull
+	protected Query namedQuery(@Nonnull String name) {
 		return pm.newNamedQuery(contextClass, name);
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/utils/WebappAwareDataSource.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/utils/WebappAwareDataSource.java b/server-webapp/src/main/java/org/taverna/server/master/utils/WebappAwareDataSource.java
index bc5273a..ca1f19f 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/utils/WebappAwareDataSource.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/utils/WebappAwareDataSource.java
@@ -19,15 +19,12 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.springframework.beans.factory.annotation.Required;
 
-import edu.umd.cs.findbugs.annotations.SuppressWarnings;
-
 /**
  * Add some awareness of the context so that we can locate databases internally
  * to the webapp.
  * 
  * @author Donal Fellows
  */
-@SuppressWarnings("IS2_INCONSISTENT_SYNC")
 public class WebappAwareDataSource extends BasicDataSource {
 	Log log = LogFactory.getLog("Taverna.Server.Utils");
 	private transient boolean init;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/worker/PolicyImpl.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/worker/PolicyImpl.java b/server-webapp/src/main/java/org/taverna/server/master/worker/PolicyImpl.java
index a01f995..f5613c7 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/worker/PolicyImpl.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/worker/PolicyImpl.java
@@ -26,8 +26,6 @@ import org.taverna.server.master.interfaces.TavernaRun;
 import org.taverna.server.master.interfaces.TavernaSecurityContext;
 import org.taverna.server.master.utils.UsernamePrincipal;
 
-import edu.umd.cs.findbugs.annotations.SuppressWarnings;
-
 /**
  * Basic policy implementation that allows any workflow to be instantiated by
  * any user, but which does not permit users to access each others workflow
@@ -35,7 +33,6 @@ import edu.umd.cs.findbugs.annotations.SuppressWarnings;
  * 
  * @author Donal Fellows
  */
-@SuppressWarnings("IS2_INCONSISTENT_SYNC")
 class PolicyImpl implements Policy {
 	Log log = LogFactory.getLog("Taverna.Server.Worker.Policy");
 	private PolicyLimits limits;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/worker/RemoteRunDelegate.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/worker/RemoteRunDelegate.java b/server-webapp/src/main/java/org/taverna/server/master/worker/RemoteRunDelegate.java
index d5b1ca8..22158d5 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/worker/RemoteRunDelegate.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/worker/RemoteRunDelegate.java
@@ -36,6 +36,8 @@ import java.util.UUID;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipOutputStream;
 
+import javax.annotation.Nonnull;
+
 import org.apache.commons.logging.Log;
 import org.taverna.server.localworker.remote.IllegalStateTransitionException;
 import org.taverna.server.localworker.remote.ImplementationException;
@@ -65,14 +67,11 @@ import org.taverna.server.master.interfaces.TavernaRun;
 import org.taverna.server.master.interfaces.TavernaSecurityContext;
 import org.taverna.server.master.utils.UsernamePrincipal;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-
 /**
  * Bridging shim between the WebApp world and the RMI world.
  * 
  * @author Donal Fellows
  */
-@edu.umd.cs.findbugs.annotations.SuppressWarnings("SE_NO_SERIALVERSIONID")
 @SuppressWarnings("serial")
 public class RemoteRunDelegate implements TavernaRun {
 	private transient Log log = getLog("Taverna.Server.Worker");
@@ -502,7 +501,7 @@ public class RemoteRunDelegate implements TavernaRun {
 	}
 
 	@Override
-	public void setName(@NonNull String name) {
+	public void setName(@Nonnull String name) {
 		if (name.length() > RunConnection.NAME_LENGTH)
 			this.name = name.substring(0, RunConnection.NAME_LENGTH);
 		else

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/worker/RunConnection.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/worker/RunConnection.java b/server-webapp/src/main/java/org/taverna/server/master/worker/RunConnection.java
index 06ad617..cf55ea0 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/worker/RunConnection.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/worker/RunConnection.java
@@ -20,6 +20,7 @@ import java.util.Date;
 import java.util.HashSet;
 import java.util.List;
 
+import javax.annotation.Nonnull;
 import javax.jdo.annotations.Column;
 import javax.jdo.annotations.Join;
 import javax.jdo.annotations.PersistenceCapable;
@@ -35,9 +36,6 @@ import org.taverna.server.master.common.Workflow;
 import org.taverna.server.master.interfaces.SecurityContextFactory;
 import org.taverna.server.master.utils.UsernamePrincipal;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-import edu.umd.cs.findbugs.annotations.SuppressWarnings;
-
 /**
  * The representation of the connections to the runs that actually participates
  * in the persistence system.
@@ -50,7 +48,6 @@ import edu.umd.cs.findbugs.annotations.SuppressWarnings;
 		@Query(name = "names", language = "SQL", value = NAMES_QUERY, unique = "false", resultClass = String.class),
 		@Query(name = "unterminated", language = "SQL", value = UNTERMINATED_QUERY, unique = "false", resultClass = String.class),
 		@Query(name = "timedout", language = "SQL", value = TIMEOUT_QUERY, unique = "false", resultClass = String.class) })
-@SuppressWarnings("IS2_INCONSISTENT_SYNC")
 public class RunConnection {
 	static final String SCHEMA = "TAVERNA";
 	static final String TABLE = "RUN_CONNECTION";
@@ -153,8 +150,8 @@ public class RunConnection {
 	 * @throws IOException
 	 *             If serialisation fails.
 	 */
-	@NonNull
-	public static RunConnection toDBform(@NonNull RemoteRunDelegate rrd)
+	@Nonnull
+	public static RunConnection toDBform(@Nonnull RemoteRunDelegate rrd)
 			throws IOException {
 		RunConnection rc = new RunConnection();
 		rc.id = rrd.id;
@@ -178,8 +175,8 @@ public class RunConnection {
 	 * @throws Exception
 	 *             If anything goes wrong.
 	 */
-	@NonNull
-	public RemoteRunDelegate fromDBform(@NonNull RunDBSupport db)
+	@Nonnull
+	public RemoteRunDelegate fromDBform(@Nonnull RunDBSupport db)
 			throws Exception {
 		RemoteRunDelegate rrd = new RemoteRunDelegate();
 		rrd.id = getId();
@@ -210,7 +207,7 @@ public class RunConnection {
 	 * @throws IOException
 	 *             If anything goes wrong in serialization.
 	 */
-	public void makeChanges(@NonNull RemoteRunDelegate rrd) throws IOException {
+	public void makeChanges(@Nonnull RemoteRunDelegate rrd) throws IOException {
 		// Properties that are set exactly once
 		if (creationInstant == null) {
 			creationInstant = rrd.getCreationTimestamp();

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/worker/RunDBSupport.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/worker/RunDBSupport.java b/server-webapp/src/main/java/org/taverna/server/master/worker/RunDBSupport.java
index d9f60b7..2aa7ed1 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/worker/RunDBSupport.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/worker/RunDBSupport.java
@@ -7,10 +7,10 @@ package org.taverna.server.master.worker;
 
 import java.util.List;
 
-import org.taverna.server.master.notification.NotificationEngine;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-import edu.umd.cs.findbugs.annotations.Nullable;
+import org.taverna.server.master.notification.NotificationEngine;
 
 /**
  * The interface to the database of runs.
@@ -43,7 +43,7 @@ public interface RunDBSupport {
 	 * @param run
 	 *            The run to persist.
 	 */
-	void flushToDisk(@NonNull RemoteRunDelegate run);
+	void flushToDisk(@Nonnull RemoteRunDelegate run);
 
 	/**
 	 * Select an arbitrary representative run.
@@ -60,7 +60,7 @@ public interface RunDBSupport {
 	 * 
 	 * @return The names (i.e., UUIDs) of all the runs.
 	 */
-	@NonNull
+	@Nonnull
 	List<String> listRunNames();
 
 	/**

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/worker/RunDatabase.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/worker/RunDatabase.java b/server-webapp/src/main/java/org/taverna/server/master/worker/RunDatabase.java
index 8822d03..cedb4b5 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/worker/RunDatabase.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/worker/RunDatabase.java
@@ -17,6 +17,8 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.UUID;
 
+import javax.annotation.Nullable;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -31,8 +33,6 @@ import org.taverna.server.master.notification.NotificationEngine;
 import org.taverna.server.master.notification.NotificationEngine.Message;
 import org.taverna.server.master.utils.UsernamePrincipal;
 
-import edu.umd.cs.findbugs.annotations.Nullable;
-
 /**
  * The main facade bean that interfaces to the database of runs.
  * 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/worker/RunDatabaseDAO.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/worker/RunDatabaseDAO.java b/server-webapp/src/main/java/org/taverna/server/master/worker/RunDatabaseDAO.java
index 1445373..51931c0 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/worker/RunDatabaseDAO.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/worker/RunDatabaseDAO.java
@@ -15,6 +15,8 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.jdo.annotations.PersistenceAware;
 
 import org.apache.commons.logging.Log;
@@ -26,9 +28,6 @@ import org.taverna.server.master.utils.CallTimeLogger.PerfLogged;
 import org.taverna.server.master.utils.JDOSupport;
 import org.taverna.server.master.utils.UsernamePrincipal;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-import edu.umd.cs.findbugs.annotations.Nullable;
-
 /**
  * This handles storing runs, interfacing with the underlying state engine as
  * necessary.
@@ -79,7 +78,7 @@ public class RunDatabaseDAO extends JDOSupport<RunConnection> {
 	}
 
 	@Nullable
-	private RunConnection pickRun(@NonNull String name) {
+	private RunConnection pickRun(@Nonnull String name) {
 		if (log.isDebugEnabled())
 			log.debug("fetching the run called " + name);
 		try {
@@ -95,18 +94,18 @@ public class RunDatabaseDAO extends JDOSupport<RunConnection> {
 
 	@Nullable
 	@WithinSingleTransaction
-	public String getSecurityToken(@NonNull String name) {
+	public String getSecurityToken(@Nonnull String name) {
 		RunConnection rc = getById(name);
 		if (rc == null)
 			return null;
 		return rc.getSecurityToken();
 	}
 
-	private void persist(@NonNull RemoteRunDelegate rrd) throws IOException {
+	private void persist(@Nonnull RemoteRunDelegate rrd) throws IOException {
 		persist(toDBform(rrd));
 	}
 
-	@NonNull
+	@Nonnull
 	private List<RunConnection> allRuns() {
 		try {
 			List<RunConnection> rcs = new ArrayList<>();
@@ -155,7 +154,7 @@ public class RunDatabaseDAO extends JDOSupport<RunConnection> {
 	 *            The policy that determines what they can see.
 	 * @return A mapping from run IDs to run handles.
 	 */
-	@NonNull
+	@Nonnull
 	@WithinSingleTransaction
 	public Map<String, TavernaRun> listRuns(UsernamePrincipal user, Policy p) {
 		Map<String, TavernaRun> result = new HashMap<>();
@@ -173,7 +172,7 @@ public class RunDatabaseDAO extends JDOSupport<RunConnection> {
 	/**
 	 * @return A list of the IDs for all workflow runs.
 	 */
-	@NonNull
+	@Nonnull
 	@WithinSingleTransaction
 	public List<String> listRunNames() {
 		List<String> runNames = new ArrayList<>();
@@ -209,7 +208,7 @@ public class RunDatabaseDAO extends JDOSupport<RunConnection> {
 	 *             If anything goes wrong with serialisation of the run.
 	 */
 	@WithinSingleTransaction
-	public void persistRun(@NonNull RemoteRunDelegate rrd) throws IOException {
+	public void persistRun(@Nonnull RemoteRunDelegate rrd) throws IOException {
 		persist(rrd);
 	}
 
@@ -237,7 +236,7 @@ public class RunDatabaseDAO extends JDOSupport<RunConnection> {
 	 *             If serialization of anything fails.
 	 */
 	@WithinSingleTransaction
-	public void flushToDisk(@NonNull RemoteRunDelegate run) throws IOException {
+	public void flushToDisk(@Nonnull RemoteRunDelegate run) throws IOException {
 		getById(run.id).makeChanges(run);
 	}
 
@@ -246,7 +245,7 @@ public class RunDatabaseDAO extends JDOSupport<RunConnection> {
 	 * 
 	 * @return The ids of the deleted runs.
 	 */
-	@NonNull
+	@Nonnull
 	@PerfLogged
 	@WithinSingleTransaction
 	public List<String> doClean() {
@@ -273,7 +272,7 @@ public class RunDatabaseDAO extends JDOSupport<RunConnection> {
 	 * @return A list of workflow runs that are candidates for doing
 	 *         notification of termination.
 	 */
-	@NonNull
+	@Nonnull
 	@PerfLogged
 	@WithinSingleTransaction
 	public List<RemoteRunDelegate> getPotentiallyNotifiable() {
@@ -291,7 +290,7 @@ public class RunDatabaseDAO extends JDOSupport<RunConnection> {
 
 	@PerfLogged
 	@WithinSingleTransaction
-	public void markFinished(@NonNull Set<String> terminated) {
+	public void markFinished(@Nonnull Set<String> terminated) {
 		for (String id : terminated) {
 			RunConnection rc = getById(id);
 			if (rc == null)

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/worker/RunFactoryConfiguration.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/worker/RunFactoryConfiguration.java b/server-webapp/src/main/java/org/taverna/server/master/worker/RunFactoryConfiguration.java
index d26a3a1..29ac884 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/worker/RunFactoryConfiguration.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/worker/RunFactoryConfiguration.java
@@ -6,6 +6,8 @@ import static org.taverna.server.master.TavernaServer.JMX_ROOT;
 
 import java.util.List;
 
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.annotation.PreDestroy;
 
 import org.apache.commons.logging.Log;
@@ -18,9 +20,6 @@ import org.springframework.jmx.export.annotation.ManagedResource;
 import org.taverna.server.master.factories.ConfigurableRunFactory;
 import org.taverna.server.master.localworker.LocalWorkerState;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-import edu.umd.cs.findbugs.annotations.Nullable;
-
 @ManagedResource(objectName = JMX_ROOT + "Factory", description = "The factory for runs.")
 public abstract class RunFactoryConfiguration implements ConfigurableRunFactory {
 	protected Log log = LogFactory.getLog("Taverna.Server.Worker");
@@ -103,7 +102,7 @@ public abstract class RunFactoryConfiguration implements ConfigurableRunFactory
 		reinitFactory();
 	}
 
-	@NonNull
+	@Nonnull
 	@Override
 	@ManagedAttribute(description = "What JAR do we use to start the RMI registry process?")
 	public final String getRmiRegistryJar() {
@@ -191,7 +190,7 @@ public abstract class RunFactoryConfiguration implements ConfigurableRunFactory
 	}
 
 	/** @return The script to run to start running a workflow. */
-	@NonNull
+	@Nonnull
 	@Override
 	@ManagedAttribute(description = "The script to run to start running a workflow.", currencyTimeLimit = 300)
 	public final String getExecuteWorkflowScript() {
@@ -210,7 +209,7 @@ public abstract class RunFactoryConfiguration implements ConfigurableRunFactory
 	}
 
 	/** @return The location of the JAR implementing the server worker processes. */
-	@NonNull
+	@Nonnull
 	@Override
 	@ManagedAttribute(description = "The location of the JAR implementing the server worker processes.")
 	public final String getServerWorkerJar() {
@@ -230,7 +229,7 @@ public abstract class RunFactoryConfiguration implements ConfigurableRunFactory
 	}
 
 	/** @return The list of additional arguments used to make a worker process. */
-	@NonNull
+	@Nonnull
 	@Override
 	@ManagedAttribute(description = "The list of additional arguments used to make a worker process.", currencyTimeLimit = 300)
 	public final String[] getExtraArguments() {
@@ -244,13 +243,13 @@ public abstract class RunFactoryConfiguration implements ConfigurableRunFactory
 	 */
 	@Override
 	@ManagedAttribute(description = "The list of additional arguments used to make a worker process.", currencyTimeLimit = 300)
-	public final void setExtraArguments(@NonNull String[] extraArguments) {
+	public final void setExtraArguments(@Nonnull String[] extraArguments) {
 		state.setExtraArgs(extraArguments);
 		reinitFactory();
 	}
 
 	/** @return Which java executable to run. */
-	@NonNull
+	@Nonnull
 	@Override
 	@ManagedAttribute(description = "Which java executable to run.", currencyTimeLimit = 300)
 	public final String getJavaBinary() {
@@ -263,7 +262,7 @@ public abstract class RunFactoryConfiguration implements ConfigurableRunFactory
 	 */
 	@Override
 	@ManagedAttribute(description = "Which java executable to run.", currencyTimeLimit = 300)
-	public final void setJavaBinary(@NonNull String javaBinary) {
+	public final void setJavaBinary(@Nonnull String javaBinary) {
 		state.setJavaBinary(javaBinary);
 		reinitFactory();
 	}
@@ -294,7 +293,7 @@ public abstract class RunFactoryConfiguration implements ConfigurableRunFactory
 	/**
 	 * @return The location of the JAR implementing the secure-fork process.
 	 */
-	@NonNull
+	@Nonnull
 	@Override
 	@ManagedAttribute(description = "The location of the JAR implementing the secure-fork process.", currencyTimeLimit = 300)
 	public final String getServerForkerJar() {
@@ -330,7 +329,7 @@ public abstract class RunFactoryConfiguration implements ConfigurableRunFactory
 	@ManagedAttribute(description = "How many checks were done for the worker process the last time a spawn was tried.", currencyTimeLimit = 60)
 	public abstract int getLastStartupCheckCount();
 
-	@NonNull
+	@Nonnull
 	@Override
 	@ManagedAttribute(description = "The names of the current runs.", currencyTimeLimit = 5)
 	public final String[] getCurrentRunNames() {

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/worker/SecurityContextDelegate.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/worker/SecurityContextDelegate.java b/server-webapp/src/main/java/org/taverna/server/master/worker/SecurityContextDelegate.java
index a868dee..ff14986 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/worker/SecurityContextDelegate.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/worker/SecurityContextDelegate.java
@@ -23,8 +23,6 @@ import java.security.GeneralSecurityException;
 import java.security.Key;
 import java.security.KeyStore;
 import java.security.KeyStoreException;
-import java.security.NoSuchAlgorithmException;
-import java.security.NoSuchProviderException;
 import java.security.cert.Certificate;
 import java.security.cert.CertificateException;
 import java.security.cert.CertificateFactory;
@@ -35,6 +33,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import javax.annotation.Nullable;
 import javax.security.auth.x500.X500Principal;
 import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.UriBuilder;
@@ -55,8 +54,6 @@ import org.taverna.server.master.interfaces.File;
 import org.taverna.server.master.interfaces.TavernaSecurityContext;
 import org.taverna.server.master.utils.UsernamePrincipal;
 
-import edu.umd.cs.findbugs.annotations.Nullable;
-
 /**
  * Implementation of a security context.
  * 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/worker/SecurityContextFactory.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/worker/SecurityContextFactory.java b/server-webapp/src/main/java/org/taverna/server/master/worker/SecurityContextFactory.java
index d2b6214..cbccf34 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/worker/SecurityContextFactory.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/worker/SecurityContextFactory.java
@@ -27,8 +27,6 @@ import org.taverna.server.master.utils.FilenameUtils;
 import org.taverna.server.master.utils.UsernamePrincipal;
 import org.taverna.server.master.utils.X500Utils;
 
-import edu.umd.cs.findbugs.annotations.SuppressWarnings;
-
 /**
  * Singleton factory. Really is a singleton (and is also very trivial); the
  * singleton-ness is just about limiting the number of instances of this around
@@ -37,7 +35,6 @@ import edu.umd.cs.findbugs.annotations.SuppressWarnings;
  * @see Serializable
  * @author Donal Fellows
  */
-@SuppressWarnings("NM_SAME_SIMPLE_NAME_AS_INTERFACE")
 public class SecurityContextFactory implements
 		org.taverna.server.master.interfaces.SecurityContextFactory {
 	private static final long serialVersionUID = 12345678987654321L;
@@ -67,7 +64,6 @@ public class SecurityContextFactory implements
 		return getLog("Taverna.Server.Worker.Security");
 	}
 
-	@SuppressWarnings("ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD")
 	private void installAsInstance(SecurityContextFactory handle) {
 		instance = handle;
 	}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/test/java/org/taverna/server/master/TavernaServerImplTest.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/test/java/org/taverna/server/master/TavernaServerImplTest.java b/server-webapp/src/test/java/org/taverna/server/master/TavernaServerImplTest.java
index b29cb6e..9665cf0 100644
--- a/server-webapp/src/test/java/org/taverna/server/master/TavernaServerImplTest.java
+++ b/server-webapp/src/test/java/org/taverna/server/master/TavernaServerImplTest.java
@@ -20,9 +20,6 @@ import org.taverna.server.master.mocks.MockPolicy;
 import org.taverna.server.master.mocks.SimpleListenerFactory;
 import org.taverna.server.master.mocks.SimpleNonpersistentRunStore;
 
-import edu.umd.cs.findbugs.annotations.SuppressWarnings;
-
-@SuppressWarnings
 public class TavernaServerImplTest {
 	private TavernaServer server;
 	private MockPolicy policy;
@@ -74,7 +71,6 @@ public class TavernaServerImplTest {
 	}
 
 	@Before
-	@SuppressWarnings
 	public void wireup() throws Exception {
 		// Wire everything up; ought to be done with Spring, but this works...
 		server = new TavernaServer() {

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/test/java/org/taverna/server/master/mocks/ExampleRun.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/test/java/org/taverna/server/master/mocks/ExampleRun.java b/server-webapp/src/test/java/org/taverna/server/master/mocks/ExampleRun.java
index e4e674d..a2a0791 100644
--- a/server-webapp/src/test/java/org/taverna/server/master/mocks/ExampleRun.java
+++ b/server-webapp/src/test/java/org/taverna/server/master/mocks/ExampleRun.java
@@ -43,10 +43,7 @@ import org.taverna.server.master.interfaces.TavernaRun;
 import org.taverna.server.master.interfaces.TavernaSecurityContext;
 import org.taverna.server.master.utils.UsernamePrincipal;
 
-import edu.umd.cs.findbugs.annotations.SuppressWarnings;
-
-@SuppressWarnings
-@java.lang.SuppressWarnings("serial")
+@SuppressWarnings("serial")
 public class ExampleRun implements TavernaRun, TavernaSecurityContext {
 	String id;
 	List<Listener> listeners;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/test/java/org/taverna/server/master/mocks/MockPolicy.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/test/java/org/taverna/server/master/mocks/MockPolicy.java b/server-webapp/src/test/java/org/taverna/server/master/mocks/MockPolicy.java
index 6109716..81dd08c 100644
--- a/server-webapp/src/test/java/org/taverna/server/master/mocks/MockPolicy.java
+++ b/server-webapp/src/test/java/org/taverna/server/master/mocks/MockPolicy.java
@@ -10,9 +10,6 @@ import org.taverna.server.master.exceptions.NoUpdateException;
 import org.taverna.server.master.interfaces.TavernaRun;
 import org.taverna.server.master.utils.UsernamePrincipal;
 
-import edu.umd.cs.findbugs.annotations.SuppressWarnings;
-
-@SuppressWarnings
 public class MockPolicy extends SimpleServerPolicy {
 	public MockPolicy() {
 		super();

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-worker/src/main/java/org/taverna/server/localworker/impl/DirectoryDelegate.java
----------------------------------------------------------------------
diff --git a/server-worker/src/main/java/org/taverna/server/localworker/impl/DirectoryDelegate.java b/server-worker/src/main/java/org/taverna/server/localworker/impl/DirectoryDelegate.java
index 6d736f0..1692856 100644
--- a/server-worker/src/main/java/org/taverna/server/localworker/impl/DirectoryDelegate.java
+++ b/server-worker/src/main/java/org/taverna/server/localworker/impl/DirectoryDelegate.java
@@ -19,14 +19,14 @@ import java.util.Collection;
 import java.util.Date;
 import java.util.List;
 
+import javax.annotation.Nonnull;
+
 import org.apache.commons.collections.MapIterator;
 import org.apache.commons.collections.map.ReferenceMap;
 import org.taverna.server.localworker.remote.RemoteDirectory;
 import org.taverna.server.localworker.remote.RemoteDirectoryEntry;
 import org.taverna.server.localworker.remote.RemoteFile;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-
 /**
  * This class acts as a remote-aware delegate for the workflow run's working
  * directory and its subdirectories.
@@ -34,7 +34,6 @@ import edu.umd.cs.findbugs.annotations.NonNull;
  * @author Donal Fellows
  * @see FileDelegate
  */
-@edu.umd.cs.findbugs.annotations.SuppressWarnings("SE_NO_SERIALVERSIONID")
 @SuppressWarnings("serial")
 public class DirectoryDelegate extends UnicastRemoteObject implements
 		RemoteDirectory {
@@ -48,8 +47,8 @@ public class DirectoryDelegate extends UnicastRemoteObject implements
 	 * @throws RemoteException
 	 *             If registration of the directory fails.
 	 */
-	public DirectoryDelegate(@NonNull File dir,
-			@NonNull DirectoryDelegate parent) throws RemoteException {
+	public DirectoryDelegate(@Nonnull File dir,
+			@Nonnull DirectoryDelegate parent) throws RemoteException {
 		super();
 		this.localCache = new ReferenceMap();
 		this.dir = dir;
@@ -135,7 +134,7 @@ public class DirectoryDelegate extends UnicastRemoteObject implements
 		return parent;
 	}
 
-	void forgetEntry(@NonNull RemoteDirectoryEntry entry) {
+	void forgetEntry(@Nonnull RemoteDirectoryEntry entry) {
 		synchronized (localCache) {
 			MapIterator i = localCache.mapIterator();
 			while (i.hasNext()) {

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-worker/src/main/java/org/taverna/server/localworker/impl/FileDelegate.java
----------------------------------------------------------------------
diff --git a/server-worker/src/main/java/org/taverna/server/localworker/impl/FileDelegate.java b/server-worker/src/main/java/org/taverna/server/localworker/impl/FileDelegate.java
index 616a3d8..7e47af9 100644
--- a/server-worker/src/main/java/org/taverna/server/localworker/impl/FileDelegate.java
+++ b/server-worker/src/main/java/org/taverna/server/localworker/impl/FileDelegate.java
@@ -19,12 +19,11 @@ import java.rmi.RemoteException;
 import java.rmi.server.UnicastRemoteObject;
 import java.util.Date;
 
+import javax.annotation.Nonnull;
+
 import org.taverna.server.localworker.remote.RemoteDirectory;
 import org.taverna.server.localworker.remote.RemoteFile;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-import edu.umd.cs.findbugs.annotations.SuppressWarnings;
-
 /**
  * This class acts as a remote-aware delegate for the files in a workflow run's
  * working directory and its subdirectories.
@@ -32,7 +31,6 @@ import edu.umd.cs.findbugs.annotations.SuppressWarnings;
  * @author Donal Fellows
  * @see DirectoryDelegate
  */
-@SuppressWarnings("SE_NO_SERIALVERSIONID")
 @java.lang.SuppressWarnings("serial")
 public class FileDelegate extends UnicastRemoteObject implements RemoteFile {
 	private File file;
@@ -44,7 +42,7 @@ public class FileDelegate extends UnicastRemoteObject implements RemoteFile {
 	 * @throws RemoteException
 	 *             If registration of the file fails.
 	 */
-	public FileDelegate(@NonNull File file, @NonNull DirectoryDelegate parent)
+	public FileDelegate(@Nonnull File file, @Nonnull DirectoryDelegate parent)
 			throws RemoteException {
 		super();
 		this.file = file;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-worker/src/main/java/org/taverna/server/localworker/impl/LocalWorker.java
----------------------------------------------------------------------
diff --git a/server-worker/src/main/java/org/taverna/server/localworker/impl/LocalWorker.java b/server-worker/src/main/java/org/taverna/server/localworker/impl/LocalWorker.java
index bcac762..bdd9fd1 100644
--- a/server-worker/src/main/java/org/taverna/server/localworker/impl/LocalWorker.java
+++ b/server-worker/src/main/java/org/taverna/server/localworker/impl/LocalWorker.java
@@ -59,8 +59,6 @@ import org.taverna.server.localworker.remote.RemoteStatus;
 import org.taverna.server.localworker.remote.StillWorkingOnItException;
 import org.taverna.server.localworker.server.UsageRecordReceiver;
 
-import edu.umd.cs.findbugs.annotations.SuppressWarnings;
-
 /**
  * This class implements one side of the connection between the Taverna Server
  * master server and this process. It delegates to a {@link Worker} instance the
@@ -71,8 +69,7 @@ import edu.umd.cs.findbugs.annotations.SuppressWarnings;
  * @see FileDelegate
  * @see WorkerCore
  */
-@SuppressWarnings({ "SE_BAD_FIELD", "SE_NO_SERIALVERSIONID" })
-@java.lang.SuppressWarnings("serial")
+@SuppressWarnings("serial")
 public class LocalWorker extends UnicastRemoteObject implements RemoteSingleRun {
 	// ----------------------- CONSTANTS -----------------------
 
@@ -353,7 +350,6 @@ public class LocalWorker extends UnicastRemoteObject implements RemoteSingleRun
 		return outputBaclava;
 	}
 
-	@SuppressWarnings("SE_INNER_CLASS")
 	class SecurityDelegate extends UnicastRemoteObject implements
 			RemoteSecurityContext {
 		private void setPrivatePerms(File dir) {
@@ -536,7 +532,6 @@ public class LocalWorker extends UnicastRemoteObject implements RemoteSingleRun
 		}
 	}
 
-	@SuppressWarnings("SE_INNER_CLASS")
 	class InputDelegate extends UnicastRemoteObject implements RemoteInput {
 		private String name;
 
@@ -567,7 +562,7 @@ public class LocalWorker extends UnicastRemoteObject implements RemoteSingleRun
 		public String getValue() {
 			return inputValues.get(name);
 		}
-		
+
 		@Override
 		public String getDelimiter() throws RemoteException {
 			return inputDelimiters.get(name);
@@ -599,7 +594,7 @@ public class LocalWorker extends UnicastRemoteObject implements RemoteSingleRun
 				throw new IllegalStateException("not initializing");
 			if (inputBaclava != null)
 				throw new IllegalStateException("input baclava file set");
-			if (delimiter!=null) {
+			if (delimiter != null) {
 				if (delimiter.length() > 1)
 					throw new IllegalStateException(
 							"multi-character delimiter not permitted");

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-worker/src/main/java/org/taverna/server/localworker/impl/TavernaRunManager.java
----------------------------------------------------------------------
diff --git a/server-worker/src/main/java/org/taverna/server/localworker/impl/TavernaRunManager.java b/server-worker/src/main/java/org/taverna/server/localworker/impl/TavernaRunManager.java
index ffcdab5..a4c9a7e 100644
--- a/server-worker/src/main/java/org/taverna/server/localworker/impl/TavernaRunManager.java
+++ b/server-worker/src/main/java/org/taverna/server/localworker/impl/TavernaRunManager.java
@@ -49,8 +49,6 @@ import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 import org.xml.sax.InputSource;
 
-import edu.umd.cs.findbugs.annotations.SuppressWarnings;
-
 /**
  * The registered factory for runs, this class is responsible for constructing
  * runs that are suitable for particular users. It is also the entry point for
@@ -59,7 +57,6 @@ import edu.umd.cs.findbugs.annotations.SuppressWarnings;
  * @author Donal Fellows
  * @see LocalWorker
  */
-@SuppressWarnings({ "SE_BAD_FIELD", "SE_NO_SERIALVERSIONID" })
 @java.lang.SuppressWarnings("serial")
 public class TavernaRunManager extends UnicastRemoteObject implements
 		RemoteRunFactory, RunAccounting, WorkerFactory {
@@ -118,7 +115,6 @@ public class TavernaRunManager extends UnicastRemoteObject implements
 	 * @throws RemoteException
 	 *             If anything goes wrong.
 	 */
-	@SuppressWarnings("REC_CATCH_EXCEPTION")
 	private String unwrapWorkflow(String workflow, Holder<String> wfid)
 			throws RemoteException {
 		StringReader sr = new StringReader(workflow);
@@ -184,7 +180,6 @@ public class TavernaRunManager extends UnicastRemoteObject implements
 
 	static class DelayedDeath implements Runnable {
 		@Override
-		@SuppressWarnings("DM_EXIT")
 		public void run() {
 			try {
 				Thread.sleep(DEATH_DELAY);

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-worker/src/main/java/org/taverna/server/localworker/impl/WorkerCore.java
----------------------------------------------------------------------
diff --git a/server-worker/src/main/java/org/taverna/server/localworker/impl/WorkerCore.java b/server-worker/src/main/java/org/taverna/server/localworker/impl/WorkerCore.java
index 8be92fe..9c96859 100644
--- a/server-worker/src/main/java/org/taverna/server/localworker/impl/WorkerCore.java
+++ b/server-worker/src/main/java/org/taverna/server/localworker/impl/WorkerCore.java
@@ -65,6 +65,8 @@ import java.util.Map.Entry;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.xml.datatype.DatatypeConfigurationException;
 import javax.xml.ws.Holder;
 
@@ -77,10 +79,6 @@ import org.taverna.server.localworker.remote.RemoteListener;
 import org.taverna.server.localworker.remote.RemoteStatus;
 import org.taverna.server.localworker.server.UsageRecordReceiver;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-import edu.umd.cs.findbugs.annotations.Nullable;
-import edu.umd.cs.findbugs.annotations.SuppressWarnings;
-
 /**
  * The core class that connects to a Taverna command-line workflow execution
  * engine. This implementation always registers a single listener, &lquo;
@@ -90,17 +88,16 @@ import edu.umd.cs.findbugs.annotations.SuppressWarnings;
  * 
  * @author Donal Fellows
  */
-@SuppressWarnings({ "SE_BAD_FIELD", "SE_NO_SERIALVERSIONID" })
-@java.lang.SuppressWarnings("serial")
+@SuppressWarnings("serial")
 public class WorkerCore extends UnicastRemoteObject implements Worker,
 		RemoteListener {
-	@NonNull
+	@Nonnull
 	static final Map<String, Property> pmap = new HashMap<>();
 	/**
 	 * Regular expression to extract the detailed timing information from the
 	 * output of /usr/bin/time
 	 */
-	@NonNull
+	@Nonnull
 	private static final Pattern TimeRE;
 	static {
 		final String TIMERE = "([0-9.:]+)";
@@ -114,16 +111,16 @@ public class WorkerCore extends UnicastRemoteObject implements Worker,
 	 * potentially leaky).
 	 */
 	// TODO Conduct a proper survey of what to remove
-	@NonNull
+	@Nonnull
 	private static final String[] ENVIRONMENT_TO_REMOVE = { "SUDO_COMMAND",
 			"SUDO_USER", "SUDO_GID", "SUDO_UID", "DISPLAY", "LS_COLORS",
 			"XFILESEARCHPATH", "SSH_AGENT_PID", "SSH_AUTH_SOCK" };
 
 	@Nullable
 	Process subprocess;
-	@NonNull
+	@Nonnull
 	final StringWriter stdout;
-	@NonNull
+	@Nonnull
 	final StringWriter stderr;
 	@Nullable
 	Integer exitCode;
@@ -132,9 +129,9 @@ public class WorkerCore extends UnicastRemoteObject implements Worker,
 	String emailAddress;
 	@Nullable
 	Date start;
-	@NonNull
+	@Nonnull
 	final RunAccounting accounting;
-	@NonNull
+	@Nonnull
 	final Holder<Integer> pid;
 
 	private boolean finished;
@@ -153,7 +150,7 @@ public class WorkerCore extends UnicastRemoteObject implements Worker,
 	 *            Object that looks after how many runs are executing.
 	 * @throws RemoteException
 	 */
-	public WorkerCore(@NonNull RunAccounting accounting) throws RemoteException {
+	public WorkerCore(@Nonnull RunAccounting accounting) throws RemoteException {
 		super();
 		stdout = new StringWriter();
 		stderr = new StringWriter();
@@ -201,18 +198,18 @@ public class WorkerCore extends UnicastRemoteObject implements Worker,
 	 *             If any of quite a large number of things goes wrong.
 	 */
 	@Override
-	public boolean initWorker(@NonNull final LocalWorker local,
-			@NonNull final String executeWorkflowCommand,
-			@NonNull final String workflow, @NonNull final File workingDir,
+	public boolean initWorker(@Nonnull final LocalWorker local,
+			@Nonnull final String executeWorkflowCommand,
+			@Nonnull final String workflow, @Nonnull final File workingDir,
 			@Nullable final File inputBaclava,
-			@NonNull final Map<String, File> inputFiles,
-			@NonNull final Map<String, String> inputValues,
-			@NonNull final Map<String, String> inputDelimiters,
+			@Nonnull final Map<String, File> inputFiles,
+			@Nonnull final Map<String, String> inputValues,
+			@Nonnull final Map<String, String> inputDelimiters,
 			@Nullable final File outputBaclava,
-			@NonNull final File securityDir, @Nullable final char[] password,
+			@Nonnull final File securityDir, @Nullable final char[] password,
 			final boolean generateProvenance,
-			@NonNull final Map<String, String> environment,
-			@NonNull final String token, @NonNull final List<String> runtime)
+			@Nonnull final Map<String, String> environment,
+			@Nonnull final String token, @Nonnull final List<String> runtime)
 			throws IOException {
 		try {
 			new TimingOutTask() {
@@ -235,7 +232,7 @@ public class WorkerCore extends UnicastRemoteObject implements Worker,
 		return subprocess != null;
 	}
 
-	private void startExecutorSubprocess(@NonNull ProcessBuilder pb,
+	private void startExecutorSubprocess(@Nonnull ProcessBuilder pb,
 			@Nullable char[] password) throws IOException {
 		// Start the subprocess
 		out.println("starting " + pb.command() + " in directory "
@@ -290,20 +287,17 @@ public class WorkerCore extends UnicastRemoteObject implements Worker,
 	 * @throws FileNotFoundException
 	 *             If we can't write the workflow out (unlikely)
 	 */
-	@NonNull
-	ProcessBuilder createProcessBuilder(
-			@NonNull LocalWorker local,
-			@NonNull String executeWorkflowCommand,
-			@NonNull String workflow,
-			@NonNull File workingDir,
-			@Nullable File inputBaclava,
-			@NonNull Map<String, File> inputFiles,
-			@NonNull Map<String, String> inputValues,
-			@NonNull Map<String, String> inputDelimiters,
-			@Nullable File outputBaclava, @NonNull File securityDir,
-			@NonNull char[] password, boolean generateProvenance,
-			@NonNull Map<String, String> environment, @NonNull String token,
-			@NonNull List<String> runtime) throws IOException,
+	@Nonnull
+	ProcessBuilder createProcessBuilder(@Nonnull LocalWorker local,
+			@Nonnull String executeWorkflowCommand, @Nonnull String workflow,
+			@Nonnull File workingDir, @Nullable File inputBaclava,
+			@Nonnull Map<String, File> inputFiles,
+			@Nonnull Map<String, String> inputValues,
+			@Nonnull Map<String, String> inputDelimiters,
+			@Nullable File outputBaclava, @Nonnull File securityDir,
+			@Nonnull char[] password, boolean generateProvenance,
+			@Nonnull Map<String, String> environment, @Nonnull String token,
+			@Nonnull List<String> runtime) throws IOException,
 			UnsupportedEncodingException, FileNotFoundException {
 		ProcessBuilder pb = new ProcessBuilder();
 		pb.command().add(TIME);
@@ -535,7 +529,7 @@ public class WorkerCore extends UnicastRemoteObject implements Worker,
 		}
 	}
 
-	@NonNull
+	@Nonnull
 	private JobUsageRecord newUR() throws DatatypeConfigurationException {
 		try {
 			if (wd != null)
@@ -551,7 +545,7 @@ public class WorkerCore extends UnicastRemoteObject implements Worker,
 	 * @param exitCode
 	 *            The exit code from the program.
 	 */
-	private void buildUR(@NonNull Status status, int exitCode) {
+	private void buildUR(@Nonnull Status status, int exitCode) {
 		try {
 			Date now = new Date();
 			long user = -1, sys = -1, real = -1;
@@ -588,7 +582,7 @@ public class WorkerCore extends UnicastRemoteObject implements Worker,
 		}
 	}
 
-	private long parseDuration(@NonNull String durationString) {
+	private long parseDuration(@Nonnull String durationString) {
 		try {
 			return (long) (parseDouble(durationString) * 1000);
 		} catch (NumberFormatException nfe) {
@@ -605,7 +599,7 @@ public class WorkerCore extends UnicastRemoteObject implements Worker,
 		return dur * 1000;
 	}
 
-	private void signal(@NonNull String signal) throws Exception {
+	private void signal(@Nonnull String signal) throws Exception {
 		int pid = getPID();
 		if (pid > 0
 				&& getRuntime().exec("kill -" + signal + " " + pid).waitFor() == 0)
@@ -693,7 +687,6 @@ public class WorkerCore extends UnicastRemoteObject implements Worker,
 	}
 
 	@Override
-	@SuppressWarnings("REC_CATCH_EXCEPTION")
 	public String getProperty(String propName) throws RemoteException {
 		switch (Property.is(propName)) {
 		case STDOUT:
@@ -770,7 +763,7 @@ public class WorkerCore extends UnicastRemoteObject implements Worker,
 	}
 
 	@Override
-	public void setURReceiver(@NonNull UsageRecordReceiver receiver) {
+	public void setURReceiver(@Nonnull UsageRecordReceiver receiver) {
 		urreceiver = receiver;
 	}
 
@@ -793,19 +786,19 @@ public class WorkerCore extends UnicastRemoteObject implements Worker,
  * @author Donal Fellows
  */
 class AsyncCopy extends Thread {
-	@NonNull
+	@Nonnull
 	private BufferedReader from;
-	@NonNull
+	@Nonnull
 	private Writer to;
 	@Nullable
 	private Holder<Integer> pidHolder;
 
-	AsyncCopy(@NonNull InputStream from, @NonNull Writer to)
+	AsyncCopy(@Nonnull InputStream from, @Nonnull Writer to)
 			throws UnsupportedEncodingException {
 		this(from, to, null);
 	}
 
-	AsyncCopy(@NonNull InputStream from, @NonNull Writer to,
+	AsyncCopy(@Nonnull InputStream from, @Nonnull Writer to,
 			@Nullable Holder<Integer> pid) throws UnsupportedEncodingException {
 		this.from = new BufferedReader(new InputStreamReader(from,
 				SYSTEM_ENCODING));
@@ -842,7 +835,7 @@ class PasswordWriterThread extends Thread {
 	private OutputStream to;
 	private char[] chars;
 
-	PasswordWriterThread(@NonNull Process to, @NonNull char[] chars) {
+	PasswordWriterThread(@Nonnull Process to, @Nonnull char[] chars) {
 		this.to = to.getOutputStream();
 		assert chars != null;
 		this.chars = chars;
@@ -885,11 +878,11 @@ enum Property {
 		return s;
 	}
 
-	public static Property is(@NonNull String s) {
+	public static Property is(@Nonnull String s) {
 		return pmap.get(s);
 	}
 
-	@NonNull
+	@Nonnull
 	public static String[] names() {
 		return pmap.keySet().toArray(new String[pmap.size()]);
 	}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-worker/src/main/java/org/taverna/server/localworker/impl/utils/TimingOutTask.java
----------------------------------------------------------------------
diff --git a/server-worker/src/main/java/org/taverna/server/localworker/impl/utils/TimingOutTask.java b/server-worker/src/main/java/org/taverna/server/localworker/impl/utils/TimingOutTask.java
index 790a820..3dd3ac1 100644
--- a/server-worker/src/main/java/org/taverna/server/localworker/impl/utils/TimingOutTask.java
+++ b/server-worker/src/main/java/org/taverna/server/localworker/impl/utils/TimingOutTask.java
@@ -1,6 +1,6 @@
 package org.taverna.server.localworker.impl.utils;
 
-import edu.umd.cs.findbugs.annotations.Nullable;
+import javax.annotation.Nullable;
 
 /**
  * A class that handles running a task that can take some time.

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-worker/src/test/java/org/taverna/server/localworker/impl/LocalWorkerTest.java
----------------------------------------------------------------------
diff --git a/server-worker/src/test/java/org/taverna/server/localworker/impl/LocalWorkerTest.java b/server-worker/src/test/java/org/taverna/server/localworker/impl/LocalWorkerTest.java
index 5e8f7ae..ef92cc5 100644
--- a/server-worker/src/test/java/org/taverna/server/localworker/impl/LocalWorkerTest.java
+++ b/server-worker/src/test/java/org/taverna/server/localworker/impl/LocalWorkerTest.java
@@ -37,9 +37,6 @@ import org.taverna.server.localworker.remote.RemoteListener;
 import org.taverna.server.localworker.remote.RemoteStatus;
 import org.taverna.server.localworker.server.UsageRecordReceiver;
 
-import edu.umd.cs.findbugs.annotations.SuppressWarnings;
-
-@SuppressWarnings
 public class LocalWorkerTest {
 	LocalWorker lw;
 	static List<String> events;


[45/50] [abbrv] incubator-taverna-server git commit: Cleaner subprocess logging. Hopefully more reliably shut-down too.

Posted by st...@apache.org.
Cleaner subprocess logging. Hopefully more reliably shut-down too.

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/3465ccfd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/3465ccfd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/3465ccfd

Branch: refs/heads/master
Commit: 3465ccfd2ffea18d076656c55db1b555bb83473f
Parents: 0bb7d2e
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Wed Aug 20 13:56:33 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Wed Aug 20 13:56:33 2014 +0100

----------------------------------------------------------------------
 .../master/localworker/ForkRunFactory.java      | 47 ++++++--------------
 .../localworker/IdAwareForkRunFactory.java      | 39 ++++++----------
 .../server/master/localworker/StreamLogger.java |  5 ++-
 3 files changed, 29 insertions(+), 62 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/3465ccfd/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java b/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
index f1abf9b..96789da 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
@@ -10,7 +10,6 @@ import static java.lang.Thread.sleep;
 import static java.util.Arrays.asList;
 import static java.util.Calendar.SECOND;
 import static java.util.UUID.randomUUID;
-import static org.apache.commons.logging.LogFactory.getLog;
 import static org.taverna.server.master.TavernaServer.JMX_ROOT;
 
 import java.io.File;
@@ -26,7 +25,6 @@ import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
 import javax.xml.bind.JAXBException;
 
-import org.apache.commons.logging.Log;
 import org.springframework.jmx.export.annotation.ManagedAttribute;
 import org.springframework.jmx.export.annotation.ManagedResource;
 import org.taverna.server.localworker.remote.RemoteRunFactory;
@@ -144,8 +142,18 @@ public class ForkRunFactory extends AbstractRemoteRunFactory implements
 		// Spawn the subprocess
 		log.info("about to create subprocess: " + p.command());
 		factoryProcess = p.start();
-		outlog = new OutputLogger(factoryProcessName, factoryProcess);
-		errlog = new ErrorLogger(factoryProcessName, factoryProcess);
+		outlog = new StreamLogger("FactoryStdout", factoryProcess.getInputStream()) {
+			@Override
+			protected void write(String msg) {
+				log.info(msg);
+			}
+		};
+		errlog = new StreamLogger("FactoryStderr", factoryProcess.getErrorStream()) {
+			@Override
+			protected void write(String msg) {
+				log.info(msg);
+			}
+		};
 
 		// Wait for the subprocess to register itself in the RMI registry
 		Calendar deadline = Calendar.getInstance();
@@ -184,8 +192,7 @@ public class ForkRunFactory extends AbstractRemoteRunFactory implements
 		throw lastException;
 	}
 
-	private OutputLogger outlog;
-	private ErrorLogger errlog;
+	private StreamLogger outlog, errlog;
 
 	private void stopLoggers() {
 		if (outlog != null)
@@ -211,34 +218,6 @@ public class ForkRunFactory extends AbstractRemoteRunFactory implements
 		return rrf;
 	}
 
-	private static class OutputLogger extends StreamLogger {
-		private final Log log;
-
-		OutputLogger(String name, Process process) {
-			super(name, process.getInputStream());
-			log = getLog("Taverna.Server.LocalWorker." + name);
-		}
-
-		@Override
-		protected void write(String msg) {
-			log.info("stdout: " + msg);
-		}
-	}
-
-	private static class ErrorLogger extends StreamLogger {
-		private final Log log;
-
-		ErrorLogger(String name, Process process) {
-			super(name, process.getInputStream());
-			log = getLog("Taverna.Server.LocalWorker." + name);
-		}
-
-		@Override
-		protected void write(String msg) {
-			log.info("stderr: " + msg);
-		}
-	}
-
 	/**
 	 * Destroys the subprocess that manufactures runs.
 	 */

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/3465ccfd/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java b/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
index 667f1d8..6515c4c 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
@@ -331,28 +331,6 @@ public class IdAwareForkRunFactory extends AbstractRemoteRunFactory implements
 	}
 }
 
-class StdOut extends StreamLogger {
-	StdOut(Process process) {
-		super("forker", process.getInputStream());
-	}
-
-	@Override
-	protected void write(String msg) {
-		log.info(msg);
-	}
-}
-
-class StdErr extends StreamLogger {
-	StdErr(Process process) {
-		super("forker", process.getErrorStream());
-	}
-
-	@Override
-	protected void write(String msg) {
-		log.info(msg);
-	}
-}
-
 /**
  * The connector that handles the secure fork process itself.
  * 
@@ -366,8 +344,7 @@ class SecureFork implements IdAwareForkRunFactory.MetaFactory {
 	private Integer lastExitCode;
 	private Log log;
 	private LocalWorkerState state;
-	private StdOut out;
-	private StdErr err;
+	private StreamLogger out, err;
 
 	/**
 	 * Construct the command to run the meta-factory process.
@@ -410,8 +387,18 @@ class SecureFork implements IdAwareForkRunFactory.MetaFactory {
 		channel = new PrintWriter(new BufferedWriter(new OutputStreamWriter(
 				process.getOutputStream())), true);
 		// Log the responses
-		out=new StdOut(process);
-		err=new StdErr(process);
+		out = new StreamLogger("ForkedStdout", process.getInputStream()) {
+			@Override
+			protected void write(String msg) {
+				log.info(msg);
+			}
+		};
+		err = new StreamLogger("ForkedStderr", process.getErrorStream()) {
+			@Override
+			protected void write(String msg) {
+				log.info(msg);
+			}
+		};
 	}
 
 	@Override

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/3465ccfd/server-webapp/src/main/java/org/taverna/server/master/localworker/StreamLogger.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/localworker/StreamLogger.java b/server-webapp/src/main/java/org/taverna/server/master/localworker/StreamLogger.java
index b45129c..437d4dc 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/localworker/StreamLogger.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/localworker/StreamLogger.java
@@ -15,14 +15,14 @@ abstract class StreamLogger {
 	private Thread t;
 	private InputStream in;
 
-	protected StreamLogger(final String name, final InputStream is) {
+	protected StreamLogger(final String name, InputStream is) {
 		log = getLog("Taverna.Server.LocalWorker." + name);
 		in = is;
 		t = new Thread(new Runnable() {
 			@Override
 			public void run() {
 				try (BufferedReader br = new BufferedReader(
-						new InputStreamReader(is))) {
+						new InputStreamReader(in))) {
 					String line;
 					while (!interrupted() && (line = br.readLine()) != null)
 						if (!line.isEmpty())
@@ -51,6 +51,7 @@ abstract class StreamLogger {
 	protected abstract void write(String msg);
 
 	public void stop() {
+		log.info("trying to close down " + t.getName());
 		t.interrupt();
 		try {
 			in.close();


[07/50] [abbrv] incubator-taverna-server git commit: Also handle empty delimiter in SOAP.

Posted by st...@apache.org.
Also handle empty delimiter in SOAP.

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/3859af08
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/3859af08
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/3859af08

Branch: refs/heads/master
Commit: 3859af08ee9601cbe6224eed61be73c72203d285
Parents: be2723e
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Fri Mar 28 14:20:52 2014 +0000
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Fri Mar 28 14:20:52 2014 +0000

----------------------------------------------------------------------
 .../src/main/java/org/taverna/server/master/TavernaServer.java     | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/3859af08/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java b/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java
index 27e4255..e4582af 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java
@@ -1150,6 +1150,8 @@ public abstract class TavernaServer implements TavernaServerSOAP,
 		Input i = support.getInput(w, portName);
 		if (i == null)
 			i = w.makeInput(portName);
+		if (delimiter != null && delimiter.isEmpty())
+			delimiter = null;
 		if (delimiter != null) {
 			if (delimiter.length() > 1)
 				throw new BadPropertyValueException("delimiter too long");


[30/50] [abbrv] incubator-taverna-server git commit: Add security compatibility switches to executeworkflow.sh

Posted by st...@apache.org.
Add security compatibility switches to executeworkflow.sh

Fixes TAVSERV-340.

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/1546afb1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/1546afb1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/1546afb1

Branch: refs/heads/master
Commit: 1546afb112065d23a0ef5e5cd882438fddd88a39
Parents: d285a5f
Author: Robert Haines <rh...@manchester.ac.uk>
Authored: Sat May 24 16:44:08 2014 +0100
Committer: Robert Haines <rh...@manchester.ac.uk>
Committed: Sat May 24 16:44:08 2014 +0100

----------------------------------------------------------------------
 server-webapp/src/main/replacementscripts/executeworkflow.sh | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/1546afb1/server-webapp/src/main/replacementscripts/executeworkflow.sh
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/replacementscripts/executeworkflow.sh b/server-webapp/src/main/replacementscripts/executeworkflow.sh
index 23b2ebe..f78bc46 100644
--- a/server-webapp/src/main/replacementscripts/executeworkflow.sh
+++ b/server-webapp/src/main/replacementscripts/executeworkflow.sh
@@ -60,6 +60,8 @@ MainClass=net.sf.taverna.t2.commandline.CommandLineLauncher
 
 echo "pid:$$"
 exec "$javabin" $memlimit $permsize \
+  "-Dcom.sun.net.ssl.enableECC=false" \
+  "-Djsse.enableSNIExtension=false" \
   "-Draven.profile=file://$taverna_home/conf/current-profile.xml" \
   "-Dtaverna.startup=$taverna_home" $RAVEN_APPHOME_PROP $RUNID_PROP \
   $INTERACTION_PROPS $pre \


[38/50] [abbrv] incubator-taverna-server git commit: Make builds work.

Posted by st...@apache.org.
Make builds work.

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/72ca37b8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/72ca37b8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/72ca37b8

Branch: refs/heads/master
Commit: 72ca37b8147484495e111833861d7f8dffc4535a
Parents: 4294f80
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Sat Jun 7 15:46:17 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Sat Jun 7 15:46:17 2014 +0100

----------------------------------------------------------------------
 server-webapp/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/72ca37b8/server-webapp/pom.xml
----------------------------------------------------------------------
diff --git a/server-webapp/pom.xml b/server-webapp/pom.xml
index 9b7ac80..db34e9f 100644
--- a/server-webapp/pom.xml
+++ b/server-webapp/pom.xml
@@ -20,7 +20,7 @@
 		<version.spring-security>3.1.4.RELEASE</version.spring-security>
 		<version.asm>3.3.1</version.asm>
 		<version.smack>3.2.1</version.smack>
-		<version.commandline>2.6-SNAPSHOT</version.commandline>
+		<version.commandline>2.5.0</version.commandline>
 		<edition.commandline>enterprise</edition.commandline>
 		<version.jdoapi>3.0.1</version.jdoapi>
 		<forker.module>server-unix-forker</forker.module>


[08/50] [abbrv] incubator-taverna-server git commit: TAVSERV-337: Ensure that the RMI registry is started before the overall service becomes available.

Posted by st...@apache.org.
TAVSERV-337: Ensure that the RMI registry is started before the overall
service becomes available.

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/61996ccf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/61996ccf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/61996ccf

Branch: refs/heads/master
Commit: 61996ccf6698e78b520660140297ad027645e13b
Parents: d004cfc
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Fri Apr 11 13:39:58 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Fri Apr 11 13:39:58 2014 +0100

----------------------------------------------------------------------
 .../org/taverna/server/master/localworker/ForkRunFactory.java | 7 +++++++
 .../server/master/localworker/IdAwareForkRunFactory.java      | 3 +++
 2 files changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/61996ccf/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java b/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
index 2c19ec1..64ce509 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
@@ -24,6 +24,7 @@ import java.rmi.RemoteException;
 import java.util.Calendar;
 import java.util.UUID;
 
+import javax.annotation.PostConstruct;
 import javax.xml.bind.JAXBException;
 
 import org.apache.commons.logging.Log;
@@ -61,6 +62,12 @@ public class ForkRunFactory extends AbstractRemoteRunFactory implements
 	public ForkRunFactory() throws JAXBException {
 	}
 
+	@PostConstruct
+	protected void initRegistry() {
+		log.info("waiting for availability of default RMI registry");
+		getTheRegistry();
+	}
+
 	@Override
 	protected void reinitFactory() {
 		boolean makeFactory = factory != null;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/61996ccf/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java b/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
index fd6efc7..7d1bdcd 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
@@ -179,6 +179,9 @@ public class IdAwareForkRunFactory extends AbstractRemoteRunFactory implements
 	 */
 	@PostConstruct
 	void initMetaFactory() throws IOException {
+		log.info("waiting for availability of default RMI registry");
+		getTheRegistry();
+		log.info("constructing secure fork subprocess");
 		forker = new SecureFork(this, state, log);
 	}
 


[03/50] [abbrv] incubator-taverna-server git commit: SOAP API changes.

Posted by st...@apache.org.
SOAP API changes.

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/ef0aeb09
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/ef0aeb09
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/ef0aeb09

Branch: refs/heads/master
Commit: ef0aeb09d6167a963a6f47700d48cca7fe693818
Parents: ef9a289
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Wed Mar 26 15:49:26 2014 +0000
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Wed Mar 26 15:49:26 2014 +0000

----------------------------------------------------------------------
 .../taverna/server/master/TavernaServer.java    | 23 ++++++++++++++
 .../server/master/common/InputDescription.java  |  6 ++++
 .../server/master/soap/TavernaServerSOAP.java   | 32 ++++++++++++++++++++
 3 files changed, 61 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ef0aeb09/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java b/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java
index e2fe148..27e4255 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java
@@ -65,6 +65,7 @@ import org.taverna.server.master.common.Status;
 import org.taverna.server.master.common.Trust;
 import org.taverna.server.master.common.Workflow;
 import org.taverna.server.master.common.version.Version;
+import org.taverna.server.master.exceptions.BadPropertyValueException;
 import org.taverna.server.master.exceptions.BadStateChangeException;
 import org.taverna.server.master.exceptions.FilesystemAccessException;
 import org.taverna.server.master.exceptions.InvalidCredentialException;
@@ -1141,6 +1142,28 @@ public abstract class TavernaServer implements TavernaServerSOAP,
 	@CallCounted
 	@PerfLogged
 	@RolesAllowed(USER)
+	public void setRunInputPortListDelimiter(String runName, String portName,
+			String delimiter) throws UnknownRunException, NoUpdateException,
+			BadStateChangeException, BadPropertyValueException {
+		TavernaRun w = support.getRun(runName);
+		support.permitUpdate(w);
+		Input i = support.getInput(w, portName);
+		if (i == null)
+			i = w.makeInput(portName);
+		if (delimiter != null) {
+			if (delimiter.length() > 1)
+				throw new BadPropertyValueException("delimiter too long");
+			if (delimiter.charAt(0) < 1 || delimiter.charAt(0) > 127)
+				throw new BadPropertyValueException(
+						"delimiter character must be non-NUL ASCII");
+		}
+		i.setDelimiter(delimiter);
+	}
+
+	@Override
+	@CallCounted
+	@PerfLogged
+	@RolesAllowed(USER)
 	public void setRunOutputBaclavaFile(String runName, String outputFile)
 			throws UnknownRunException, NoUpdateException,
 			FilesystemAccessException, BadStateChangeException {

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ef0aeb09/server-webapp/src/main/java/org/taverna/server/master/common/InputDescription.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/common/InputDescription.java b/server-webapp/src/main/java/org/taverna/server/master/common/InputDescription.java
index f0e11f0..5e773a4 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/common/InputDescription.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/common/InputDescription.java
@@ -74,6 +74,11 @@ public class InputDescription extends VersionedElement {
 		@XmlAttribute(name = "portFile", required = false)
 		public String file;
 		/**
+		 * The file assigned to this port.
+		 */
+		@XmlAttribute(name = "listDelimiter", required = false)
+		public String delimiter;
+		/**
 		 * The value assigned to this port.
 		 */
 		@XmlValue
@@ -99,6 +104,7 @@ public class InputDescription extends VersionedElement {
 				file = null;
 				value = input.getValue();
 			}
+			delimiter = input.getDelimiter();
 		}
 	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/ef0aeb09/server-webapp/src/main/java/org/taverna/server/master/soap/TavernaServerSOAP.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/soap/TavernaServerSOAP.java b/server-webapp/src/main/java/org/taverna/server/master/soap/TavernaServerSOAP.java
index 7d0f818..4d02275 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/soap/TavernaServerSOAP.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/soap/TavernaServerSOAP.java
@@ -333,6 +333,38 @@ public interface TavernaServerSOAP {
 			BadStateChangeException, BadPropertyValueException;
 
 	/**
+	 * Tells the given run to use the given list delimiter (a single-character
+	 * string value) for splitting the input on the given port. Note that
+	 * nullability of the delimiter is supported here.
+	 * 
+	 * @param runName
+	 *            The handle of the run.
+	 * @param portName
+	 *            The port to set the list delimiter for.
+	 * @param delimiter
+	 *            The single-character value (in range U+00001..U+0007F) to use
+	 *            as the delimiter, or <tt>null</tt> for no delimiter at all.
+	 * @throws UnknownRunException
+	 *             If the server doesn't know about the run or if the user is
+	 *             not permitted to see it.
+	 * @throws NoUpdateException
+	 *             If the user isn't allowed to manipulate the run.
+	 * @throws BadStateChangeException
+	 *             If the run is not in the {@link Status#Initialized
+	 *             Initialized} state.
+	 * @throws BadPropertyValueException
+	 *             If the delimiter may not be changed to the given literal
+	 *             value.
+	 */
+	@WSDLDocumentation("Tells the given run to use the given list delimiter (a single-character string value) for splitting the input on the given port. Note that nullability of the delimiter is supported here.")
+	void setRunInputPortListDelimiter(
+			@WebParam(name = "runName") String runName,
+			@WebParam(name = "portName") String portName,
+			@WebParam(name = "delimiter") String delimiter)
+			throws UnknownRunException, NoUpdateException,
+			BadStateChangeException, BadPropertyValueException;
+
+	/**
 	 * Get the Baclava file where the output of the run will be written.
 	 * 
 	 * @param runName


[47/50] [abbrv] incubator-taverna-server git commit: Much cleaning up of memory subtleties.

Posted by st...@apache.org.
Much cleaning up of memory subtleties.

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/0b9c4f9a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/0b9c4f9a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/0b9c4f9a

Branch: refs/heads/master
Commit: 0b9c4f9a6f42cb7facdd4f25f8689c9c0a43b936
Parents: d13e9a5
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Tue Aug 26 14:10:30 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Tue Aug 26 14:11:55 2014 +0100

----------------------------------------------------------------------
 .../localworker/AbstractRemoteRunFactory.java   | 45 +++++++++-----------
 .../master/localworker/ForkRunFactory.java      |  3 +-
 .../localworker/IdAwareForkRunFactory.java      |  3 +-
 .../server/master/localworker/StreamLogger.java |  3 +-
 .../master/notification/atom/EventDAO.java      |  5 ++-
 .../master/utils/CertificateChainFetcher.java   | 14 +++++-
 .../taverna/server/master/utils/DerbyUtils.java | 27 +++++++++---
 .../taverna/server/master/utils/JDOSupport.java |  6 +++
 .../master/utils/LoggingDerbyAdapter.java       |  6 +--
 .../server/master/utils/OneShotThread.java      | 10 +++++
 server-webapp/src/main/webapp/WEB-INF/beans.xml | 45 ++++++++++----------
 11 files changed, 106 insertions(+), 61 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0b9c4f9a/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java b/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java
index 233023c..f1dec3c 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java
@@ -37,9 +37,7 @@ import javax.xml.bind.JAXBException;
 
 import org.apache.commons.io.IOUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Required;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.core.task.TaskExecutor;
 import org.springframework.jmx.export.annotation.ManagedResource;
 import org.taverna.server.localworker.remote.RemoteRunFactory;
 import org.taverna.server.localworker.remote.RemoteSingleRun;
@@ -143,6 +141,18 @@ public abstract class AbstractRemoteRunFactory extends RunFactoryConfiguration
 		}
 	}
 
+	protected static final Process launchSubprocess(ProcessBuilder b)
+			throws IOException {
+		Thread t = Thread.currentThread();
+		ClassLoader ccl = t.getContextClassLoader();
+		try {
+			t.setContextClassLoader(null);
+			return b.start();
+		} finally {
+			t.setContextClassLoader(ccl);
+		}
+	}
+
 	/** Get a handle to a new instance of the RMI registry. */
 	private Registry makeRegistry(int port) throws RemoteException {
 		ProcessBuilder p = new ProcessBuilder(getJavaBinary());
@@ -151,7 +161,7 @@ public abstract class AbstractRemoteRunFactory extends RunFactoryConfiguration
 		p.command().add(Integer.toString(port));
 		p.command().add(Boolean.toString(rmiLocalhostOnly));
 		try {
-			Process proc = p.start();
+			Process proc = launchSubprocess(p);
 			Thread.sleep(getSleepTime());
 			try {
 				if (proc.exitValue() == 0)
@@ -242,7 +252,6 @@ public abstract class AbstractRemoteRunFactory extends RunFactoryConfiguration
 	public static final String SECURITY_POLICY_FILE = "security.policy";
 	private SecurityContextFactory securityFactory;
 	UsageRecordRecorder usageRecordSink;
-	TaskExecutor urProcessorPool;
 	private EventDAO masterEventFeed;
 
 	@Autowired(required = true)
@@ -260,12 +269,6 @@ public abstract class AbstractRemoteRunFactory extends RunFactoryConfiguration
 		this.usageRecordSink = usageRecordSink;
 	}
 
-	@Resource(name = "URThreads")
-	@Required
-	void setURProcessorPool(TaskExecutor urProcessorPool) {
-		this.urProcessorPool = urProcessorPool;
-	}
-
 	/**
 	 * Configures the Java security model. Not currently used, as it is
 	 * viciously difficult to get right!
@@ -388,6 +391,12 @@ public abstract class AbstractRemoteRunFactory extends RunFactoryConfiguration
 		return workflow.marshal();
 	}
 
+	private void acceptUsageRecord(String usageRecord) {
+		if (usageRecordSink != null)
+			usageRecordSink.storeUsageRecord(usageRecord);
+		runDB.checkForFinishNow();
+	}
+
 	/**
 	 * Make a Remote object that can act as a consumer for usage records.
 	 * 
@@ -405,20 +414,8 @@ public abstract class AbstractRemoteRunFactory extends RunFactoryConfiguration
 				}
 
 				@Override
-				public void acceptUsageRecord(final String usageRecord) {
-					if (usageRecordSink != null && urProcessorPool != null)
-						urProcessorPool.execute(new Runnable() {
-							@Override
-							public void run() {
-								usageRecordSink.storeUsageRecord(usageRecord);
-							}
-						});
-					urProcessorPool.execute(new Runnable() {
-						@Override
-						public void run() {
-							runDB.checkForFinishNow();
-						}
-					});
+				public void acceptUsageRecord(String usageRecord) {
+					AbstractRemoteRunFactory.this.acceptUsageRecord(usageRecord);
 				}
 			}
 			return new URReceiver();

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0b9c4f9a/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java b/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
index 96789da..b8746bc 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
@@ -141,7 +141,8 @@ public class ForkRunFactory extends AbstractRemoteRunFactory implements
 
 		// Spawn the subprocess
 		log.info("about to create subprocess: " + p.command());
-		factoryProcess = p.start();
+		
+		factoryProcess = launchSubprocess(p);
 		outlog = new StreamLogger("FactoryStdout", factoryProcess.getInputStream()) {
 			@Override
 			protected void write(String msg) {

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0b9c4f9a/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java b/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
index 6515c4c..6679039 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
@@ -11,6 +11,7 @@ import static java.util.Arrays.asList;
 import static java.util.Calendar.SECOND;
 import static java.util.UUID.randomUUID;
 import static org.taverna.server.master.TavernaServer.JMX_ROOT;
+import static org.taverna.server.master.localworker.AbstractRemoteRunFactory.launchSubprocess;
 
 import java.io.BufferedWriter;
 import java.io.File;
@@ -383,7 +384,7 @@ class SecureFork implements IdAwareForkRunFactory.MetaFactory {
 		// Spawn the subprocess
 		log.info("about to create subprocess: " + p.command());
 		log.info("subprocess directory: " + p.directory());
-		process = p.start();
+		process = launchSubprocess(p);
 		channel = new PrintWriter(new BufferedWriter(new OutputStreamWriter(
 				process.getOutputStream())), true);
 		// Log the responses

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0b9c4f9a/server-webapp/src/main/java/org/taverna/server/master/localworker/StreamLogger.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/localworker/StreamLogger.java b/server-webapp/src/main/java/org/taverna/server/master/localworker/StreamLogger.java
index 437d4dc..f361e17 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/localworker/StreamLogger.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/localworker/StreamLogger.java
@@ -34,6 +34,7 @@ abstract class StreamLogger {
 				}
 			}
 		}, name + ".StreamLogger");
+		t.setContextClassLoader(null);
 		t.setDaemon(true);
 		t.start();
 	}
@@ -58,4 +59,4 @@ abstract class StreamLogger {
 		} catch (IOException e) {
 		}
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0b9c4f9a/server-webapp/src/main/java/org/taverna/server/master/notification/atom/EventDAO.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/notification/atom/EventDAO.java b/server-webapp/src/main/java/org/taverna/server/master/notification/atom/EventDAO.java
index 0d95f54..56f25ff 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/notification/atom/EventDAO.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/notification/atom/EventDAO.java
@@ -161,6 +161,7 @@ public class EventDAO extends JDOSupport<Event> implements MessageDispatcher {
 	}
 
 	private Thread eventDaemon;
+	private boolean shuttingDown = false;
 
 	@Required
 	public void setSelf(final EventDAO dao) {
@@ -168,7 +169,7 @@ public class EventDAO extends JDOSupport<Event> implements MessageDispatcher {
 			@Override
 			public void run() {
 				try {
-					while (!interrupted()) {
+					while (!shuttingDown && !interrupted()) {
 						transferEvents(dao, new ArrayList<Event>(
 								asList(insertQueue.take())));
 						sleep(5000);
@@ -179,6 +180,7 @@ public class EventDAO extends JDOSupport<Event> implements MessageDispatcher {
 				}
 			}
 		}, "ATOM event daemon");
+		eventDaemon.setContextClassLoader(null);
 		eventDaemon.setDaemon(true);
 		eventDaemon.start();
 	}
@@ -190,6 +192,7 @@ public class EventDAO extends JDOSupport<Event> implements MessageDispatcher {
 
 	@PreDestroy
 	void stopDaemon() {
+		shuttingDown = true;
 		if (eventDaemon != null)
 			eventDaemon.interrupt();
 	}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0b9c4f9a/server-webapp/src/main/java/org/taverna/server/master/utils/CertificateChainFetcher.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/utils/CertificateChainFetcher.java b/server-webapp/src/main/java/org/taverna/server/master/utils/CertificateChainFetcher.java
index f94d497..c27502f 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/utils/CertificateChainFetcher.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/utils/CertificateChainFetcher.java
@@ -165,8 +165,20 @@ public class CertificateChainFetcher {
 			return null;
 		synchronized (this) {
 			if (!cache.containsKey(uri)) {
+				int port = uri.getPort();
+				if (port == -1)
+					switch (uri.getScheme()) {
+					case "http":
+						port = 80;
+						break;
+					case "https":
+						port = 443;
+						break;
+					default:
+						return null;
+					}
 				X509Certificate[] chain = getCertificateChainForService(
-						uri.getHost(), uri.getPort());
+						uri.getHost(), port);
 				if (chain != null)
 					cache.put(uri, unmodifiableList(asList(chain)));
 				else

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0b9c4f9a/server-webapp/src/main/java/org/taverna/server/master/utils/DerbyUtils.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/utils/DerbyUtils.java b/server-webapp/src/main/java/org/taverna/server/master/utils/DerbyUtils.java
index 1b41ab7..f8b39e3 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/utils/DerbyUtils.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/utils/DerbyUtils.java
@@ -1,5 +1,6 @@
 package org.taverna.server.master.utils;
 
+import java.io.EOFException;
 import java.io.IOException;
 import java.io.Writer;
 
@@ -26,30 +27,42 @@ public class DerbyUtils {
 }
 
 class DBLog extends Writer {
-	Log log = LogFactory.getLog("Taverna.Server.Database");
-	StringBuilder sb = new StringBuilder();
+	private Log log = LogFactory.getLog("Taverna.Server.Database");
+	private StringBuilder sb = new StringBuilder();
+	private boolean closed = false;
 
 	@Override
 	public void write(char[] cbuf, int off, int len) throws IOException {
+		if (closed)
+			throw new EOFException();
 		if (!log.isInfoEnabled())
 			return;
 		sb.append(cbuf, off, len);
-		while (true) {
-			int idx = sb.indexOf("\n");
+		while (!closed) {
+			int idx = sb.indexOf("\n"), realIdx = idx;
 			if (idx < 0)
 				break;
-			if (idx > 0 && sb.charAt(idx - 1) == '\r')
+			char ch;
+			while (idx > 0 && ((ch = sb.charAt(idx - 1)) == '\r' || ch == ' ' || ch == '\t'))
 				idx--;
-			log.info(sb.substring(0, idx));
-			sb.delete(0, idx + 1);
+			if (idx > 0)
+				log.info(sb.substring(0, idx));
+			sb.delete(0, realIdx + 1);
 		}
 	}
 
 	@Override
 	public void flush() throws IOException {
+		if (sb.length() > 0) {
+			log.info(sb.toString());
+			sb = new StringBuilder();
+		}
 	}
 
 	@Override
 	public void close() throws IOException {
+		flush();
+		closed = true;
+		sb = null;
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0b9c4f9a/server-webapp/src/main/java/org/taverna/server/master/utils/JDOSupport.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/utils/JDOSupport.java b/server-webapp/src/main/java/org/taverna/server/master/utils/JDOSupport.java
index b9cf1e6..ba9ec81 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/utils/JDOSupport.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/utils/JDOSupport.java
@@ -224,6 +224,12 @@ public abstract class JDOSupport<T> {
 	public @interface WithinSingleTransaction {
 	}
 
+	/**
+	 * Manages {@linkplain PersistenceManager persistence managers} in a way
+	 * that doesn't cause problems when the web application is unloaded.
+	 * 
+	 * @author Donal Fellows
+	 */
 	public static class PersistenceManagerBuilder {
 		private PersistenceManagerFactory pmf;
 		private WeakHashMap<Thread, PersistenceManager> cache = new WeakHashMap<>();

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0b9c4f9a/server-webapp/src/main/java/org/taverna/server/master/utils/LoggingDerbyAdapter.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/utils/LoggingDerbyAdapter.java b/server-webapp/src/main/java/org/taverna/server/master/utils/LoggingDerbyAdapter.java
index 5abb18f..a8aa937 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/utils/LoggingDerbyAdapter.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/utils/LoggingDerbyAdapter.java
@@ -44,9 +44,9 @@ public class LoggingDerbyAdapter extends DerbyAdapter {
 		ddl.append(item);
 		if (!item.endsWith("\n"))
 			ddl.append('\n');
-		timeout = currentTimeMillis() + 15000;
+		timeout = currentTimeMillis() + 5000;
 		if (timer == null)
-			(timer = new Thread(new Runnable() {
+			timer = new OneShotThread("DDL logger timeout", new Runnable() {
 				@Override
 				public void run() {
 					try {
@@ -57,7 +57,7 @@ public class LoggingDerbyAdapter extends DerbyAdapter {
 					}
 					logDDL();
 				}
-			})).start();
+			});
 	}
 
 	/**

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0b9c4f9a/server-webapp/src/main/java/org/taverna/server/master/utils/OneShotThread.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/utils/OneShotThread.java b/server-webapp/src/main/java/org/taverna/server/master/utils/OneShotThread.java
new file mode 100644
index 0000000..68b813d
--- /dev/null
+++ b/server-webapp/src/main/java/org/taverna/server/master/utils/OneShotThread.java
@@ -0,0 +1,10 @@
+package org.taverna.server.master.utils;
+
+public class OneShotThread extends Thread {
+	public OneShotThread(String name, Runnable target) {
+		super(target, name);
+		setContextClassLoader(null);
+		setDaemon(true);
+		start();
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0b9c4f9a/server-webapp/src/main/webapp/WEB-INF/beans.xml
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/webapp/WEB-INF/beans.xml b/server-webapp/src/main/webapp/WEB-INF/beans.xml
index 693557a..73990a7 100644
--- a/server-webapp/src/main/webapp/WEB-INF/beans.xml
+++ b/server-webapp/src/main/webapp/WEB-INF/beans.xml
@@ -192,28 +192,29 @@
 		<props> <prop key="hibernate.dialect">org.hibernate.dialect.DerbyDialect</prop> 
 		<prop key="hibernate.hbm2ddl.auto">create</prop> </props> </property> <property 
 		name="annotatedClasses"> <list> </list> </property> </bean> -->
-	<bean id="pmf" class="org.datanucleus.api.jdo.JDOPersistenceManagerFactory"
-		destroy-method="close">
-		<property name="connectionFactory" ref="dataSource" />
-		<property name="nontransactionalRead" value="true" />
-		<property name="persistenceProperties">
-			<props>
-				<prop key="datanucleus.storeManagerType">rdbms</prop>
-				<prop key="datanucleus.autoCreateTables">true</prop>
-				<prop key="datanucleus.autoCreateTables">true</prop>
-				<prop key="datanucleus.validateTables">true</prop>
-				<prop key="datanucleus.autoCreateColumns">true</prop>
-				<prop key="datanucleus.autoCreateConstraints">true</prop>
-				<prop key="datanucleus.validateConstraints">true</prop>
-				<prop key="datanucleus.autoCreateSchema">true</prop>
-				<prop key="datanucleus.PersistenceUnitName">TavernaServer</prop>
-				<prop key="datanucleus.rdbms.datastoreAdapterClassName"
-					>org.taverna.server.master.utils.LoggingDerbyAdapter</prop>
-			</props>
-		</property>
-	</bean>
 	<bean id="pmb" class="org.taverna.server.master.utils.JDOSupport.PersistenceManagerBuilder">
-		<property name="persistenceManagerFactory" ref="pmf" />
+		<property name="persistenceManagerFactory">
+			<bean id="pmf" class="org.datanucleus.api.jdo.JDOPersistenceManagerFactory"
+				destroy-method="close">
+				<property name="connectionFactory" ref="dataSource" />
+				<property name="nontransactionalRead" value="true" />
+				<property name="persistenceProperties">
+					<props>
+						<prop key="datanucleus.storeManagerType">rdbms</prop>
+						<prop key="datanucleus.autoCreateTables">true</prop>
+						<prop key="datanucleus.autoCreateTables">true</prop>
+						<prop key="datanucleus.validateTables">true</prop>
+						<prop key="datanucleus.autoCreateColumns">true</prop>
+						<prop key="datanucleus.autoCreateConstraints">true</prop>
+						<prop key="datanucleus.validateConstraints">true</prop>
+						<prop key="datanucleus.autoCreateSchema">true</prop>
+						<prop key="datanucleus.PersistenceUnitName">TavernaServer</prop>
+						<prop key="datanucleus.rdbms.datastoreAdapterClassName"
+							>org.taverna.server.master.utils.LoggingDerbyAdapter</prop>
+					</props>
+				</property>
+			</bean>
+		</property>
 	</bean>
 	<bean id="transactionAspect"
 		class="org.taverna.server.master.utils.JDOSupport.TransactionAspect" />
@@ -272,7 +273,7 @@
 		/> <property name="usageRecordSink" ref="usageRecordSink" /> <property name="URProcessorPool" 
 		ref="URThreads" /> </bean> -->
 
-	<task:executor id="URThreads" pool-size="${pool.size}" />
+	<!-- <task:executor id="URThreads" pool-size="${pool.size}" /> -->
 
 	<bean id="worker.securityContext"
 		class="org.taverna.server.master.worker.SecurityContextFactory">


[31/50] [abbrv] incubator-taverna-server git commit: Merge remote-tracking branch 'taverna/2.5' into 2.5-branch

Posted by st...@apache.org.
Merge remote-tracking branch 'taverna/2.5' into 2.5-branch

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/b7c1a1a7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/b7c1a1a7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/b7c1a1a7

Branch: refs/heads/master
Commit: b7c1a1a7a69694e67bd09026660179666fde8642
Parents: a18fb0d 1546afb
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Wed May 28 13:13:50 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Wed May 28 13:13:50 2014 +0100

----------------------------------------------------------------------
 server-webapp/src/main/replacementscripts/executeworkflow.sh | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------



[40/50] [abbrv] incubator-taverna-server git commit: Basic OSGification of the client.

Posted by st...@apache.org.
Basic OSGification of the client.

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/e5bc8be7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/e5bc8be7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/e5bc8be7

Branch: refs/heads/master
Commit: e5bc8be7891b955cb7cbd3df8690fb708a6cf7d7
Parents: f769f20
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Fri Jun 27 15:24:52 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Fri Jun 27 15:24:52 2014 +0100

----------------------------------------------------------------------
 server-client/pom.xml                           | 12 +++++++
 .../taverna/server/client/TavernaServer.java    | 30 ++++++++--------
 server-client/src/main/wadl/tavserv.wadl        | 36 +++++++++++++++++---
 3 files changed, 59 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/e5bc8be7/server-client/pom.xml
----------------------------------------------------------------------
diff --git a/server-client/pom.xml b/server-client/pom.xml
index 93665f8..397f102 100644
--- a/server-client/pom.xml
+++ b/server-client/pom.xml
@@ -7,6 +7,7 @@
 		<version>2.5.5-SNAPSHOT</version>
 	</parent>
 	<artifactId>server-client</artifactId>
+	<packaging>bundle</packaging>
 
 	<dependencies>
 		<dependency>
@@ -34,6 +35,17 @@
 	<build>
 		<plugins>
 			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<extensions>true</extensions>
+				<configuration>
+					<instructions>
+						<Export-Package>uk.org.taverna.server.client</Export-Package>
+						<Private-Package>uk.org.taverna.server.client.*</Private-Package>
+					</instructions>
+				</configuration>
+			</plugin>
+			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-compiler-plugin</artifactId>
 				<configuration>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/e5bc8be7/server-client/src/main/java/uk/org/taverna/server/client/TavernaServer.java
----------------------------------------------------------------------
diff --git a/server-client/src/main/java/uk/org/taverna/server/client/TavernaServer.java b/server-client/src/main/java/uk/org/taverna/server/client/TavernaServer.java
index 5a66256..3ceb208 100644
--- a/server-client/src/main/java/uk/org/taverna/server/client/TavernaServer.java
+++ b/server-client/src/main/java/uk/org/taverna/server/client/TavernaServer.java
@@ -31,21 +31,21 @@ import org.taverna.server.client.wadl.TavernaServer.Root;
 import org.taverna.server.client.wadl.TavernaServer.Root.RunsRunName;
 import org.w3c.dom.Element;
 
-import uk.org.taverna.ns._2010.port.InputPort;
-import uk.org.taverna.ns._2010.port.OutputPort;
-import uk.org.taverna.ns._2010.xml.server.Capability;
-import uk.org.taverna.ns._2010.xml.server.DirectoryEntry;
-import uk.org.taverna.ns._2010.xml.server.DirectoryReference;
-import uk.org.taverna.ns._2010.xml.server.FileReference;
-import uk.org.taverna.ns._2010.xml.server.KeyPairCredential;
-import uk.org.taverna.ns._2010.xml.server.PasswordCredential;
-import uk.org.taverna.ns._2010.xml.server.TavernaRun;
-import uk.org.taverna.ns._2010.xml.server.VersionedElement;
-import uk.org.taverna.ns._2010.xml.server.rest.DirectoryContents;
-import uk.org.taverna.ns._2010.xml.server.rest.InputDescription;
-import uk.org.taverna.ns._2010.xml.server.rest.InputDescription.Value;
-import uk.org.taverna.ns._2010.xml.server.rest.MakeDirectory;
-import uk.org.taverna.ns._2010.xml.server.rest.UploadFile;
+import uk.org.taverna.server.client.generic.port.InputPort;
+import uk.org.taverna.server.client.generic.port.OutputPort;
+import uk.org.taverna.server.client.generic.Capability;
+import uk.org.taverna.server.client.generic.DirectoryEntry;
+import uk.org.taverna.server.client.generic.DirectoryReference;
+import uk.org.taverna.server.client.generic.FileReference;
+import uk.org.taverna.server.client.generic.KeyPairCredential;
+import uk.org.taverna.server.client.generic.PasswordCredential;
+import uk.org.taverna.server.client.generic.TavernaRun;
+import uk.org.taverna.server.client.generic.VersionedElement;
+import uk.org.taverna.server.client.rest.DirectoryContents;
+import uk.org.taverna.server.client.rest.InputDescription;
+import uk.org.taverna.server.client.rest.InputDescription.Value;
+import uk.org.taverna.server.client.rest.MakeDirectory;
+import uk.org.taverna.server.client.rest.UploadFile;
 
 import com.sun.jersey.api.client.Client;
 import com.sun.jersey.api.client.ClientHandlerException;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/e5bc8be7/server-client/src/main/wadl/tavserv.wadl
----------------------------------------------------------------------
diff --git a/server-client/src/main/wadl/tavserv.wadl b/server-client/src/main/wadl/tavserv.wadl
index 564864f..2ba8fbe 100644
--- a/server-client/src/main/wadl/tavserv.wadl
+++ b/server-client/src/main/wadl/tavserv.wadl
@@ -1,4 +1,18 @@
-<application xmlns="http://wadl.dev.java.net/2009/02" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:prefix1="http://ns.taverna.org.uk/2010/xml/server/rest/" xmlns:prefix3="http://ns.taverna.org.uk/2010/xml/server/" xmlns:prefix10="http://ns.taverna.org.uk/2010/port/"><grammars><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:admin="http://ns.taverna.org.uk/2010/xml/server/admin/" xmlns:feed="http://ns.taverna.org.uk/2010/xml/server/feed/" xmlns:port="http://ns.taverna.org.uk/2010/port/" xmlns:tns="http://ns.taverna.org.uk/2010/xml/server/rest/" xmlns:ts="http://ns.taverna.org.uk/2010/xml/server/" xmlns:ts-rest="http://ns.taverna.org.uk/2010/xml/server/rest/" xmlns:ts-soap="http://ns.taverna.org.uk/2010/xml/server/soap/" xmlns:xlink="http://www.w3.org/1999/xlink" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://ns.taverna.org.uk/2010/xml/server/rest/">
+<application xmlns="http://wadl.dev.java.net/2009/02"
+	xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:prefix1="http://ns.taverna.org.uk/2010/xml/server/rest/"
+	xmlns:prefix3="http://ns.taverna.org.uk/2010/xml/server/"
+	xmlns:prefix10="http://ns.taverna.org.uk/2010/port/" xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" jxb:version="2.1">
+<grammars>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:admin="http://ns.taverna.org.uk/2010/xml/server/admin/" xmlns:feed="http://ns.taverna.org.uk/2010/xml/server/feed/" xmlns:port="http://ns.taverna.org.uk/2010/port/" xmlns:tns="http://ns.taverna.org.uk/2010/xml/server/rest/" xmlns:ts="http://ns.taverna.org.uk/2010/xml/server/" xmlns:ts-rest="http://ns.taverna.org.uk/2010/xml/server/rest/" xmlns:ts-soap="http://ns.taverna.org.uk/2010/xml/server/soap/" xmlns:xlink="http://www.w3.org/1999/xlink" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://ns.taverna.org.uk/2010/xml/server/rest/" jxb:version="2.1">
+    <xs:annotation>
+    	<xs:appinfo>
+			<jxb:schemaBindings>
+				<jxb:package name="uk.org.taverna.server.client.rest" />
+			</jxb:schemaBindings>
+    	</xs:appinfo>
+    </xs:annotation>
     <xs:import namespace="http://ns.taverna.org.uk/2010/xml/server/"/>
     <xs:import namespace="http://www.w3.org/1999/xlink"/>
     <xs:element name="capabilities">
@@ -337,10 +351,17 @@
     <xs:attribute name="owner" type="xs:string"/>
     <xs:attribute name="type" type="xs:string"/>
 </xs:schema>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/1999/xlink" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://www.w3.org/1999/xlink">
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/1999/xlink" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://www.w3.org/1999/xlink" jxb:version="2.1">
     <xs:attribute name="href" type="xs:string"/>
 </xs:schema>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:port="http://ns.taverna.org.uk/2010/port/" xmlns:run="http://ns.taverna.org.uk/2010/run/" xmlns:tns="http://ns.taverna.org.uk/2010/port/" xmlns:xlink="http://www.w3.org/1999/xlink" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://ns.taverna.org.uk/2010/port/">
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:port="http://ns.taverna.org.uk/2010/port/" xmlns:run="http://ns.taverna.org.uk/2010/run/" xmlns:tns="http://ns.taverna.org.uk/2010/port/" xmlns:xlink="http://www.w3.org/1999/xlink" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://ns.taverna.org.uk/2010/port/" jxb:version="2.1">
+    <xs:annotation>
+    	<xs:appinfo>
+			<jxb:schemaBindings>
+				<jxb:package name="uk.org.taverna.server.client.generic.port" />
+			</jxb:schemaBindings>
+    	</xs:appinfo>
+    </xs:annotation>
     <xs:import namespace="http://www.w3.org/1999/xlink"/>
     <xs:element name="inputDescription" type="port:inputDescription"/>
     <xs:element name="workflowOutputs" type="port:outputDescription"/>
@@ -451,7 +472,14 @@
     <xs:attribute name="workflowRun" type="xs:anyURI"/>
     <xs:attribute name="workflowRunId" type="xs:string"/>
 </xs:schema>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:admin="http://ns.taverna.org.uk/2010/xml/server/admin/" xmlns:feed="http://ns.taverna.org.uk/2010/xml/server/feed/" xmlns:tns="http://ns.taverna.org.uk/2010/xml/server/" xmlns:ts="http://ns.taverna.org.uk/2010/xml/server/" xmlns:ts-rest="http://ns.taverna.org.uk/2010/xml/server/rest/" xmlns:ts-soap="http://ns.taverna.org.uk/2010/xml/server/soap/" xmlns:xlink="http://www.w3.org/1999/xlink" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://ns.taverna.org.uk/2010/xml/server/">
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:admin="http://ns.taverna.org.uk/2010/xml/server/admin/" xmlns:feed="http://ns.taverna.org.uk/2010/xml/server/feed/" xmlns:tns="http://ns.taverna.org.uk/2010/xml/server/" xmlns:ts="http://ns.taverna.org.uk/2010/xml/server/" xmlns:ts-rest="http://ns.taverna.org.uk/2010/xml/server/rest/" xmlns:ts-soap="http://ns.taverna.org.uk/2010/xml/server/soap/" xmlns:xlink="http://www.w3.org/1999/xlink" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://ns.taverna.org.uk/2010/xml/server/" jxb:version="2.1">
+    <xs:annotation>
+    	<xs:appinfo>
+			<jxb:schemaBindings>
+				<jxb:package name="uk.org.taverna.server.client.generic" />
+			</jxb:schemaBindings>
+    	</xs:appinfo>
+    </xs:annotation>
     <xs:import namespace="http://www.w3.org/1999/xlink"/>
     <xs:element name="capability" type="ts:Capability"/>
     <xs:element name="dir" type="ts:DirectoryReference"/>


[33/50] [abbrv] incubator-taverna-server git commit: Allow configuration of which Spring configuration is used at build time. Will become simplification of installation instructions, and multiple builds ("fully secured", "partially secured", "unsecured")

Posted by st...@apache.org.
Allow configuration of which Spring configuration is used at build time.
Will become simplification of installation instructions, and multiple
builds ("fully secured", "partially secured", "unsecured").

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/0b6e8e85
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/0b6e8e85
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/0b6e8e85

Branch: refs/heads/master
Commit: 0b6e8e85e26b0645364f8076ce7185eebf525eee
Parents: ce509f7
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Mon Jun 2 09:46:51 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Mon Jun 2 09:51:09 2014 +0100

----------------------------------------------------------------------
 server-webapp/pom.xml                           | 36 +++++++++
 .../src/main/webapp/WEB-INF/web-nosec.xml       | 79 +++++++++++++++++++
 .../src/main/webapp/WEB-INF/web-partsec.xml     | 79 +++++++++++++++++++
 .../src/main/webapp/WEB-INF/web-sec.xml         | 79 +++++++++++++++++++
 server-webapp/src/main/webapp/WEB-INF/web.xml   | 80 --------------------
 5 files changed, 273 insertions(+), 80 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0b6e8e85/server-webapp/pom.xml
----------------------------------------------------------------------
diff --git a/server-webapp/pom.xml b/server-webapp/pom.xml
index 5179fb3..9b7ac80 100644
--- a/server-webapp/pom.xml
+++ b/server-webapp/pom.xml
@@ -639,6 +639,14 @@
 			</plugin>
 			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-war-plugin</artifactId>
+				<version>2.4</version>
+				<configuration>
+					<webXml>src/main/webapp/WEB-INF/web-sec.xml</webXml>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-eclipse-plugin</artifactId>
 				<configuration>
 					<additionalProjectnatures>
@@ -785,5 +793,33 @@
 				<forker.module>server-win-forker</forker.module>
 			</properties>
 		</profile>
+		<profile>
+			<id>nosec</id>
+			<build>
+				<plugins>
+					<plugin>
+						<groupId>org.apache.maven.plugins</groupId>
+						<artifactId>maven-war-plugin</artifactId>
+						<configuration>
+							<webXml>src/main/webapp/WEB-INF/web-nosec.xml</webXml>
+						</configuration>
+					</plugin>
+				</plugins>
+			</build>
+		</profile>
+		<profile>
+			<id>partsec</id>
+			<build>
+				<plugins>
+					<plugin>
+						<groupId>org.apache.maven.plugins</groupId>
+						<artifactId>maven-war-plugin</artifactId>
+						<configuration>
+							<webXml>src/main/webapp/WEB-INF/web-partsec.xml</webXml>
+						</configuration>
+					</plugin>
+				</plugins>
+			</build>
+		</profile>
 	</profiles>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0b6e8e85/server-webapp/src/main/webapp/WEB-INF/web-nosec.xml
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/webapp/WEB-INF/web-nosec.xml b/server-webapp/src/main/webapp/WEB-INF/web-nosec.xml
new file mode 100644
index 0000000..d6c6ee7
--- /dev/null
+++ b/server-webapp/src/main/webapp/WEB-INF/web-nosec.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE web-app
+    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+    "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<!-- Copyright (C) 2010-2011 The University of Manchester See the file "LICENSE" 
+	for license terms. -->
+<web-app id="TAVSERV-2.5.4">
+	<display-name>Taverna 2.5.4 Server</display-name>
+	<description>This is the front-end engine for Taverna 2.5.4 Server.</description>
+	<context-param>
+		<param-name>contextConfigLocation</param-name>
+		<param-value>WEB-INF/insecure.xml</param-value>
+		<description>Where Spring is to load its bean definitions from. DO NOT
+			CHANGE WITHOUT CONSULTING DOCUMENTATION.</description>
+	</context-param>
+	<context-param>
+		<param-name>log4jExposeWebAppRoot</param-name>
+		<param-value>false</param-value>
+		<description>
+			THIS IS STUPID! We have to do this so that Tomcat webapps do not
+			leak their configurations into each other via the log4j support
+			trying to be "smart".
+			http://javacolors.blogspot.co.uk/2010/08/tomcat-and-webxmls-webapprootkey.html
+			If you change this, good luck hunting down the weird crashes.
+		</description>
+	</context-param>
+
+	<filter>
+		<filter-name>springSecurityFilterChain</filter-name>
+		<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
+	</filter>
+	<filter-mapping>
+		<filter-name>springSecurityFilterChain</filter-name>
+		<url-pattern>/*</url-pattern>
+	</filter-mapping>
+	<listener>
+		<listener-class>
+			org.springframework.web.context.request.RequestContextListener
+		</listener-class>
+	</listener>
+	<listener>
+		<listener-class>
+			org.springframework.web.util.Log4jConfigListener
+		</listener-class>
+	</listener>
+	<listener>
+		<listener-class>
+			org.springframework.web.context.ContextLoaderListener
+		</listener-class>
+	</listener>
+
+	<servlet>
+		<servlet-name>CXFServlet</servlet-name>
+		<display-name>CXF Servlet</display-name>
+		<servlet-class>
+			org.apache.cxf.transport.servlet.CXFServlet
+		</servlet-class>
+		<load-on-startup>1</load-on-startup>
+	</servlet>
+
+	<servlet-mapping>
+		<servlet-name>CXFServlet</servlet-name>
+		<url-pattern>/*</url-pattern>
+	</servlet-mapping>
+
+	<resource-ref>
+		<description>
+			Resource reference to a factory for javax.mail.Session
+			instances that may be used for sending electronic mail
+			messages, preconfigured to connect to the appropriate
+			SMTP server.
+		</description>
+		<res-ref-name>mail/Session</res-ref-name>
+		<res-type>javax.mail.Session</res-type>
+		<res-auth>Container</res-auth>
+		<res-sharing-scope>Shareable</res-sharing-scope>
+	</resource-ref>
+</web-app>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0b6e8e85/server-webapp/src/main/webapp/WEB-INF/web-partsec.xml
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/webapp/WEB-INF/web-partsec.xml b/server-webapp/src/main/webapp/WEB-INF/web-partsec.xml
new file mode 100644
index 0000000..a2b545e
--- /dev/null
+++ b/server-webapp/src/main/webapp/WEB-INF/web-partsec.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE web-app
+    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+    "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<!-- Copyright (C) 2010-2011 The University of Manchester See the file "LICENSE" 
+	for license terms. -->
+<web-app id="TAVSERV-2.5.4">
+	<display-name>Taverna 2.5.4 Server</display-name>
+	<description>This is the front-end engine for Taverna 2.5.4 Server.</description>
+	<context-param>
+		<param-name>contextConfigLocation</param-name>
+		<param-value>WEB-INF/partsecure.xml</param-value>
+		<description>Where Spring is to load its bean definitions from. DO NOT
+			CHANGE WITHOUT CONSULTING DOCUMENTATION.</description>
+	</context-param>
+	<context-param>
+		<param-name>log4jExposeWebAppRoot</param-name>
+		<param-value>false</param-value>
+		<description>
+			THIS IS STUPID! We have to do this so that Tomcat webapps do not
+			leak their configurations into each other via the log4j support
+			trying to be "smart".
+			http://javacolors.blogspot.co.uk/2010/08/tomcat-and-webxmls-webapprootkey.html
+			If you change this, good luck hunting down the weird crashes.
+		</description>
+	</context-param>
+
+	<filter>
+		<filter-name>springSecurityFilterChain</filter-name>
+		<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
+	</filter>
+	<filter-mapping>
+		<filter-name>springSecurityFilterChain</filter-name>
+		<url-pattern>/*</url-pattern>
+	</filter-mapping>
+	<listener>
+		<listener-class>
+			org.springframework.web.context.request.RequestContextListener
+		</listener-class>
+	</listener>
+	<listener>
+		<listener-class>
+			org.springframework.web.util.Log4jConfigListener
+		</listener-class>
+	</listener>
+	<listener>
+		<listener-class>
+			org.springframework.web.context.ContextLoaderListener
+		</listener-class>
+	</listener>
+
+	<servlet>
+		<servlet-name>CXFServlet</servlet-name>
+		<display-name>CXF Servlet</display-name>
+		<servlet-class>
+			org.apache.cxf.transport.servlet.CXFServlet
+		</servlet-class>
+		<load-on-startup>1</load-on-startup>
+	</servlet>
+
+	<servlet-mapping>
+		<servlet-name>CXFServlet</servlet-name>
+		<url-pattern>/*</url-pattern>
+	</servlet-mapping>
+
+	<resource-ref>
+		<description>
+			Resource reference to a factory for javax.mail.Session
+			instances that may be used for sending electronic mail
+			messages, preconfigured to connect to the appropriate
+			SMTP server.
+		</description>
+		<res-ref-name>mail/Session</res-ref-name>
+		<res-type>javax.mail.Session</res-type>
+		<res-auth>Container</res-auth>
+		<res-sharing-scope>Shareable</res-sharing-scope>
+	</resource-ref>
+</web-app>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0b6e8e85/server-webapp/src/main/webapp/WEB-INF/web-sec.xml
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/webapp/WEB-INF/web-sec.xml b/server-webapp/src/main/webapp/WEB-INF/web-sec.xml
new file mode 100644
index 0000000..9a5395a
--- /dev/null
+++ b/server-webapp/src/main/webapp/WEB-INF/web-sec.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE web-app
+    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+    "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<!-- Copyright (C) 2010-2011 The University of Manchester See the file "LICENSE" 
+	for license terms. -->
+<web-app id="TAVSERV-2.5.4">
+	<display-name>Taverna 2.5.4 Server</display-name>
+	<description>This is the front-end engine for Taverna 2.5.4 Server.</description>
+	<context-param>
+		<param-name>contextConfigLocation</param-name>
+		<param-value>WEB-INF/secure.xml</param-value>
+		<description>Where Spring is to load its bean definitions from. DO NOT
+			CHANGE WITHOUT CONSULTING DOCUMENTATION.</description>
+	</context-param>
+	<context-param>
+		<param-name>log4jExposeWebAppRoot</param-name>
+		<param-value>false</param-value>
+		<description>
+			THIS IS STUPID! We have to do this so that Tomcat webapps do not
+			leak their configurations into each other via the log4j support
+			trying to be "smart".
+			http://javacolors.blogspot.co.uk/2010/08/tomcat-and-webxmls-webapprootkey.html
+			If you change this, good luck hunting down the weird crashes.
+		</description>
+	</context-param>
+
+	<filter>
+		<filter-name>springSecurityFilterChain</filter-name>
+		<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
+	</filter>
+	<filter-mapping>
+		<filter-name>springSecurityFilterChain</filter-name>
+		<url-pattern>/*</url-pattern>
+	</filter-mapping>
+	<listener>
+		<listener-class>
+			org.springframework.web.context.request.RequestContextListener
+		</listener-class>
+	</listener>
+	<listener>
+		<listener-class>
+			org.springframework.web.util.Log4jConfigListener
+		</listener-class>
+	</listener>
+	<listener>
+		<listener-class>
+			org.springframework.web.context.ContextLoaderListener
+		</listener-class>
+	</listener>
+
+	<servlet>
+		<servlet-name>CXFServlet</servlet-name>
+		<display-name>CXF Servlet</display-name>
+		<servlet-class>
+			org.apache.cxf.transport.servlet.CXFServlet
+		</servlet-class>
+		<load-on-startup>1</load-on-startup>
+	</servlet>
+
+	<servlet-mapping>
+		<servlet-name>CXFServlet</servlet-name>
+		<url-pattern>/*</url-pattern>
+	</servlet-mapping>
+
+	<resource-ref>
+		<description>
+			Resource reference to a factory for javax.mail.Session
+			instances that may be used for sending electronic mail
+			messages, preconfigured to connect to the appropriate
+			SMTP server.
+		</description>
+		<res-ref-name>mail/Session</res-ref-name>
+		<res-type>javax.mail.Session</res-type>
+		<res-auth>Container</res-auth>
+		<res-sharing-scope>Shareable</res-sharing-scope>
+	</resource-ref>
+</web-app>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0b6e8e85/server-webapp/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/webapp/WEB-INF/web.xml b/server-webapp/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 335a5d3..0000000
--- a/server-webapp/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE web-app
-    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
-    "http://java.sun.com/dtd/web-app_2_3.dtd">
-
-<!-- Copyright (C) 2010-2011 The University of Manchester See the file "LICENSE" 
-	for license terms. -->
-<web-app id="TAVSERV-2.5.4">
-	<display-name>Taverna 2.5.4 Server</display-name>
-	<description>This is the front-end engine for Taverna 2.5.4 Server.</description>
-	<context-param>
-		<param-name>contextConfigLocation</param-name>
-		<param-value>WEB-INF/secure.xml</param-value>
-		<!-- <param-value>WEB-INF/insecure.xml</param-value> -->
-		<description>Where Spring is to load its bean definitions from. DO NOT
-			CHANGE WITHOUT CONSULTING DOCUMENTATION.</description>
-	</context-param>
-	<context-param>
-		<param-name>log4jExposeWebAppRoot</param-name>
-		<param-value>false</param-value>
-		<description>
-			THIS IS STUPID! We have to do this so that Tomcat webapps do not
-			leak their configurations into each other via the log4j support
-			trying to be "smart".
-			http://javacolors.blogspot.co.uk/2010/08/tomcat-and-webxmls-webapprootkey.html
-			If you change this, good luck hunting down the weird crashes.
-		</description>
-	</context-param>
-
-	<filter>
-		<filter-name>springSecurityFilterChain</filter-name>
-		<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
-	</filter>
-	<filter-mapping>
-		<filter-name>springSecurityFilterChain</filter-name>
-		<url-pattern>/*</url-pattern>
-	</filter-mapping>
-	<listener>
-		<listener-class>
-			org.springframework.web.context.request.RequestContextListener
-		</listener-class>
-	</listener>
-	<listener>
-		<listener-class>
-			org.springframework.web.util.Log4jConfigListener
-		</listener-class>
-	</listener>
-	<listener>
-		<listener-class>
-			org.springframework.web.context.ContextLoaderListener
-		</listener-class>
-	</listener>
-
-	<servlet>
-		<servlet-name>CXFServlet</servlet-name>
-		<display-name>CXF Servlet</display-name>
-		<servlet-class>
-			org.apache.cxf.transport.servlet.CXFServlet
-		</servlet-class>
-		<load-on-startup>1</load-on-startup>
-	</servlet>
-
-	<servlet-mapping>
-		<servlet-name>CXFServlet</servlet-name>
-		<url-pattern>/*</url-pattern>
-	</servlet-mapping>
-
-	<resource-ref>
-		<description>
-			Resource reference to a factory for javax.mail.Session
-			instances that may be used for sending electronic mail
-			messages, preconfigured to connect to the appropriate
-			SMTP server.
-		</description>
-		<res-ref-name>mail/Session</res-ref-name>
-		<res-type>javax.mail.Session</res-type>
-		<res-auth>Container</res-auth>
-		<res-sharing-scope>Shareable</res-sharing-scope>
-	</resource-ref>
-</web-app>


[50/50] [abbrv] incubator-taverna-server git commit: [TAVSERV-340] Ensure that the added options are applied here too.

Posted by st...@apache.org.
[TAVSERV-340] Ensure that the added options are applied here too.

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/07d2ba42
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/07d2ba42
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/07d2ba42

Branch: refs/heads/master
Commit: 07d2ba426af667bda3b841b2c89de08b59e9f378
Parents: f03ad0e
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Thu Sep 4 14:26:36 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Thu Sep 4 14:26:36 2014 +0100

----------------------------------------------------------------------
 server-webapp/src/main/replacementscripts/executeworkflow.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/07d2ba42/server-webapp/src/main/replacementscripts/executeworkflow.sh
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/replacementscripts/executeworkflow.sh b/server-webapp/src/main/replacementscripts/executeworkflow.sh
index 10d73b2..e9e1d36 100644
--- a/server-webapp/src/main/replacementscripts/executeworkflow.sh
+++ b/server-webapp/src/main/replacementscripts/executeworkflow.sh
@@ -66,6 +66,7 @@ exec "$javabin" $memlimit $permsize \
   "-Dlog4j.configuration=file://$taverna_home/conf/log4j.properties " \
   "-Djava.util.logging.config.file=$taverna_home/conf/logging.properties " \
   "-Dtaverna.app.startup=$taverna_home" -Dtaverna.interaction.ignore_requests=true \
-  $APPHOME_PROP $RUNID_PROP $INTERACTION_PROPS -Djava.awt.headless=true $pre \
+  $APPHOME_PROP $RUNID_PROP $INTERACTION_PROPS -Djava.awt.headless=true \
+  -Dcom.sun.net.ssl.enableECC=false -Djsse.enableSNIExtension=false $pre \
   -jar "$taverna_home/lib/taverna-command-line-0.1.1.jar" \
   ${1+"$@"}


[05/50] [abbrv] incubator-taverna-server git commit: Use Java 7 idioms.

Posted by st...@apache.org.
Use Java 7 idioms.

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/867242f6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/867242f6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/867242f6

Branch: refs/heads/master
Commit: 867242f6225d2d79c22514d6cde89eab22238136
Parents: ef0aeb0
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Fri Mar 28 14:02:35 2014 +0000
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Fri Mar 28 14:02:35 2014 +0000

----------------------------------------------------------------------
 .../port_description/InputDescription.java      |   2 +-
 .../server/port_description/ListValue.java      |   2 +-
 .../port_description/OutputDescription.java     |   2 +-
 .../org/taverna/server/rmidaemon/Registry.java  |  32 ++--
 .../remote/RemoteSecurityContext.java           |  13 +-
 .../org/taverna/server/unixforker/Forker.java   |   9 +-
 .../master/ContentsDescriptorBuilder.java       |  13 +-
 .../taverna/server/master/DirectoryREST.java    |   8 +-
 .../server/master/FileConcatenation.java        |   6 +-
 .../org/taverna/server/master/InputREST.java    |   2 +-
 .../taverna/server/master/ListenersREST.java    |   2 +-
 .../taverna/server/master/TavernaServer.java    |  31 ++--
 .../server/master/TavernaServerSupport.java     |  18 +--
 .../org/taverna/server/master/admin/Admin.java  |   4 +-
 .../taverna/server/master/admin/AdminBean.java  |   2 +-
 .../server/master/common/InputDescription.java  |   2 +-
 .../server/master/common/VersionedElement.java  |  14 +-
 .../taverna/server/master/common/Workflow.java  |  17 +-
 .../identity/StrippedDownAuthProvider.java      |   2 +-
 .../taverna/server/master/identity/User.java    |   2 +-
 .../server/master/identity/UserStore.java       |   8 +-
 .../identity/WorkflowInternalAuthProvider.java  |   6 +-
 .../interaction/InteractionFeedSupport.java     |   4 +-
 .../localworker/AbstractRemoteRunFactory.java   |  18 +--
 .../master/localworker/ForkRunFactory.java      |   8 +-
 .../localworker/IdAwareForkRunFactory.java      |  17 +-
 .../master/localworker/PersistedState.java      |   4 +-
 .../master/notification/NotificationEngine.java |   6 +-
 .../notification/RateLimitedDispatcher.java     |   2 +-
 .../master/notification/SMSDispatcher.java      |  12 +-
 .../master/notification/atom/EventDAO.java      |   6 +-
 .../server/master/rest/DirectoryContents.java   |   4 +-
 .../master/rest/TavernaServerInputREST.java     |   2 +-
 .../master/rest/TavernaServerListenersREST.java |  10 +-
 .../server/master/rest/TavernaServerREST.java   |  16 +-
 .../master/rest/TavernaServerRunREST.java       |   4 +-
 .../master/rest/TavernaServerSecurityREST.java  |   9 +-
 .../master/rest/handler/EntryHandler.java       |  22 ++-
 .../master/rest/handler/URIListHandler.java     |   2 +-
 .../server/master/soap/FileContents.java        |   5 +-
 .../master/usage/UsageRecordRecorder.java       |   7 +-
 .../server/master/utils/CapabilityLister.java   |  11 +-
 .../master/utils/CertificateChainFetcher.java   |  10 +-
 .../taverna/server/master/utils/X500Utils.java  |   5 +-
 .../server/master/worker/RemoteRunDelegate.java |  29 ++--
 .../server/master/worker/RunConnection.java     |   8 +-
 .../server/master/worker/RunDatabase.java       |  12 +-
 .../server/master/worker/RunDatabaseDAO.java    |  19 +--
 .../master/worker/SecurityContextDelegate.java  | 158 +++++++++----------
 .../master/WorkflowSerializationTest.java       |  15 +-
 .../taverna/server/master/mocks/ExampleRun.java |   4 +-
 .../taverna/server/master/mocks/MockPolicy.java |   2 +-
 .../master/mocks/SimpleListenerFactory.java     |   4 +-
 .../mocks/SimpleNonpersistentRunStore.java      |   9 +-
 .../localworker/impl/DirectoryDelegate.java     |   5 +-
 .../server/localworker/impl/FileDelegate.java   |  26 +--
 .../server/localworker/impl/LocalWorker.java    |  10 +-
 .../localworker/impl/TavernaRunManager.java     |   6 +-
 .../server/localworker/impl/WorkerCore.java     |  15 +-
 .../localworker/impl/LocalWorkerTest.java       |   9 +-
 60 files changed, 314 insertions(+), 398 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-port-description/src/main/java/org/taverna/server/port_description/InputDescription.java
----------------------------------------------------------------------
diff --git a/server-port-description/src/main/java/org/taverna/server/port_description/InputDescription.java b/server-port-description/src/main/java/org/taverna/server/port_description/InputDescription.java
index 3064930..60b9353 100644
--- a/server-port-description/src/main/java/org/taverna/server/port_description/InputDescription.java
+++ b/server-port-description/src/main/java/org/taverna/server/port_description/InputDescription.java
@@ -26,7 +26,7 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement
 public class InputDescription extends AbstractPortDescription {
 	@XmlElement
-	public List<InputPort> input = new ArrayList<InputPort>();
+	public List<InputPort> input = new ArrayList<>();
 
 	@XmlType(name = "InputPort")
 	public static class InputPort extends AbstractPort {

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-port-description/src/main/java/org/taverna/server/port_description/ListValue.java
----------------------------------------------------------------------
diff --git a/server-port-description/src/main/java/org/taverna/server/port_description/ListValue.java b/server-port-description/src/main/java/org/taverna/server/port_description/ListValue.java
index 094ab03..b14cdf1 100644
--- a/server-port-description/src/main/java/org/taverna/server/port_description/ListValue.java
+++ b/server-port-description/src/main/java/org/taverna/server/port_description/ListValue.java
@@ -28,5 +28,5 @@ public class ListValue extends AbstractValue {
 			@XmlElement(name = "list", type = ListValue.class, nillable = false),
 			@XmlElement(name = "error", type = ErrorValue.class, nillable = false),
 			@XmlElement(name = "absent", type = AbsentValue.class, nillable = false) })
-	public List<AbstractValue> contents = new ArrayList<AbstractValue>();
+	public List<AbstractValue> contents = new ArrayList<>();
 }

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-port-description/src/main/java/org/taverna/server/port_description/OutputDescription.java
----------------------------------------------------------------------
diff --git a/server-port-description/src/main/java/org/taverna/server/port_description/OutputDescription.java b/server-port-description/src/main/java/org/taverna/server/port_description/OutputDescription.java
index 21fe03f..0b94973 100644
--- a/server-port-description/src/main/java/org/taverna/server/port_description/OutputDescription.java
+++ b/server-port-description/src/main/java/org/taverna/server/port_description/OutputDescription.java
@@ -23,7 +23,7 @@ import javax.xml.bind.annotation.XmlType;
 public class OutputDescription extends AbstractPortDescription {
 	private static final AbsentValue ABSENT_VALUE = new AbsentValue();
 	@XmlElement(name = "output")
-	public List<OutputPort> ports = new ArrayList<OutputPort>();
+	public List<OutputPort> ports = new ArrayList<>();
 
 	@XmlType(name = "OutputPort")
 	public static class OutputPort extends AbstractPort {

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-rmidaemon/src/main/java/org/taverna/server/rmidaemon/Registry.java
----------------------------------------------------------------------
diff --git a/server-rmidaemon/src/main/java/org/taverna/server/rmidaemon/Registry.java b/server-rmidaemon/src/main/java/org/taverna/server/rmidaemon/Registry.java
index 19fdc3b..4be7579 100644
--- a/server-rmidaemon/src/main/java/org/taverna/server/rmidaemon/Registry.java
+++ b/server-rmidaemon/src/main/java/org/taverna/server/rmidaemon/Registry.java
@@ -44,9 +44,9 @@ public class Registry {
 		}
 		try {
 			Object registryHandle = makeRegistry();
-			ObjectOutputStream oos = new ObjectOutputStream(System.out);
-			oos.writeObject(registryHandle);
-			oos.close();
+			try (ObjectOutputStream oos = new ObjectOutputStream(System.out)) {
+				oos.writeObject(registryHandle);
+			}
 		} catch (Exception e) {
 			System.err.println("problem creating registry: " + e.getMessage());
 			System.exit(1);
@@ -56,19 +56,17 @@ public class Registry {
 	private static int port = REGISTRY_PORT;
 	private static boolean localhostOnly = false;
 
-	private static MarshalledObject<Object> makeRegistry() throws IOException {
-		if (localhostOnly) {
-			setProperty("java.rmi.server.hostname", "127.0.0.1");
-			return new MarshalledObject<Object>(createRegistry(port,
-					getDefaultSocketFactory(), new RMIServerSocketFactory() {
-						@Override
-						public ServerSocket createServerSocket(int port)
-								throws IOException {
-							return new ServerSocket(port, 0, getLocalHost());
-						}
-					}));
-		} else {
-			return new MarshalledObject<Object>(createRegistry(port));
-		}
+	private static MarshalledObject<java.rmi.registry.Registry> makeRegistry() throws IOException {
+		if (!localhostOnly)
+			return new MarshalledObject<>(createRegistry(port));
+		setProperty("java.rmi.server.hostname", "127.0.0.1");
+		return new MarshalledObject<>(createRegistry(port,
+				getDefaultSocketFactory(), new RMIServerSocketFactory() {
+					@Override
+					public ServerSocket createServerSocket(int port)
+							throws IOException {
+						return new ServerSocket(port, 0, getLocalHost());
+					}
+				}));
 	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteSecurityContext.java
----------------------------------------------------------------------
diff --git a/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteSecurityContext.java b/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteSecurityContext.java
index b5a8849..dac84ca 100644
--- a/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteSecurityContext.java
+++ b/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteSecurityContext.java
@@ -8,7 +8,7 @@ package org.taverna.server.localworker.remote;
 import java.net.URI;
 import java.rmi.Remote;
 import java.rmi.RemoteException;
-import java.util.HashMap;
+import java.util.Map;
 
 import edu.umd.cs.findbugs.annotations.NonNull;
 
@@ -18,13 +18,16 @@ import edu.umd.cs.findbugs.annotations.NonNull;
  * @author Donal Fellows
  */
 public interface RemoteSecurityContext extends Remote {
-	void setKeystore(@NonNull byte[] keystore) throws RemoteException, ImplementationException;
+	void setKeystore(@NonNull byte[] keystore) throws RemoteException,
+			ImplementationException;
 
-	void setPassword(@NonNull char[] password) throws RemoteException, ImplementationException;
+	void setPassword(@NonNull char[] password) throws RemoteException,
+			ImplementationException;
 
-	void setTruststore(@NonNull byte[] truststore) throws RemoteException, ImplementationException;
+	void setTruststore(@NonNull byte[] truststore) throws RemoteException,
+			ImplementationException;
 
-	void setUriToAliasMap(@NonNull HashMap<URI, String> uriToAliasMap)
+	void setUriToAliasMap(@NonNull Map<URI, String> uriToAliasMap)
 			throws RemoteException;
 
 	void setHelioToken(@NonNull String helioToken) throws RemoteException;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-unix-forker/src/main/java/org/taverna/server/unixforker/Forker.java
----------------------------------------------------------------------
diff --git a/server-unix-forker/src/main/java/org/taverna/server/unixforker/Forker.java b/server-unix-forker/src/main/java/org/taverna/server/unixforker/Forker.java
index 439c1f0..5319a9e 100644
--- a/server-unix-forker/src/main/java/org/taverna/server/unixforker/Forker.java
+++ b/server-unix-forker/src/main/java/org/taverna/server/unixforker/Forker.java
@@ -45,18 +45,15 @@ public class Forker extends Thread {
 	 */
 	private static void loadPassword(@NonNull File passwordFile)
 			throws IOException {
-		FileReader fr = null;
 		try {
 			err.println("attempting to load password from " + passwordFile);
-			fr = new FileReader(passwordFile);
-			password = new BufferedReader(fr).readLine();
+			try (FileReader fr = new FileReader(passwordFile)) {
+				password = new BufferedReader(fr).readLine();
+			}
 		} catch (IOException e) {
 			err.println("failed to read password from file " + passwordFile
 					+ "described in password.file property");
 			throw e;
-		} finally {
-			if (fr != null)
-				fr.close();
 		}
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/ContentsDescriptorBuilder.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/ContentsDescriptorBuilder.java b/server-webapp/src/main/java/org/taverna/server/master/ContentsDescriptorBuilder.java
index 7955259..f778e3a 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/ContentsDescriptorBuilder.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/ContentsDescriptorBuilder.java
@@ -19,6 +19,7 @@ import java.util.Collection;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Set;
 
 import javax.ws.rs.core.UriBuilder;
 import javax.ws.rs.core.UriInfo;
@@ -89,7 +90,7 @@ public class ContentsDescriptorBuilder {
 
 	private List<Element> inputPorts(Element dataflow)
 			throws XPathExpressionException {
-		List<Element> result = new ArrayList<Element>();
+		List<Element> result = new ArrayList<>();
 		if (dataflow == null)
 			return result;
 		NodeList nl = (NodeList) inputPorts.evaluate(dataflow, NODESET);
@@ -101,7 +102,7 @@ public class ContentsDescriptorBuilder {
 
 	private List<Element> outputPorts(Element dataflow)
 			throws XPathExpressionException {
-		List<Element> result = new ArrayList<Element>();
+		List<Element> result = new ArrayList<>();
 		if (dataflow == null)
 			return result;
 		NodeList nl = (NodeList) outputPorts.evaluate(dataflow, NODESET);
@@ -164,10 +165,7 @@ public class ContentsDescriptorBuilder {
 		Collection<DirectoryEntry> outs = null;
 		try {
 			outs = fileUtils.getDirectory(run, "out").getContents();
-		} catch (FilesystemAccessException e) {
-			log.warn("unexpected failure in construction of output descriptor",
-					e);
-		} catch (NoDirectoryEntryException e) {
+		} catch (FilesystemAccessException | NoDirectoryEntryException e) {
 			log.warn("unexpected failure in construction of output descriptor",
 					e);
 		}
@@ -258,8 +256,7 @@ public class ContentsDescriptorBuilder {
 			throws FilesystemAccessException {
 		ListValue v = new ListValue();
 		v.length = 0;
-		HashSet<DirectoryEntry> contents = new HashSet<DirectoryEntry>(
-				dir.getContents());
+		Set<DirectoryEntry> contents = new HashSet<>(dir.getContents());
 		Iterator<DirectoryEntry> it = contents.iterator();
 		while (it.hasNext())
 			if (!it.next().getName().matches("^[0-9]+([.].*)?$"))

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/DirectoryREST.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/DirectoryREST.java b/server-webapp/src/main/java/org/taverna/server/master/DirectoryREST.java
index c7179b3..3284e57 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/DirectoryREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/DirectoryREST.java
@@ -174,7 +174,7 @@ class DirectoryREST implements TavernaServerDirectoryREST, DirectoryBean {
 		else if (!(de instanceof File))
 			throw new FilesystemAccessException("not a directory or file!");
 		File f = (File) de;
-		List<Variant> variants = new ArrayList<Variant>(INITIAL_FILE_VARIANTS);
+		List<Variant> variants = new ArrayList<>(INITIAL_FILE_VARIANTS);
 		String contentType = support.getEstimatedContentType(f);
 		if (!contentType.equals(APPLICATION_OCTET_STREAM)) {
 			String[] ct = contentType.split("/");
@@ -288,7 +288,7 @@ class DirectoryREST implements TavernaServerDirectoryREST, DirectoryBean {
 			throw new FilesystemAccessException(
 					"Cannot create a file that is not in a directory.");
 
-		List<PathSegment> dirPath = new ArrayList<PathSegment>(filePath);
+		List<PathSegment> dirPath = new ArrayList<>(filePath);
 		String name = dirPath.remove(dirPath.size() - 1).getPath();
 		DirectoryEntry de = fileUtils.getDirEntry(run, dirPath);
 		if (!(de instanceof Directory)) {
@@ -324,7 +324,7 @@ class DirectoryREST implements TavernaServerDirectoryREST, DirectoryBean {
 	public Response setFileContents(List<PathSegment> filePath,
 			InputStream contents, UriInfo ui) throws NoDirectoryEntryException,
 			NoUpdateException, FilesystemAccessException {
-		Holder<Boolean> isNew = new Holder<Boolean>(true);
+		Holder<Boolean> isNew = new Holder<>(true);
 		support.copyStreamToFile(contents, getFileForWrite(filePath, isNew));
 
 		if (isNew.value)
@@ -351,7 +351,7 @@ class DirectoryREST implements TavernaServerDirectoryREST, DirectoryBean {
 			return status(422).entity("URI list must have value URL in it")
 					.build();
 		}
-		Holder<Boolean> isNew = new Holder<Boolean>(true);
+		Holder<Boolean> isNew = new Holder<>(true);
 		File f = getFileForWrite(filePath, isNew);
 
 		try {

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/FileConcatenation.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/FileConcatenation.java b/server-webapp/src/main/java/org/taverna/server/master/FileConcatenation.java
index 2f37c28..3893b3d 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/FileConcatenation.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/FileConcatenation.java
@@ -16,7 +16,7 @@ import org.taverna.server.master.interfaces.File;
  * @author Donal Fellows
  */
 public class FileConcatenation implements Iterable<File> {
-	private List<File> files = new ArrayList<File>();
+	private List<File> files = new ArrayList<>();
 
 	public void add(File f) {
 		files.add(f);
@@ -55,9 +55,7 @@ public class FileConcatenation implements Iterable<File> {
 		for (File f : files)
 			try {
 				baos.write(f.getContents(0, -1));
-			} catch (FilesystemAccessException e) {
-				continue;
-			} catch (IOException e) {
+			} catch (FilesystemAccessException | IOException e) {
 				continue;
 			}
 		return baos.toString(encoding);

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/InputREST.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/InputREST.java b/server-webapp/src/main/java/org/taverna/server/master/InputREST.java
index a1a7387..4506cf5 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/InputREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/InputREST.java
@@ -152,7 +152,7 @@ class InputREST implements TavernaServerInputREST, InputBean {
 			BadPropertyValueException, FilesystemAccessException {
 		URITemplate tmpl = new URITemplate(ui.getBaseUri()
 				+ "/runs/{runName}/wd/{path:.+}");
-		MultivaluedMap<String, String> mvm = new MetadataMap<String, String>();
+		MultivaluedMap<String, String> mvm = new MetadataMap<>();
 		if (!tmpl.match(ref.contents, mvm)) {
 			throw new BadPropertyValueException(
 					"URI in reference does not refer to local disk resource");

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/ListenersREST.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/ListenersREST.java b/server-webapp/src/main/java/org/taverna/server/master/ListenersREST.java
index a501d65..1d7b89a 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/ListenersREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/ListenersREST.java
@@ -78,7 +78,7 @@ abstract class ListenersREST implements TavernaServerListenersREST,
 	@CallCounted
 	@PerfLogged
 	public Listeners getDescription(UriInfo ui) {
-		List<ListenerDescription> result = new ArrayList<ListenerDescription>();
+		List<ListenerDescription> result = new ArrayList<>();
 		UriBuilder ub = secure(ui).path("{name}");
 		for (Listener l : run.getListeners())
 			result.add(new ListenerDescription(l,

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java b/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java
index 27e4255..ddca85c 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java
@@ -239,7 +239,7 @@ public abstract class TavernaServer implements TavernaServerSOAP,
 	@CallCounted
 	@PerfLogged
 	public ServerDescription describeService(UriInfo ui) {
-		jaxrsUriInfo.set(new WeakReference<UriInfo>(ui));
+		jaxrsUriInfo.set(new WeakReference<>(ui));
 		return new ServerDescription(ui, resolve(interactionFeed));
 	}
 
@@ -248,7 +248,7 @@ public abstract class TavernaServer implements TavernaServerSOAP,
 	@PerfLogged
 	@RolesAllowed(USER)
 	public RunList listUsersRuns(UriInfo ui) {
-		jaxrsUriInfo.set(new WeakReference<UriInfo>(ui));
+		jaxrsUriInfo.set(new WeakReference<>(ui));
 		return new RunList(runs(), secure(ui).path("{name}"));
 	}
 
@@ -258,7 +258,7 @@ public abstract class TavernaServer implements TavernaServerSOAP,
 	@RolesAllowed(USER)
 	public Response submitWorkflow(Workflow workflow, UriInfo ui)
 			throws NoUpdateException {
-		jaxrsUriInfo.set(new WeakReference<UriInfo>(ui));
+		jaxrsUriInfo.set(new WeakReference<>(ui));
 		checkCreatePolicy(workflow);
 		String name = support.buildWorkflow(workflow);
 		return created(secure(ui).path("{uuid}").build(name)).build();
@@ -270,7 +270,7 @@ public abstract class TavernaServer implements TavernaServerSOAP,
 	@RolesAllowed(USER)
 	public Response submitWorkflowByURL(List<URI> referenceList, UriInfo ui)
 			throws NoCreateException {
-		jaxrsUriInfo.set(new WeakReference<UriInfo>(ui));
+		jaxrsUriInfo.set(new WeakReference<>(ui));
 		if (referenceList == null || referenceList.size() == 0)
 			throw new NoCreateException("no workflow URI supplied");
 		URI workflowURI = referenceList.get(0);
@@ -298,14 +298,14 @@ public abstract class TavernaServer implements TavernaServerSOAP,
 	@RolesAllowed({ USER, SELF })
 	public TavernaServerRunREST getRunResource(String runName, UriInfo ui)
 			throws UnknownRunException {
-		jaxrsUriInfo.set(new WeakReference<UriInfo>(ui));
+		jaxrsUriInfo.set(new WeakReference<>(ui));
 		RunREST rr = makeRunInterface();
 		rr.setRun(support.getRun(runName));
 		rr.setRunName(runName);
 		return rr;
 	}
 
-	private ThreadLocal<Reference<UriInfo>> jaxrsUriInfo = new InheritableThreadLocal<Reference<UriInfo>>();
+	private ThreadLocal<Reference<UriInfo>> jaxrsUriInfo = new InheritableThreadLocal<>();
 
 	private UriInfo getUriInfo() {
 		if (jaxrsUriInfo.get() == null)
@@ -344,7 +344,7 @@ public abstract class TavernaServer implements TavernaServerSOAP,
 	@PerfLogged
 	@RolesAllowed(USER)
 	public RunReference[] listRuns() {
-		ArrayList<RunReference> ws = new ArrayList<RunReference>();
+		ArrayList<RunReference> ws = new ArrayList<>();
 		UriBuilder ub = getRunUriBuilder();
 		for (String runName : runs().keySet())
 			ws.add(new RunReference(runName, ub));
@@ -531,12 +531,9 @@ public abstract class TavernaServer implements TavernaServerSOAP,
 				if (issue.isEmpty())
 					return "unknown reason for partial change";
 				return issue;
-			} catch (RuntimeException re) {
-				log.info("failed to start run " + runName, re);
-				throw re;
-			} catch (NoUpdateException nue) {
-				log.info("failed to start run " + runName, nue);
-				throw nue;
+			} catch (RuntimeException | NoUpdateException e) {
+				log.info("failed to start run " + runName, e);
+				throw e;
 			}
 		} else {
 			w.setStatus(s);
@@ -792,7 +789,7 @@ public abstract class TavernaServer implements TavernaServerSOAP,
 	public PermissionList listRunPermissions(String runName)
 			throws UnknownRunException, NotOwnerException {
 		PermissionList pl = new PermissionList();
-		pl.permission = new ArrayList<PermissionList.SinglePermissionMapping>();
+		pl.permission = new ArrayList<>();
 		Map<String, Permission> perm;
 		try {
 			perm = support.getPermissionMap(getRunSecurityContext(runName,
@@ -801,7 +798,7 @@ public abstract class TavernaServer implements TavernaServerSOAP,
 			log.error("unexpected error from internal API", e);
 			perm = emptyMap();
 		}
-		List<String> users = new ArrayList<String>(perm.keySet());
+		List<String> users = new ArrayList<>(perm.keySet());
 		sort(users);
 		for (String user : users)
 			pl.permission.add(new PermissionList.SinglePermissionMapping(user,
@@ -848,7 +845,7 @@ public abstract class TavernaServer implements TavernaServerSOAP,
 	public DirEntry[] getRunDirectoryContents(String runName, DirEntry d)
 			throws UnknownRunException, FilesystemAccessException,
 			NoDirectoryEntryException {
-		List<DirEntry> result = new ArrayList<DirEntry>();
+		List<DirEntry> result = new ArrayList<>();
 		for (DirectoryEntry e : fileUtils.getDirectory(support.getRun(runName),
 				convert(d)).getContents())
 			result.add(convert(newInstance(null, e)));
@@ -1013,7 +1010,7 @@ public abstract class TavernaServer implements TavernaServerSOAP,
 	@RolesAllowed(USER)
 	public String[] getRunListeners(String runName) throws UnknownRunException {
 		TavernaRun w = support.getRun(runName);
-		List<String> result = new ArrayList<String>();
+		List<String> result = new ArrayList<>();
 		for (Listener l : w.getListeners())
 			result.add(l.getName());
 		return result.toArray(new String[result.size()]);

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/TavernaServerSupport.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/TavernaServerSupport.java b/server-webapp/src/main/java/org/taverna/server/master/TavernaServerSupport.java
index 9b50081..4072e67 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/TavernaServerSupport.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/TavernaServerSupport.java
@@ -612,12 +612,12 @@ public class TavernaServerSupport {
 		permSet = context.getPermittedReaders();
 		if (doRead) {
 			if (!permSet.contains(userName)) {
-				permSet = new HashSet<String>(permSet);
+				permSet = new HashSet<>(permSet);
 				permSet.add(userName);
 				context.setPermittedReaders(permSet);
 			}
 		} else if (permSet.contains(userName)) {
-			permSet = new HashSet<String>(permSet);
+			permSet = new HashSet<>(permSet);
 			permSet.remove(userName);
 			context.setPermittedReaders(permSet);
 		}
@@ -625,12 +625,12 @@ public class TavernaServerSupport {
 		permSet = context.getPermittedUpdaters();
 		if (doWrite) {
 			if (!permSet.contains(userName)) {
-				permSet = new HashSet<String>(permSet);
+				permSet = new HashSet<>(permSet);
 				permSet.add(userName);
 				context.setPermittedUpdaters(permSet);
 			}
 		} else if (permSet.contains(userName)) {
-			permSet = new HashSet<String>(permSet);
+			permSet = new HashSet<>(permSet);
 			permSet.remove(userName);
 			context.setPermittedUpdaters(permSet);
 		}
@@ -638,12 +638,12 @@ public class TavernaServerSupport {
 		permSet = context.getPermittedDestroyers();
 		if (doKill) {
 			if (!permSet.contains(userName)) {
-				permSet = new HashSet<String>(permSet);
+				permSet = new HashSet<>(permSet);
 				permSet.add(userName);
 				context.setPermittedDestroyers(permSet);
 			}
 		} else if (permSet.contains(userName)) {
-			permSet = new HashSet<String>(permSet);
+			permSet = new HashSet<>(permSet);
 			permSet.remove(userName);
 			context.setPermittedDestroyers(permSet);
 		}
@@ -651,7 +651,7 @@ public class TavernaServerSupport {
 
 	public Map<String, Permission> getPermissionMap(
 			TavernaSecurityContext context) {
-		Map<String, Permission> perm = new HashMap<String, Permission>();
+		Map<String, Permission> perm = new HashMap<>();
 		for (String u : context.getPermittedReaders())
 			perm.put(u, Permission.Read);
 		for (String u : context.getPermittedUpdaters())
@@ -902,9 +902,7 @@ public class TavernaServerSupport {
 		for (String name : LOGS) {
 			try {
 				fc.add(fileUtils.getFile(run, name));
-			} catch (FilesystemAccessException e) {
-				// Ignore
-			} catch (NoDirectoryEntryException e) {
+			} catch (FilesystemAccessException | NoDirectoryEntryException e) {
 				// Ignore
 			}
 		}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/admin/Admin.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/admin/Admin.java b/server-webapp/src/main/java/org/taverna/server/master/admin/Admin.java
index d8539d1..c0cf0f9 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/admin/Admin.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/admin/Admin.java
@@ -1017,7 +1017,7 @@ public interface Admin {
 	@XmlType(name = "StringList")
 	public static class StringList {
 		@XmlElement
-		public List<String> string = new ArrayList<String>();
+		public List<String> string = new ArrayList<>();
 	}
 
 	/**
@@ -1029,7 +1029,7 @@ public interface Admin {
 	@XmlType(name = "UserList")
 	public static class UserList {
 		@XmlElement
-		public List<URI> user = new ArrayList<URI>();
+		public List<URI> user = new ArrayList<>();
 	}
 
 	@XmlRootElement(name = "userDesc")

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/admin/AdminBean.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/admin/AdminBean.java b/server-webapp/src/main/java/org/taverna/server/master/admin/AdminBean.java
index c91e783..b83d88f 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/admin/AdminBean.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/admin/AdminBean.java
@@ -753,7 +753,7 @@ public class AdminBean implements Admin {
 	@RolesAllowed(ADMIN)
 	@Override
 	public StringList setPermittedWorkflowURIs(StringList permitted) {
-		List<URI> uris = new ArrayList<URI>();
+		List<URI> uris = new ArrayList<>();
 		for (String uri : permitted.string)
 			try {
 				uris.add(myExp.resolve(uri));

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/common/InputDescription.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/common/InputDescription.java b/server-webapp/src/main/java/org/taverna/server/master/common/InputDescription.java
index 5e773a4..bb98d6d 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/common/InputDescription.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/common/InputDescription.java
@@ -35,7 +35,7 @@ public class InputDescription extends VersionedElement {
 	 * The port/value assignment.
 	 */
 	@XmlElement(nillable = false)
-	public List<Port> port = new ArrayList<Port>();
+	public List<Port> port = new ArrayList<>();
 
 	/**
 	 * Make a blank input description.

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/common/VersionedElement.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/common/VersionedElement.java b/server-webapp/src/main/java/org/taverna/server/master/common/VersionedElement.java
index 87d4a19..6eddf2d 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/common/VersionedElement.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/common/VersionedElement.java
@@ -38,19 +38,13 @@ public abstract class VersionedElement {
 	static {
 		Log log = getLog("Taverna.Server.Webapp");
 		Properties p = new Properties();
-		InputStream is = null;
 		try {
-			p.load(is = VersionedElement.class
-					.getResourceAsStream("/version.properties"));
+			try (InputStream is = VersionedElement.class
+					.getResourceAsStream("/version.properties")) {
+				p.load(is);
+			}
 		} catch (IOException e) {
 			log.warn("failed to read /version.properties", e);
-		} finally {
-			try {
-				if (is != null)
-					is.close();
-			} catch (IOException e) {
-				log.warn("failed to close channel", e);
-			}
 		}
 		VERSION = p.getProperty("tavernaserver.version", "unknownVersion");
 		REVISION = String.format("%s (tag: %s)",

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/common/Workflow.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/common/Workflow.java b/server-webapp/src/main/java/org/taverna/server/master/common/Workflow.java
index 6a8960f..9aa3669 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/common/Workflow.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/common/Workflow.java
@@ -88,11 +88,10 @@ public class Workflow implements Serializable,Externalizable {
 			int len = in.readInt();
 			byte[] bytes = new byte[len];
 			in.readFully(bytes);
-			Reader r = new InputStreamReader(new InflaterInputStream(
-					new ByteArrayInputStream(bytes)), ENCODING);
-			Workflow w = (Workflow) unmarshaller.unmarshal(r);
-			r.close();
-			this.content = w.content;
+			try (Reader r = new InputStreamReader(new InflaterInputStream(
+					new ByteArrayInputStream(bytes)), ENCODING)) {
+				this.content = ((Workflow) unmarshaller.unmarshal(r)).content;
+			}
 			return;
 		} catch (JAXBException e) {
 			throw new IOException("failed to unmarshal", e);
@@ -105,10 +104,10 @@ public class Workflow implements Serializable,Externalizable {
 	public void writeExternal(ObjectOutput out) throws IOException {
 		try {
 			ByteArrayOutputStream baos = new ByteArrayOutputStream();
-			OutputStreamWriter w = new OutputStreamWriter(
-					new DeflaterOutputStream(baos), ENCODING);
-			marshaller.marshal(this, w);
-			w.close();
+			try (OutputStreamWriter w = new OutputStreamWriter(
+					new DeflaterOutputStream(baos), ENCODING)) {
+				marshaller.marshal(this, w);
+			}
 			byte[] bytes = baos.toByteArray();
 			out.writeInt(bytes.length);
 			out.write(bytes);

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/identity/StrippedDownAuthProvider.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/identity/StrippedDownAuthProvider.java b/server-webapp/src/main/java/org/taverna/server/master/identity/StrippedDownAuthProvider.java
index fa2f818..06202dc 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/identity/StrippedDownAuthProvider.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/identity/StrippedDownAuthProvider.java
@@ -50,7 +50,7 @@ public class StrippedDownAuthProvider implements AuthenticationProvider {
 	private String userNotFoundEncodedPassword;
 	private UserDetailsService userDetailsService;
 	private PasswordEncoder passwordEncoder;
-	private Map<String, AuthCacheEntry> authCache = new HashMap<String, AuthCacheEntry>();
+	private Map<String, AuthCacheEntry> authCache = new HashMap<>();
 	protected final Log logger = LogFactory.getLog(getClass());
 
 	private static class AuthCacheEntry {

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/identity/User.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/identity/User.java b/server-webapp/src/main/java/org/taverna/server/master/identity/User.java
index d0334cb..bdb6e40 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/identity/User.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/identity/User.java
@@ -64,7 +64,7 @@ public class User implements UserDetails {
 
 	@Override
 	public Collection<GrantedAuthority> getAuthorities() {
-		List<GrantedAuthority> auths = new ArrayList<GrantedAuthority>();
+		List<GrantedAuthority> auths = new ArrayList<>();
 		auths.add(new LiteralGrantedAuthority(USER));
 		if (admin)
 			auths.add(new LiteralGrantedAuthority(ADMIN));

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/identity/UserStore.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/identity/UserStore.java b/server-webapp/src/main/java/org/taverna/server/master/identity/UserStore.java
index 7c759ff..fdd615b 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/identity/UserStore.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/identity/UserStore.java
@@ -61,7 +61,7 @@ public class UserStore extends JDOSupport<User> implements UserDetailsService,
 		log = null;
 	}
 
-	private Map<String, BootstrapUserInfo> base = new HashMap<String, BootstrapUserInfo>();
+	private Map<String, BootstrapUserInfo> base = new HashMap<>();
 	private String defLocalUser;
 	private PasswordEncoder encoder;
 	private volatile int epoch;
@@ -157,7 +157,7 @@ public class UserStore extends JDOSupport<User> implements UserDetailsService,
 	@ManagedOperationParameters(@ManagedOperationParameter(name = "userName", description = "The username to look up."))
 	public Map<String, String> getUserInfo(String userName) {
 		User u = getById(userName);
-		Map<String, String> info = new HashMap<String, String>();
+		Map<String, String> info = new HashMap<>();
 		info.put("name", u.getUsername());
 		info.put("admin", u.isAdmin() ? "yes" : "no");
 		info.put("enabled", u.isEnabled() ? "yes" : "no");
@@ -173,7 +173,7 @@ public class UserStore extends JDOSupport<User> implements UserDetailsService,
 	@PerfLogged
 	@WithinSingleTransaction
 	public List<UserDetails> listUsers() {
-		ArrayList<UserDetails> result = new ArrayList<UserDetails>();
+		ArrayList<UserDetails> result = new ArrayList<>();
 		for (String id : getUsers())
 			result.add(detach(getById(id)));
 		return result;
@@ -324,7 +324,7 @@ public class UserStore extends JDOSupport<User> implements UserDetailsService,
 
 	public static class CachedUserStore implements UserDetailsService {
 		private int epoch;
-		private Map<String, UserDetails> cache = new HashMap<String, UserDetails>();
+		private Map<String, UserDetails> cache = new HashMap<>();
 		private UserStore realStore;
 
 		@Required

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/identity/WorkflowInternalAuthProvider.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/identity/WorkflowInternalAuthProvider.java b/server-webapp/src/main/java/org/taverna/server/master/identity/WorkflowInternalAuthProvider.java
index 82db9d4..d81e692 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/identity/WorkflowInternalAuthProvider.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/identity/WorkflowInternalAuthProvider.java
@@ -78,7 +78,7 @@ public class WorkflowInternalAuthProvider extends
 	}
 
 	public void setAuthorizedAddresses(String[] addresses) {
-		authorizedAddresses = new HashSet<String>(localAddresses);
+		authorizedAddresses = new HashSet<>(localAddresses);
 		for (String s : addresses)
 			authorizedAddresses.add(s);
 	}
@@ -94,7 +94,7 @@ public class WorkflowInternalAuthProvider extends
 		log = null;
 	}
 
-	private final Set<String> localAddresses = new HashSet<String>();
+	private final Set<String> localAddresses = new HashSet<>();
 	private Set<String> authorizedAddresses;
 	{
 		localAddresses.add("127.0.0.1"); // IPv4
@@ -106,7 +106,7 @@ public class WorkflowInternalAuthProvider extends
 		} catch (UnknownHostException e) {
 			// Ignore the exception
 		}
-		authorizedAddresses = new HashSet<String>(localAddresses);
+		authorizedAddresses = new HashSet<>(localAddresses);
 	}
 
 	/**

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/interaction/InteractionFeedSupport.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/interaction/InteractionFeedSupport.java b/server-webapp/src/main/java/org/taverna/server/master/interaction/InteractionFeedSupport.java
index f055868..3a9808b 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/interaction/InteractionFeedSupport.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/interaction/InteractionFeedSupport.java
@@ -141,8 +141,8 @@ public class InteractionFeedSupport {
 
 	private List<DirectoryEntry> listPossibleEntries(TavernaRun run)
 			throws FilesystemAccessException, NoDirectoryEntryException {
-		List<DirectoryEntry> entries = new ArrayList<DirectoryEntry>(utils
-				.getDirectory(run, FEED_DIR).getContentsByDate());
+		List<DirectoryEntry> entries = new ArrayList<>(utils.getDirectory(run,
+				FEED_DIR).getContentsByDate());
 		reverse(entries);
 		return entries;
 	}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java b/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java
index 29d17cf..cc0a9fb 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java
@@ -157,14 +157,14 @@ public abstract class AbstractRemoteRunFactory extends RunFactoryConfiguration
 			} catch (IllegalThreadStateException ise) {
 				// Still running!
 			}
-			ObjectInputStream ois = new ObjectInputStream(proc.getInputStream());
-			@SuppressWarnings("unchecked")
-			java.rmi.MarshalledObject<Registry> handle = (MarshalledObject<Registry>) ois
-					.readObject();
-			ois.close();
-			Registry r = handle.get();
-			registryProcess = proc;
-			return r;
+			try (ObjectInputStream ois = new ObjectInputStream(
+					proc.getInputStream())) {
+				@SuppressWarnings("unchecked")
+				Registry r = ((MarshalledObject<Registry>) ois.readObject())
+						.get();
+				registryProcess = proc;
+				return r;
+			}
 		} catch (RemoteException e) {
 			throw e;
 		} catch (ClassNotFoundException e) {
@@ -313,7 +313,7 @@ public abstract class AbstractRemoteRunFactory extends RunFactoryConfiguration
 		} catch (Exception e) {
 			log.warn("failed to get list of listener types", e);
 		}
-		return new ArrayList<String>();
+		return new ArrayList<>();
 	}
 
 	@Override

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java b/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
index 2c19ec1..d2ec9a8 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
@@ -192,9 +192,7 @@ public class ForkRunFactory extends AbstractRemoteRunFactory implements
 		try {
 			// Validate registry connection first
 			getTheRegistry().list();
-		} catch (ConnectException ce) {
-			log.warn("connection problems with registry", ce);
-		} catch (ConnectIOException e) {
+		} catch (ConnectException | ConnectIOException e) {
 			log.warn("connection problems with registry", e);
 		}
 		RemoteRunFactory rrf = (RemoteRunFactory) getTheRegistry().lookup(name);
@@ -360,9 +358,7 @@ public class ForkRunFactory extends AbstractRemoteRunFactory implements
 			initFactory();
 			try {
 				return getRealRun(creator, wf, id);
-			} catch (ConnectException e) {
-				// factory was lost; try to recreate
-			} catch (ConnectIOException e) {
+			} catch (ConnectException | ConnectIOException e) {
 				// factory was lost; try to recreate
 			}
 			killFactory();

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java b/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
index fd6efc7..1564af3 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
@@ -73,8 +73,8 @@ public class IdAwareForkRunFactory extends AbstractRemoteRunFactory implements
 	 *             Shouldn't happen.
 	 */
 	public IdAwareForkRunFactory() throws JAXBException {
-		factory = new HashMap<String, RemoteRunFactory>();
-		factoryProcessName = new HashMap<String, String>();
+		factory = new HashMap<>();
+		factoryProcessName = new HashMap<>();
 	}
 
 	@Override
@@ -119,9 +119,8 @@ public class IdAwareForkRunFactory extends AbstractRemoteRunFactory implements
 	@Override
 	@ManagedAttribute(description = "The mapping of user names to RMI factory IDs.", currencyTimeLimit = 60)
 	public String[] getFactoryProcessMapping() {
-		ArrayList<String> result = new ArrayList<String>();
-		ArrayList<String> keys = new ArrayList<String>(
-				factoryProcessName.keySet());
+		ArrayList<String> result = new ArrayList<>();
+		ArrayList<String> keys = new ArrayList<>(factoryProcessName.keySet());
 		String[] ks = keys.toArray(new String[keys.size()]);
 		Arrays.sort(ks);
 		for (String k : ks) {
@@ -296,9 +295,7 @@ public class IdAwareForkRunFactory extends AbstractRemoteRunFactory implements
 				initFactory(username);
 			try {
 				return getRealRun(creator, username, wf, id);
-			} catch (ConnectException e) {
-				// factory was lost; try to recreate
-			} catch (ConnectIOException e) {
+			} catch (ConnectException | ConnectIOException e) {
 				// factory was lost; try to recreate
 			}
 			factory.remove(username);
@@ -509,9 +506,7 @@ class SecureFork implements IdAwareForkRunFactory.MetaFactory {
 	public RemoteRunFactory make(String username) throws Exception {
 		try {
 			main.getTheRegistry().list(); // Validate registry connection first
-		} catch (ConnectException e) {
-			log.warn("connection problems with registry", e);
-		} catch (ConnectIOException e) {
+		} catch (ConnectException | ConnectIOException e) {
 			log.warn("connection problems with registry", e);
 		} catch (RemoteException e) {
 			if (e.getCause() != null && e.getCause() instanceof Exception) {

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/localworker/PersistedState.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/localworker/PersistedState.java b/server-webapp/src/main/java/org/taverna/server/master/localworker/PersistedState.java
index 832dc51..83d6bda 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/localworker/PersistedState.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/localworker/PersistedState.java
@@ -220,8 +220,8 @@ class PersistedState implements WorkerModel {
 	public List<URI> getPermittedWorkflowURIs() {
 		String[] pw = this.permittedWorkflows;
 		if (pw == null)
-			return new ArrayList<URI>();
-		List<URI> uris = new ArrayList<URI>(pw.length);
+			return new ArrayList<>();
+		List<URI> uris = new ArrayList<>(pw.length);
 		for (String uri : pw)
 			uris.add(URI.create(uri));
 		return uris;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/notification/NotificationEngine.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/notification/NotificationEngine.java b/server-webapp/src/main/java/org/taverna/server/master/notification/NotificationEngine.java
index f5eeb54..bc0f60d 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/notification/NotificationEngine.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/notification/NotificationEngine.java
@@ -34,7 +34,7 @@ public class NotificationEngine {
 	 */
 	@Required
 	public void setDispatchers(List<MessageDispatcher> dispatchers) {
-		this.dispatchers = new HashMap<String, MessageDispatcher>();
+		this.dispatchers = new HashMap<>();
 		for (MessageDispatcher d : dispatchers)
 			this.dispatchers.put(d.getName(), d);
 	}
@@ -116,7 +116,7 @@ public class NotificationEngine {
 				URI toURI = new URI(destination.trim());
 				dispatchToChosenTarget(originator, toURI.getScheme(),
 						toURI.getSchemeSpecificPart(), message);
-			} catch (java.net.URISyntaxException e) {
+			} catch (URISyntaxException e) {
 				// Ignore
 			}
 		}
@@ -128,7 +128,7 @@ public class NotificationEngine {
 	 *         disabled by configuration somewhere).
 	 */
 	public List<String> listAvailableDispatchers() {
-		ArrayList<String> result = new ArrayList<String>();
+		ArrayList<String> result = new ArrayList<>();
 		for (Map.Entry<String, MessageDispatcher> entry : dispatchers
 				.entrySet()) {
 			if (entry.getValue().isAvailable())

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/notification/RateLimitedDispatcher.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/notification/RateLimitedDispatcher.java b/server-webapp/src/main/java/org/taverna/server/master/notification/RateLimitedDispatcher.java
index 704698a..c8d7ef6 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/notification/RateLimitedDispatcher.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/notification/RateLimitedDispatcher.java
@@ -24,7 +24,7 @@ public abstract class RateLimitedDispatcher implements MessageDispatcher {
 	/** Pre-configured logger. */
 	protected Log log = LogFactory.getLog("Taverna.Server.Notification");
 	private int cooldownSeconds;
-	private Map<String, DateTime> lastSend = new HashMap<String, DateTime>();
+	private Map<String, DateTime> lastSend = new HashMap<>();
 
 	String valid(String value, String def) {
 		if (value == null || value.trim().isEmpty()

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/notification/SMSDispatcher.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/notification/SMSDispatcher.java b/server-webapp/src/main/java/org/taverna/server/master/notification/SMSDispatcher.java
index b346c4b..5553141 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/notification/SMSDispatcher.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/notification/SMSDispatcher.java
@@ -136,7 +136,7 @@ public class SMSDispatcher extends RateLimitedDispatcher {
 			return;
 
 		// Build the message to send
-		List<NameValuePair> params = new ArrayList<NameValuePair>();
+		List<NameValuePair> params = new ArrayList<>();
 		params.add(new BasicNameValuePair(usernameField, user));
 		params.add(new BasicNameValuePair(passwordField, pass));
 		params.add(new BasicNameValuePair(destinationField, targetParameter));
@@ -149,14 +149,10 @@ public class SMSDispatcher extends RateLimitedDispatcher {
 
 		// Log the response
 		HttpEntity entity = response.getEntity();
-		if (entity != null) {
-			BufferedReader e = new BufferedReader(new InputStreamReader(
-					entity.getContent()));
-			try {
+		if (entity != null)
+			try (BufferedReader e = new BufferedReader(new InputStreamReader(
+					entity.getContent()))) {
 				log.info(e.readLine());
-			} finally {
-				e.close();
 			}
-		}
 	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/notification/atom/EventDAO.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/notification/atom/EventDAO.java b/server-webapp/src/main/java/org/taverna/server/master/notification/atom/EventDAO.java
index 19638f2..eec44f7 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/notification/atom/EventDAO.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/notification/atom/EventDAO.java
@@ -72,7 +72,7 @@ public class EventDAO extends JDOSupport<Event> implements MessageDispatcher {
 		if (log.isDebugEnabled())
 			log.debug("found " + ids.size() + " events for user " + user);
 
-		List<Event> result = new ArrayList<Event>();
+		List<Event> result = new ArrayList<>();
 		for (String id : ids) {
 			Event event = getById(id);
 			result.add(detach(event));
@@ -139,7 +139,7 @@ public class EventDAO extends JDOSupport<Event> implements MessageDispatcher {
 		return true;
 	}
 
-	private BlockingQueue<Event> insertQueue = new ArrayBlockingQueue<Event>(16);
+	private BlockingQueue<Event> insertQueue = new ArrayBlockingQueue<>(16);
 
 	@Override
 	public void dispatch(TavernaRun originator, String messageSubject,
@@ -163,7 +163,7 @@ public class EventDAO extends JDOSupport<Event> implements MessageDispatcher {
 			public void run() {
 				try {
 					while (true) {
-						ArrayList<Event> e = new ArrayList<Event>();
+						ArrayList<Event> e = new ArrayList<>();
 						e.add(insertQueue.take());
 						insertQueue.drainTo(e);
 						dao.storeEvents(e);

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/rest/DirectoryContents.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/rest/DirectoryContents.java b/server-webapp/src/main/java/org/taverna/server/master/rest/DirectoryContents.java
index 93e84e7..e01d1c4 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/rest/DirectoryContents.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/rest/DirectoryContents.java
@@ -41,7 +41,7 @@ public class DirectoryContents {
 	 * Make an empty directory description. Required for JAXB.
 	 */
 	public DirectoryContents() {
-		contents = new ArrayList<DirEntryReference>();
+		contents = new ArrayList<>();
 	}
 
 	/**
@@ -53,7 +53,7 @@ public class DirectoryContents {
 	 *            The real directory contents that we are to describe.
 	 */
 	public DirectoryContents(UriInfo ui, Collection<DirectoryEntry> collection) {
-		contents = new ArrayList<DirEntryReference>();
+		contents = new ArrayList<>();
 		UriBuilder ub = secure(ui).path("{filename}");
 		for (DirectoryEntry e : collection)
 			contents.add(DirEntryReference.newInstance(ub, e));

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerInputREST.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerInputREST.java b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerInputREST.java
index 14aad3f..94f5071 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerInputREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerInputREST.java
@@ -241,7 +241,7 @@ public interface TavernaServerInputREST {
 			super(true);
 			expected = new Uri(ui, EXPECTED);
 			baclava = new Uri(ui, BACLAVA);
-			input = new ArrayList<Uri>();
+			input = new ArrayList<>();
 			for (Input i : run.getInputs())
 				input.add(new Uri(ui, ONE_INPUT, i.getName()));
 		}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerListenersREST.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerListenersREST.java b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerListenersREST.java
index ca7e646..b868230 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerListenersREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerListenersREST.java
@@ -309,9 +309,9 @@ public interface TavernaServerListenersREST {
 			type = listener.getType();
 			configuration = new Uri(ub.clone().path("configuration"));
 			UriBuilder ub2 = ub.clone().path("properties/{prop}");
-			properties = new ArrayList<PropertyDescription>(
-					listener.listProperties().length);
-			for (String propName : listener.listProperties())
+			String[] props = listener.listProperties();
+			properties = new ArrayList<>(props.length);
+			for (String propName : props)
 				properties.add(new PropertyDescription(propName, ub2));
 		}
 	}
@@ -369,7 +369,7 @@ public interface TavernaServerListenersREST {
 		 * Make a blank description of listeners.
 		 */
 		public Listeners() {
-			listener = new ArrayList<ListenerDescription>();
+			listener = new ArrayList<>();
 		}
 
 		/**
@@ -421,7 +421,7 @@ public interface TavernaServerListenersREST {
 		 */
 		public Properties(UriBuilder ub, String[] properties) {
 			super(true);
-			property = new ArrayList<PropertyDescription>(properties.length);
+			property = new ArrayList<>(properties.length);
 			for (String propName : properties)
 				property.add(new PropertyDescription(propName, ub));
 		}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerREST.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerREST.java b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerREST.java
index f5c379c..b25a39a 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerREST.java
@@ -429,7 +429,7 @@ public interface TavernaServerREST {
 		@XmlType(name = "")
 		public static class CapabilityList {
 			@XmlElement(name = "capability", namespace = SERVER)
-			public List<Capability> capability = new ArrayList<Capability>();
+			public List<Capability> capability = new ArrayList<>();
 		}
 	}
 
@@ -449,7 +449,7 @@ public interface TavernaServerREST {
 		 * Make an empty list of permitted workflows.
 		 */
 		public PermittedWorkflows() {
-			workflow = new ArrayList<URI>();
+			workflow = new ArrayList<>();
 		}
 
 		/**
@@ -459,9 +459,9 @@ public interface TavernaServerREST {
 		 */
 		public PermittedWorkflows(List<URI> permitted) {
 			if (permitted == null)
-				workflow = new ArrayList<URI>();
+				workflow = new ArrayList<>();
 			else
-				workflow = new ArrayList<URI>(permitted);
+				workflow = new ArrayList<>(permitted);
 		}
 	}
 
@@ -481,7 +481,7 @@ public interface TavernaServerREST {
 		 * Make an empty list of permitted listener types.
 		 */
 		public PermittedListeners() {
-			type = new ArrayList<String>();
+			type = new ArrayList<>();
 		}
 
 		/**
@@ -510,7 +510,7 @@ public interface TavernaServerREST {
 		 * Make an empty list of run references.
 		 */
 		public RunList() {
-			run = new ArrayList<RunReference>();
+			run = new ArrayList<>();
 		}
 
 		/**
@@ -523,7 +523,7 @@ public interface TavernaServerREST {
 		 *            secured as it needs to have its pattern applied.
 		 */
 		public RunList(Map<String, TavernaRun> runs, UriBuilder ub) {
-			run = new ArrayList<RunReference>(runs.size());
+			run = new ArrayList<>(runs.size());
 			for (String name : runs.keySet())
 				run.add(new RunReference(name, ub));
 		}
@@ -545,7 +545,7 @@ public interface TavernaServerREST {
 		 * Make an empty list of enabled notifiers.
 		 */
 		public EnabledNotificationFabrics() {
-			notifier = new ArrayList<String>();
+			notifier = new ArrayList<>();
 		}
 
 		/**

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerRunREST.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerRunREST.java b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerRunREST.java
index e95533d..80f27ae 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerRunREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerRunREST.java
@@ -686,7 +686,7 @@ public interface TavernaServerRunREST {
 			 * An empty description of listeners.
 			 */
 			public ListenerList() {
-				listener = new ArrayList<Uri>();
+				listener = new ArrayList<>();
 			}
 
 			/**
@@ -697,7 +697,7 @@ public interface TavernaServerRunREST {
 			 */
 			private ListenerList(TavernaRun r, UriBuilder ub) {
 				super(ub);
-				listener = new ArrayList<Uri>(r.getListeners().size());
+				listener = new ArrayList<>(r.getListeners().size());
 				UriBuilder pathUB = ub.clone().path("{name}");
 				for (Listener l : r.getListeners())
 					listener.add(new Uri(pathUB.build(l.getName())));

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerSecurityREST.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerSecurityREST.java b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerSecurityREST.java
index 742caaa..c76f54b 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerSecurityREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerSecurityREST.java
@@ -528,7 +528,7 @@ public interface TavernaServerSecurityREST {
 			public URI href;
 			/** Descriptions of the credentials themselves. */
 			@XmlElement
-			public List<CredentialHolder> credential = new ArrayList<CredentialHolder>();
+			public List<CredentialHolder> credential = new ArrayList<>();
 
 			public Credentials() {
 			}
@@ -639,7 +639,7 @@ public interface TavernaServerSecurityREST {
 		/** The descriptions of the credentials */
 		@XmlElement
 		@NonNull
-		public List<CredentialHolder> credential = new ArrayList<CredentialHolder>();
+		public List<CredentialHolder> credential = new ArrayList<>();
 
 		public CredentialList() {
 		}
@@ -750,9 +750,8 @@ public interface TavernaServerSecurityREST {
 		 */
 		public PermissionsDescription(@NonNull UriBuilder ub,
 				@NonNull Map<String, Permission> permissionMap) {
-			permission = new ArrayList<LinkedPermissionDescription>();
-			List<String> userNames = new ArrayList<String>(
-					permissionMap.keySet());
+			permission = new ArrayList<>();
+			List<String> userNames = new ArrayList<>(permissionMap.keySet());
 			Collections.sort(userNames);
 			for (String user : userNames)
 				permission.add(new LinkedPermissionDescription(ub, user,

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/rest/handler/EntryHandler.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/rest/handler/EntryHandler.java b/server-webapp/src/main/java/org/taverna/server/master/rest/handler/EntryHandler.java
index 8673d1a..20d9f56 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/rest/handler/EntryHandler.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/rest/handler/EntryHandler.java
@@ -2,6 +2,7 @@ package org.taverna.server.master.rest.handler;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.singletonMap;
+import static javax.ws.rs.core.Response.notAcceptable;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -19,7 +20,6 @@ import javax.ws.rs.Produces;
 import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
-import javax.ws.rs.core.Response;
 import javax.ws.rs.core.Variant;
 import javax.ws.rs.ext.MessageBodyReader;
 import javax.ws.rs.ext.MessageBodyWriter;
@@ -40,7 +40,8 @@ public class EntryHandler implements MessageBodyWriter<Entry>,
 	private static final String ENC = "UTF-8";
 	private static final MediaType ENTRY = new MediaType("application",
 			"atom+xml", singletonMap("type", "entry"));
-	private static final Variant VARIANT = new Variant(ENTRY, (String) null, ENC);
+	private static final Variant VARIANT = new Variant(ENTRY, (String) null,
+			ENC);
 	private static final Charset UTF8 = Charset.forName(ENC);
 
 	@Required
@@ -76,26 +77,23 @@ public class EntryHandler implements MessageBodyWriter<Entry>,
 			if (charset != null)
 				cs = Charset.forName(charset);
 		} catch (IllegalCharsetNameException e) {
-			throw new WebApplicationException(Response
-					.notAcceptable(asList(VARIANT)).entity("bad charset name")
-					.build());
+			throw new WebApplicationException(notAcceptable(asList(VARIANT))
+					.entity("bad charset name").build());
 		} catch (UnsupportedCharsetException e) {
-			throw new WebApplicationException(Response
-					.notAcceptable(asList(VARIANT))
+			throw new WebApplicationException(notAcceptable(asList(VARIANT))
 					.entity("unsupportd charset name").build());
 		}
 		try {
 			Document<Entry> doc = parser.parse(new InputStreamReader(
 					entityStream, cs));
 			if (!Entry.class.isAssignableFrom(doc.getRoot().getClass())) {
-				throw new WebApplicationException(Response
-						.notAcceptable(asList(VARIANT))
-						.entity("not really a feed entry").build());
+				throw new WebApplicationException(
+						notAcceptable(asList(VARIANT)).entity(
+								"not really a feed entry").build());
 			}
 			return doc.getRoot();
 		} catch (ClassCastException e) {
-			throw new WebApplicationException(Response
-					.notAcceptable(asList(VARIANT))
+			throw new WebApplicationException(notAcceptable(asList(VARIANT))
 					.entity("not really a feed entry").build());
 
 		}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/rest/handler/URIListHandler.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/rest/handler/URIListHandler.java b/server-webapp/src/main/java/org/taverna/server/master/rest/handler/URIListHandler.java
index 39c1062..378eee8 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/rest/handler/URIListHandler.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/rest/handler/URIListHandler.java
@@ -67,7 +67,7 @@ public class URIListHandler implements MessageBodyReader<List<URI>>,
 				.forName(enc);
 		BufferedReader br = new BufferedReader(new InputStreamReader(
 				entityStream, c));
-		ArrayList<URI> uris = new ArrayList<URI>();
+		ArrayList<URI> uris = new ArrayList<>();
 		String line;
 		while ((line = br.readLine()) != null) {
 			if (line.startsWith("#"))

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/soap/FileContents.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/soap/FileContents.java b/server-webapp/src/main/java/org/taverna/server/master/soap/FileContents.java
index a3dc591..7ebc991 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/soap/FileContents.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/soap/FileContents.java
@@ -55,8 +55,7 @@ public class FileContents {
 	 */
 	public void writeToFile(File file) throws IOException,
 			FilesystemAccessException {
-		InputStream is = fileData.getInputStream();
-		try {
+		try (InputStream is = fileData.getInputStream()) {
 			byte[] buf = new byte[65536];
 			file.setContents(new byte[0]);
 			while (true) {
@@ -71,8 +70,6 @@ public class FileContents {
 					file.appendContents(shortbuf);
 				}
 			}
-		} finally {
-			is.close();
 		}
 	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/usage/UsageRecordRecorder.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/usage/UsageRecordRecorder.java b/server-webapp/src/main/java/org/taverna/server/master/usage/UsageRecordRecorder.java
index 5fe87fe..16f8689 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/usage/UsageRecordRecorder.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/usage/UsageRecordRecorder.java
@@ -83,9 +83,8 @@ public class UsageRecordRecorder extends JDOSupport<UsageRecord> {
 	 */
 	public void storeUsageRecord(String usageRecord) {
 		String logfile = state.getUsageRecordLogFile();
-		if (logfile == null) {
-			logfile = logFile;
-		}
+		if (logfile == null)
+			logfile = this.logFile;
 		if (logfile != null) {
 			logfile = contextualizer.contextualize(logfile);
 			synchronized (lock) {
@@ -144,7 +143,7 @@ public class UsageRecordRecorder extends JDOSupport<UsageRecord> {
 		@SuppressWarnings("unchecked")
 		Collection<String> urs = (Collection<String>) namedQuery("allByDate")
 				.execute();
-		List<JobUsageRecord> result = new ArrayList<JobUsageRecord>();
+		List<JobUsageRecord> result = new ArrayList<>();
 		for (String ur : urs)
 			try {
 				result.add(JobUsageRecord.unmarshal(ur));

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/utils/CapabilityLister.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/utils/CapabilityLister.java b/server-webapp/src/main/java/org/taverna/server/master/utils/CapabilityLister.java
index 440f2b2..54b0420 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/utils/CapabilityLister.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/utils/CapabilityLister.java
@@ -24,16 +24,15 @@ public class CapabilityLister {
 
 	@PostConstruct
 	void loadCapabilities() throws IOException {
-		InputStream is = getClass().getResourceAsStream(
-				CAPABILITY_RESOURCE_FILE);
-		if (is != null) {
-			properties.load(is);
-			is.close();
+		try (InputStream is = getClass().getResourceAsStream(
+				CAPABILITY_RESOURCE_FILE)) {
+			if (is != null)
+				properties.load(is);
 		}
 	}
 
 	public List<Capability> getCapabilities() {
-		List<Capability> caps = new ArrayList<Capability>();
+		List<Capability> caps = new ArrayList<>();
 		for (Entry<Object, Object> entry : properties.entrySet()) {
 			Capability c = new Capability();
 			c.capability = URI.create(entry.getKey().toString());

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/utils/CertificateChainFetcher.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/utils/CertificateChainFetcher.java b/server-webapp/src/main/java/org/taverna/server/master/utils/CertificateChainFetcher.java
index 8ac34d0..f94d497 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/utils/CertificateChainFetcher.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/utils/CertificateChainFetcher.java
@@ -111,7 +111,7 @@ public class CertificateChainFetcher {
 		TrustManagerFactory tmf = TrustManagerFactory.getInstance(algorithm);
 		ks.load(null, null);
 		tmf.init(ks);
-		final Holder<X509Certificate[]> chain = new Holder<X509Certificate[]>();
+		final Holder<X509Certificate[]> chain = new Holder<>();
 		final X509TrustManager defaultTrustManager = (X509TrustManager) tmf
 				.getTrustManagers()[0];
 		context.init(null, new TrustManager[] { new X509TrustManager() {
@@ -134,18 +134,16 @@ public class CertificateChainFetcher {
 			}
 		} }, null);
 		SSLSocketFactory factory = context.getSocketFactory();
-		SSLSocket socket = (SSLSocket) factory.createSocket(host, port);
-		socket.setSoTimeout(timeout);
-		try {
+		try (SSLSocket socket = (SSLSocket) factory.createSocket(host, port)) {
+			socket.setSoTimeout(timeout);
 			socket.startHandshake();
-			socket.close();
 		} catch (SSLException e) {
 			// Ignore
 		}
 		return chain.value;
 	}
 
-	private Map<URI, List<X509Certificate>> cache = new HashMap<URI, List<X509Certificate>>();
+	private Map<URI, List<X509Certificate>> cache = new HashMap<>();
 
 	/**
 	 * Gets the certificate chain for a service identified by URI.

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/utils/X500Utils.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/utils/X500Utils.java b/server-webapp/src/main/java/org/taverna/server/master/utils/X500Utils.java
index 7ea073c..da4cff0 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/utils/X500Utils.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/utils/X500Utils.java
@@ -10,6 +10,7 @@ import static javax.security.auth.x500.X500Principal.RFC2253;
 import java.math.BigInteger;
 import java.security.cert.X509Certificate;
 import java.util.HashMap;
+import java.util.Map;
 
 import javax.annotation.PreDestroy;
 import javax.security.auth.x500.X500Principal;
@@ -53,7 +54,7 @@ public class X500Utils {
 		int startIndex = 0;
 		boolean ignoreThisChar = false;
 		boolean inQuotes = false;
-		HashMap<String, String> tokenized = new HashMap<String, String>();
+		Map<String, String> tokenized = new HashMap<>();
 
 		for (i = 0; i < dn.length(); i++)
 			if (ignoreThisChar)
@@ -82,7 +83,7 @@ public class X500Utils {
 		return "none";
 	}
 
-	private void storeDNField(HashMap<String, String> container, String[] split) {
+	private void storeDNField(Map<String, String> container, String[] split) {
 		if (split == null || split.length != 2)
 			return;
 		String key = split[0].toUpperCase();

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/worker/RemoteRunDelegate.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/worker/RemoteRunDelegate.java b/server-webapp/src/main/java/org/taverna/server/master/worker/RemoteRunDelegate.java
index 44a2b3a..d5b1ca8 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/worker/RemoteRunDelegate.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/worker/RemoteRunDelegate.java
@@ -182,9 +182,7 @@ public class RemoteRunDelegate implements TavernaRun {
 	public void destroy() {
 		try {
 			run.destroy();
-		} catch (RemoteException e) {
-			log.warn("failed to destroy run", e);
-		} catch (ImplementationException e) {
+		} catch (RemoteException | ImplementationException e) {
 			log.warn("failed to destroy run", e);
 		}
 	}
@@ -196,7 +194,7 @@ public class RemoteRunDelegate implements TavernaRun {
 
 	@Override
 	public List<Listener> getListeners() {
-		ArrayList<Listener> listeners = new ArrayList<Listener>();
+		List<Listener> listeners = new ArrayList<>();
 		try {
 			for (RemoteListener rl : run.getListeners())
 				listeners.add(new ListenerDelegate(rl));
@@ -289,9 +287,7 @@ public class RemoteRunDelegate implements TavernaRun {
 			throw new BadStateChangeException(e.getMessage());
 		} catch (RemoteException e) {
 			throw new BadStateChangeException(e.getMessage(), e.getCause());
-		} catch (GeneralSecurityException e) {
-			throw new BadStateChangeException(e.getMessage(), e);
-		} catch (IOException e) {
+		} catch (GeneralSecurityException | IOException e) {
 			throw new BadStateChangeException(e.getMessage(), e);
 		} catch (ImplementationException e) {
 			if (e.getCause() != null)
@@ -328,7 +324,7 @@ public class RemoteRunDelegate implements TavernaRun {
 
 	@Override
 	public List<Input> getInputs() {
-		ArrayList<Input> inputs = new ArrayList<Input>();
+		ArrayList<Input> inputs = new ArrayList<>();
 		try {
 			for (RemoteInput ri : run.getInputs())
 				inputs.add(new RunInput(ri));
@@ -412,7 +408,7 @@ public class RemoteRunDelegate implements TavernaRun {
 	 *            the readers to set
 	 */
 	public void setReaders(Set<String> readers) {
-		this.readers = new HashSet<String>(readers);
+		this.readers = new HashSet<>(readers);
 		db.flushToDisk(this);
 	}
 
@@ -429,7 +425,7 @@ public class RemoteRunDelegate implements TavernaRun {
 	 *            the writers to set
 	 */
 	public void setWriters(Set<String> writers) {
-		this.writers = new HashSet<String>(writers);
+		this.writers = new HashSet<>(writers);
 		db.flushToDisk(this);
 	}
 
@@ -446,7 +442,7 @@ public class RemoteRunDelegate implements TavernaRun {
 	 *            the destroyers to set
 	 */
 	public void setDestroyers(Set<String> destroyers) {
-		this.destroyers = new HashSet<String>(destroyers);
+		this.destroyers = new HashSet<>(destroyers);
 		db.flushToDisk(this);
 	}
 
@@ -462,7 +458,7 @@ public class RemoteRunDelegate implements TavernaRun {
 		out.defaultWriteObject();
 		out.writeUTF(secContext.getOwner().getName());
 		out.writeObject(secContext.getFactory());
-		out.writeObject(new MarshalledObject<RemoteSingleRun>(run));
+		out.writeObject(new MarshalledObject<>(run));
 	}
 
 	@Override
@@ -488,9 +484,7 @@ public class RemoteRunDelegate implements TavernaRun {
 		try {
 			secContext = factory.create(this,
 					new UsernamePrincipal(creatorName));
-		} catch (RuntimeException e) {
-			throw e;
-		} catch (IOException e) {
+		} catch (RuntimeException | IOException e) {
 			throw e;
 		} catch (Exception e) {
 			throw new SecurityContextReconstructionException(e);
@@ -619,7 +613,7 @@ class DirectoryDelegate extends DEDelegate implements Directory {
 	@Override
 	public Collection<DirectoryEntry> getContents()
 			throws FilesystemAccessException {
-		ArrayList<DirectoryEntry> result = new ArrayList<DirectoryEntry>();
+		ArrayList<DirectoryEntry> result = new ArrayList<>();
 		try {
 			for (RemoteDirectoryEntry rde : rd.getContents()) {
 				if (rde instanceof RemoteDirectory)
@@ -637,8 +631,7 @@ class DirectoryDelegate extends DEDelegate implements Directory {
 	@Override
 	public Collection<DirectoryEntry> getContentsByDate()
 			throws FilesystemAccessException {
-		ArrayList<DirectoryEntry> result = new ArrayList<DirectoryEntry>(
-				getContents());
+		ArrayList<DirectoryEntry> result = new ArrayList<>(getContents());
 		sort(result, new DateComparator());
 		return result;
 	}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/worker/RunConnection.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/worker/RunConnection.java b/server-webapp/src/main/java/org/taverna/server/master/worker/RunConnection.java
index 018c15d..06ad617 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/worker/RunConnection.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/worker/RunConnection.java
@@ -186,9 +186,9 @@ public class RunConnection {
 		rrd.creationInstant = creationInstant;
 		rrd.workflow = workflow;
 		rrd.expiry = expiry;
-		rrd.readers = new HashSet<String>(list(readers));
-		rrd.writers = new HashSet<String>(list(writers));
-		rrd.destroyers = new HashSet<String>(list(destroyers));
+		rrd.readers = new HashSet<>(list(readers));
+		rrd.writers = new HashSet<>(list(writers));
+		rrd.destroyers = new HashSet<>(list(destroyers));
 		rrd.run = run.get();
 		rrd.doneTransitionToFinished = isFinished();
 		rrd.generateProvenance = isProvenanceGenerated();
@@ -215,7 +215,7 @@ public class RunConnection {
 		if (creationInstant == null) {
 			creationInstant = rrd.getCreationTimestamp();
 			workflow = rrd.getWorkflow();
-			run = new MarshalledObject<RemoteSingleRun>(rrd.run);
+			run = new MarshalledObject<>(rrd.run);
 			securityContextFactory = rrd.getSecurityContext().getFactory();
 			owner = rrd.getSecurityContext().getOwner().getName();
 			securityToken = ((org.taverna.server.master.worker.SecurityContextFactory) securityContextFactory)

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/worker/RunDatabase.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/worker/RunDatabase.java b/server-webapp/src/main/java/org/taverna/server/master/worker/RunDatabase.java
index eb684a6..8822d03 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/worker/RunDatabase.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/worker/RunDatabase.java
@@ -46,7 +46,7 @@ public class RunDatabase implements RunStore, RunDBSupport {
 	private NotificationEngine notificationEngine;
 	@Autowired
 	private FactoryBean factory;
-	private Map<String, TavernaRun> cache = new HashMap<String, TavernaRun>();
+	private Map<String, TavernaRun> cache = new HashMap<>();
 
 	@Override
 	@Required
@@ -55,7 +55,7 @@ public class RunDatabase implements RunStore, RunDBSupport {
 	}
 
 	public void setTypeNotifiers(List<CompletionNotifier> notifiers) {
-		typedNotifiers = new HashMap<String, CompletionNotifier>();
+		typedNotifiers = new HashMap<>();
 		for (CompletionNotifier n : notifiers)
 			typedNotifiers.put(n.getName(), n);
 	}
@@ -198,7 +198,7 @@ public class RunDatabase implements RunStore, RunDBSupport {
 	@Override
 	public Map<String, TavernaRun> listRuns(UsernamePrincipal user, Policy p) {
 		synchronized (cache) {
-			Map<String, TavernaRun> cached = new HashMap<String, TavernaRun>();
+			Map<String, TavernaRun> cached = new HashMap<>();
 			for (Entry<String, TavernaRun> e : cache.entrySet()) {
 				TavernaRun r = e.getValue();
 				if (p.permitAccess(user, r))
@@ -215,9 +215,9 @@ public class RunDatabase implements RunStore, RunDBSupport {
 			return;
 		try {
 			ByteArrayOutputStream baos = new ByteArrayOutputStream();
-			ObjectOutputStream oos = new ObjectOutputStream(baos);
-			oos.writeObject(obj);
-			oos.close();
+			try (ObjectOutputStream oos = new ObjectOutputStream(baos)) {
+				oos.writeObject(obj);
+			}
 			log.debug(message + ": " + baos.size());
 		} catch (Exception e) {
 			log.warn("oops", e);

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/worker/RunDatabaseDAO.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/worker/RunDatabaseDAO.java b/server-webapp/src/main/java/org/taverna/server/master/worker/RunDatabaseDAO.java
index 6568d33..1445373 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/worker/RunDatabaseDAO.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/worker/RunDatabaseDAO.java
@@ -109,7 +109,7 @@ public class RunDatabaseDAO extends JDOSupport<RunConnection> {
 	@NonNull
 	private List<RunConnection> allRuns() {
 		try {
-			List<RunConnection> rcs = new ArrayList<RunConnection>();
+			List<RunConnection> rcs = new ArrayList<>();
 			List<String> names = nameRuns();
 			for (String id : names) {
 				try {
@@ -158,8 +158,8 @@ public class RunDatabaseDAO extends JDOSupport<RunConnection> {
 	@NonNull
 	@WithinSingleTransaction
 	public Map<String, TavernaRun> listRuns(UsernamePrincipal user, Policy p) {
-		Map<String, TavernaRun> result = new HashMap<String, TavernaRun>();
-		for (String id : nameRuns()) {
+		Map<String, TavernaRun> result = new HashMap<>();
+		for (String id : nameRuns())
 			try {
 				RemoteRunDelegate rrd = pickRun(id).fromDBform(facade);
 				if (p.permitAccess(user, rrd))
@@ -167,7 +167,6 @@ public class RunDatabaseDAO extends JDOSupport<RunConnection> {
 			} catch (Exception e) {
 				continue;
 			}
-		}
 		return result;
 	}
 
@@ -177,11 +176,10 @@ public class RunDatabaseDAO extends JDOSupport<RunConnection> {
 	@NonNull
 	@WithinSingleTransaction
 	public List<String> listRunNames() {
-		ArrayList<String> runNames = new ArrayList<String>();
-		for (RunConnection rc : allRuns()) {
+		List<String> runNames = new ArrayList<>();
+		for (RunConnection rc : allRuns())
 			if (rc.getId() != null)
 				runNames.add(rc.getId());
-		}
 		return runNames;
 	}
 
@@ -279,15 +277,14 @@ public class RunDatabaseDAO extends JDOSupport<RunConnection> {
 	@PerfLogged
 	@WithinSingleTransaction
 	public List<RemoteRunDelegate> getPotentiallyNotifiable() {
-		List<RemoteRunDelegate> toNotify = new ArrayList<RemoteRunDelegate>();
+		List<RemoteRunDelegate> toNotify = new ArrayList<>();
 		for (String id : unterminatedRuns())
 			try {
 				RunConnection rc = getById(id);
 				toNotify.add(rc.fromDBform(facade));
 			} catch (Exception e) {
-				log.warn(
-						"failed to fetch for notification of completion check",
-						e);
+				log.warn("failed to fetch connection token"
+						+ "for notification of completion check", e);
 			}
 		return toNotify;
 	}


[14/50] [abbrv] incubator-taverna-server git commit: URI not Uri…

Posted by st...@apache.org.
URI not Uri…

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/1262673d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/1262673d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/1262673d

Branch: refs/heads/master
Commit: 1262673df3c16c55dff0b020d762b1b674f33414
Parents: 71eb1e6
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Fri Apr 11 15:44:31 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Fri Apr 11 15:44:31 2014 +0100

----------------------------------------------------------------------
 .../taverna/server/master/rest/TavernaServerInputREST.java    | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/1262673d/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerInputREST.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerInputREST.java b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerInputREST.java
index dcd2629..ac69274 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerInputREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerInputREST.java
@@ -13,6 +13,7 @@ import static org.taverna.server.master.rest.TavernaServerInputREST.PathNames.BA
 import static org.taverna.server.master.rest.TavernaServerInputREST.PathNames.EXPECTED;
 import static org.taverna.server.master.rest.TavernaServerInputREST.PathNames.ONE_INPUT;
 
+import java.net.URI;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -33,6 +34,7 @@ import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlElements;
 import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSchemaType;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlValue;
 
@@ -282,7 +284,7 @@ public interface TavernaServerInputREST {
 			for (PathSegment s : segments.subList(0, segments.size() - 2))
 				ub.segment(s.getPath());
 			ub.fragment(name);
-			descriptorRef = new Uri(ub);
+			descriptorRef = new Uri(ub).ref;
 		}
 
 		/** The name of the port. */
@@ -290,7 +292,8 @@ public interface TavernaServerInputREST {
 		public String name;
 		/** Where the port is described. Ignored in user input. */
 		@XmlAttribute(required = false)
-		public Uri descriptorRef;
+		@XmlSchemaType(name = "anyURI")
+		public URI descriptorRef;
 		/** The character to use to split the input into a list. */
 		@XmlAttribute(name = "listDelimiter", required = false)
 		public String delimiter;


[37/50] [abbrv] incubator-taverna-server git commit: Add id attributes to generated WADL.

Posted by st...@apache.org.
Add id attributes to generated WADL.

More information:
http://cxf.apache.org/docs/jaxrs-services-description.html#JAXRSServicesDescription-CustomizingWADLGeneration

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/4294f80c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/4294f80c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/4294f80c

Branch: refs/heads/master
Commit: 4294f80cfdfb6ca0ed609bbd93b08432ae719f88
Parents: 42fded0
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Thu Jun 5 14:06:12 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Thu Jun 5 14:06:12 2014 +0100

----------------------------------------------------------------------
 server-webapp/src/main/webapp/WEB-INF/webappBeans.xml | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/4294f80c/server-webapp/src/main/webapp/WEB-INF/webappBeans.xml
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/webapp/WEB-INF/webappBeans.xml b/server-webapp/src/main/webapp/WEB-INF/webappBeans.xml
index 9d2af65..a22664a 100644
--- a/server-webapp/src/main/webapp/WEB-INF/webappBeans.xml
+++ b/server-webapp/src/main/webapp/WEB-INF/webappBeans.xml
@@ -96,6 +96,9 @@
 			<ref bean="jsonProvider" />
 			<ref bean="atomEntryHandler" />
 			<ref bean="atomFeedHandler" />
+			<bean class="org.apache.cxf.jaxrs.model.wadl.WadlGenerator">
+				<property name="addResourceAndMethodIds" value="true"/>
+			</bean>
 		</jaxrs:providers>
 		<jaxrs:outInterceptors>
 			<ref bean="Interceptor.FlushThreadLocalCache" />


[36/50] [abbrv] incubator-taverna-server git commit: Merge pull request #5 from giancarlobi/2.5

Posted by st...@apache.org.
Merge pull request #5 from giancarlobi/2.5

Added way to empty the permitted WF URIs list.

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/42fded04
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/42fded04
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/42fded04

Branch: refs/heads/master
Commit: 42fded04f66fefb33814b2cdf75ceb3d8bbf1cf6
Parents: 0b6e8e8 29837dc
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Thu Jun 5 10:30:43 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Thu Jun 5 10:30:43 2014 +0100

----------------------------------------------------------------------
 server-webapp/src/main/resources/admin.html     |  2 +-
 .../src/main/resources/static/admin.js          | 24 ++++++++++++++++++--
 2 files changed, 23 insertions(+), 3 deletions(-)
----------------------------------------------------------------------



[19/50] [abbrv] incubator-taverna-server git commit: Last remaining version numbers updates

Posted by st...@apache.org.
Last remaining version numbers updates

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/cb956ed6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/cb956ed6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/cb956ed6

Branch: refs/heads/master
Commit: cb956ed6b239f96166220492be4e90b6fca9da95
Parents: 937d6e7
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Tue Apr 22 15:36:36 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Tue Apr 22 15:36:36 2014 +0100

----------------------------------------------------------------------
 .../java/org/taverna/server/master/rest/TavernaServerREST.java     | 2 +-
 .../java/org/taverna/server/master/soap/TavernaServerSOAP.java     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/cb956ed6/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerREST.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerREST.java b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerREST.java
index 2ed4959..1e9f4a2 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerREST.java
@@ -59,7 +59,7 @@ import org.taverna.server.master.interfaces.TavernaRun;
 import org.taverna.server.master.soap.TavernaServerSOAP;
 
 /**
- * The REST service interface to Taverna 2.5.3 Server.
+ * The REST service interface to Taverna 2.5.4 Server.
  * 
  * @author Donal Fellows
  * @see TavernaServerSOAP

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/cb956ed6/server-webapp/src/main/java/org/taverna/server/master/soap/TavernaServerSOAP.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/soap/TavernaServerSOAP.java b/server-webapp/src/main/java/org/taverna/server/master/soap/TavernaServerSOAP.java
index 4d02275..46b1273 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/soap/TavernaServerSOAP.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/soap/TavernaServerSOAP.java
@@ -44,7 +44,7 @@ import org.taverna.server.master.rest.TavernaServerREST;
 import org.taverna.server.port_description.OutputDescription;
 
 /**
- * The SOAP service interface to Taverna 2.5.3 Server.
+ * The SOAP service interface to Taverna 2.5.4 Server.
  * 
  * @author Donal Fellows
  * @see TavernaServerREST


[43/50] [abbrv] incubator-taverna-server git commit: Updated the server to use the new interaction service capabilities.

Posted by st...@apache.org.
Updated the server to use the new interaction service capabilities.

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/92c8fb05
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/92c8fb05
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/92c8fb05

Branch: refs/heads/master
Commit: 92c8fb057d11d60decce8917239326ac00561c27
Parents: bc262f6
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Mon Aug 18 11:28:46 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Mon Aug 18 14:05:29 2014 +0100

----------------------------------------------------------------------
 .../localworker/remote/RemoteSingleRun.java     |  6 ++-
 .../interaction/InteractionFeedSupport.java     | 42 ++++++++++++++++++++
 .../localworker/AbstractRemoteRunFactory.java   | 13 +++++-
 .../main/replacementscripts/executeworkflow.sh  |  3 ++
 .../server/localworker/impl/LocalWorker.java    |  4 +-
 .../server/localworker/impl/WorkerCore.java     | 22 ++++++++++
 6 files changed, 86 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/92c8fb05/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteSingleRun.java
----------------------------------------------------------------------
diff --git a/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteSingleRun.java b/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteSingleRun.java
index 19c2bcd..fa68b81 100644
--- a/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteSingleRun.java
+++ b/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteSingleRun.java
@@ -221,11 +221,15 @@ public interface RemoteSingleRun extends Remote {
 	 *            The location used for pushing web pages to support the feed.
 	 *            If <tt>null</tt>, a default from the factory will be used
 	 *            instead.
+	 * @param publishUrlBase
+	 *            Where to <i>actually</i> publish to, if this needs to be
+	 *            different from the location presented in the published HTML
+	 *            and Feed entries. Necessary in complex network scenarios.
 	 * @throws RemoteException
 	 *             If anything goes wrong with the communication.
 	 */
 	void setInteractionServiceDetails(@Nonnull URL interactionFeed,
-			@Nonnull URL webdavPath) throws RemoteException;
+			@Nonnull URL webdavPath, @Nullable URL publishUrlBase) throws RemoteException;
 
 	/**
 	 * A do-nothing method, used to check the general reachability of the

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/92c8fb05/server-webapp/src/main/java/org/taverna/server/master/interaction/InteractionFeedSupport.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/interaction/InteractionFeedSupport.java b/server-webapp/src/main/java/org/taverna/server/master/interaction/InteractionFeedSupport.java
index 3a9808b..99e1d99 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/interaction/InteractionFeedSupport.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/interaction/InteractionFeedSupport.java
@@ -5,18 +5,31 @@
  */
 package org.taverna.server.master.interaction;
 
+import static java.lang.management.ManagementFactory.getPlatformMBeanServer;
 import static java.util.Collections.reverse;
+import static javax.management.Query.attr;
+import static javax.management.Query.match;
+import static javax.management.Query.value;
+import static org.apache.commons.logging.LogFactory.getLog;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URI;
+import java.net.URL;
 import java.util.ArrayList;
 import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.concurrent.atomic.AtomicInteger;
 
+import javax.annotation.Nullable;
+import javax.annotation.PostConstruct;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
 import org.apache.abdera.Abdera;
 import org.apache.abdera.factory.Factory;
 import org.apache.abdera.i18n.iri.IRI;
@@ -97,6 +110,28 @@ public class InteractionFeedSupport {
 		this.uriBuilder = uriBuilder;
 	}
 
+	private final Map<String, URL> endPoints = new HashMap<>();
+
+	@PostConstruct
+	void determinePorts() {
+		try {
+			MBeanServer mbs = getPlatformMBeanServer();
+			for (ObjectName obj : mbs.queryNames(new ObjectName(
+					"*:type=Connector,*"),
+					match(attr("protocol"), value("HTTP/1.1")))) {
+				String scheme = mbs.getAttribute(obj, "scheme").toString();
+				String port = obj.getKeyProperty("port");
+				endPoints.put(scheme, new URL(scheme + "://localhost:" + port));
+			}
+			getLog(getClass()).info(
+					"installed feed port publication mapping for "
+							+ endPoints.keySet());
+		} catch (Exception e) {
+			getLog(getClass()).error(
+					"failure in determining local port mapping", e);
+		}
+	}
+	
 	/**
 	 * @param run
 	 *            The workflow run that defines which feed we are operating on.
@@ -106,6 +141,13 @@ public class InteractionFeedSupport {
 		return uriBuilder.getRunUriBuilder(run).path(FEED_URL_DIR).build();
 	}
 
+	@Nullable
+	public URL getLocalFeedBase(URI feedURI) {
+		if (feedURI == null)
+			return null;
+		return endPoints.get(feedURI.getScheme());
+	}
+
 	/**
 	 * @param run
 	 *            The workflow run that defines which feed we are operating on.

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/92c8fb05/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java b/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java
index 4394b4b..248baa6 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java
@@ -17,6 +17,7 @@ import static org.taverna.server.master.rest.TavernaServerRunREST.PathNames.DIR;
 
 import java.io.IOException;
 import java.io.ObjectInputStream;
+import java.net.URI;
 import java.net.URL;
 import java.rmi.MarshalledObject;
 import java.rmi.RMISecurityManager;
@@ -29,6 +30,8 @@ import java.util.Date;
 import java.util.List;
 import java.util.UUID;
 
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.annotation.Resource;
 import javax.xml.bind.JAXBException;
 
@@ -335,10 +338,16 @@ public abstract class AbstractRemoteRunFactory extends RunFactoryConfiguration
 					state.getDefaultLifetime(), runDB, id,
 					state.getGenerateProvenance(), this);
 			run.setSecurityContext(securityFactory.create(run, creator));
-			URL feedUrl = interactionFeedSupport.getFeedURI(run).toURL();
+			@Nonnull
+			URI feed = interactionFeedSupport.getFeedURI(run);
+			@Nonnull
+			URL feedUrl = feed.toURL();
+			@Nonnull
 			URL webdavUrl = baseurifactory.getRunUriBuilder(run)
 					.path(DIR + "/interactions").build().toURL();
-			rsr.setInteractionServiceDetails(feedUrl, webdavUrl);
+			@Nullable
+			URL pub = interactionFeedSupport.getLocalFeedBase(feed);
+			rsr.setInteractionServiceDetails(feedUrl, webdavUrl, pub);
 			return run;
 		} catch (NoCreateException e) {
 			log.warn("failed to build run instance", e);

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/92c8fb05/server-webapp/src/main/replacementscripts/executeworkflow.sh
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/replacementscripts/executeworkflow.sh b/server-webapp/src/main/replacementscripts/executeworkflow.sh
index f78bc46..8885cb1 100644
--- a/server-webapp/src/main/replacementscripts/executeworkflow.sh
+++ b/server-webapp/src/main/replacementscripts/executeworkflow.sh
@@ -54,6 +54,9 @@ if test x != "x$INTERACTION_HOST"; then
     INTERACTION_PROPS="$INTERACTION_PROPS -Dtaverna.interaction.port=$INTERACTION_PORT"
     INTERACTION_PROPS="$INTERACTION_PROPS -Dtaverna.interaction.webdav_path=$INTERACTION_WEBDAV"
     INTERACTION_PROPS="$INTERACTION_PROPS -Dtaverna.interaction.feed_path=$INTERACTION_FEED"
+    if test x != "x$INTERACTION_PUBLISH"; then
+    	INTERACTION_PROPS="$INTERACTION_PROPS -Dtaverna.interaction.publishAddressOverride=$INTERACTION_PUBLISH"
+    fi
 fi
 
 MainClass=net.sf.taverna.t2.commandline.CommandLineLauncher

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/92c8fb05/server-worker/src/main/java/org/taverna/server/localworker/impl/LocalWorker.java
----------------------------------------------------------------------
diff --git a/server-worker/src/main/java/org/taverna/server/localworker/impl/LocalWorker.java b/server-worker/src/main/java/org/taverna/server/localworker/impl/LocalWorker.java
index bdd9fd1..29755c5 100644
--- a/server-worker/src/main/java/org/taverna/server/localworker/impl/LocalWorker.java
+++ b/server-worker/src/main/java/org/taverna/server/localworker/impl/LocalWorker.java
@@ -166,6 +166,7 @@ public class LocalWorker extends UnicastRemoteObject implements RemoteSingleRun
 	List<String> runtimeSettings = new ArrayList<>();
 	URL interactionFeedURL;
 	URL webdavURL;
+	URL publishURL;//FIXME
 	private boolean doProvenance = true;
 
 	// ----------------------- METHODS -----------------------
@@ -755,9 +756,10 @@ public class LocalWorker extends UnicastRemoteObject implements RemoteSingleRun
 	}
 
 	@Override
-	public void setInteractionServiceDetails(URL feed, URL webdav) {
+	public void setInteractionServiceDetails(URL feed, URL webdav, URL publish) {
 		interactionFeedURL = feed;
 		webdavURL = webdav;
+		publishURL = publish;
 	}
 
 	@Override

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/92c8fb05/server-worker/src/main/java/org/taverna/server/localworker/impl/WorkerCore.java
----------------------------------------------------------------------
diff --git a/server-worker/src/main/java/org/taverna/server/localworker/impl/WorkerCore.java b/server-worker/src/main/java/org/taverna/server/localworker/impl/WorkerCore.java
index 9c96859..c91fdcc 100644
--- a/server-worker/src/main/java/org/taverna/server/localworker/impl/WorkerCore.java
+++ b/server-worker/src/main/java/org/taverna/server/localworker/impl/WorkerCore.java
@@ -53,6 +53,8 @@ import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.io.UnsupportedEncodingException;
 import java.io.Writer;
+import java.net.URI;
+import java.net.URISyntaxException;
 import java.net.URL;
 import java.rmi.RemoteException;
 import java.rmi.server.UnicastRemoteObject;
@@ -439,6 +441,9 @@ public class WorkerCore extends UnicastRemoteObject implements Worker,
 			env.put("INTERACTION_WEBDAV",
 					local.webdavURL != null ? local.webdavURL.getPath()
 							: interactionWebdavPath);
+			String pub = makeInterPublish(local.publishURL);
+			if (pub != null && !pub.isEmpty())
+				env.put("INTERACTION_PUBLISH", pub);
 		}
 		return pb;
 	}
@@ -461,6 +466,23 @@ public class WorkerCore extends UnicastRemoteObject implements Worker,
 	}
 
 	@Nullable
+	private static String makeInterPublish(@Nullable URL url)
+			throws IOException {
+		if (url == null)
+			return null;
+		try {
+			URI uri = url.toURI();
+			int port = uri.getPort();
+			if (port == -1)
+				return uri.getScheme() + "://" + uri.getHost();
+			else
+				return uri.getScheme() + "://" + uri.getHost() + ":" + port;
+		} catch (URISyntaxException e) {
+			throw new IOException("problem constructing publication url", e);
+		}
+	}
+
+	@Nullable
 	private static String makeInterPath(@Nullable URL url) {
 		if (url == null)
 			return interactionFeedPath;


[13/50] [abbrv] incubator-taverna-server git commit: Use JSR 305 nullability assertions instead of findbugs ones.

Posted by st...@apache.org.
Use JSR 305 nullability assertions instead of findbugs ones.

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/6ce771d1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/6ce771d1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/6ce771d1

Branch: refs/heads/master
Commit: 6ce771d1db055838c24e4c4401e342561ee0e04c
Parents: 80bbbe9
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Fri Apr 11 15:25:33 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Fri Apr 11 15:25:33 2014 +0100

----------------------------------------------------------------------
 pom.xml                                         |   8 +-
 .../localworker/remote/RemoteDirectory.java     |  12 +-
 .../remote/RemoteDirectoryEntry.java            |   8 +-
 .../server/localworker/remote/RemoteFile.java   |  14 +--
 .../server/localworker/remote/RemoteInput.java  |  10 +-
 .../localworker/remote/RemoteListener.java      |  16 +--
 .../localworker/remote/RemoteRunFactory.java    |  14 +--
 .../remote/RemoteSecurityContext.java           |  12 +-
 .../localworker/remote/RemoteSingleRun.java     |  36 +++---
 .../org/taverna/server/unixforker/Forker.java   |   4 +-
 .../taverna/server/master/ListenersREST.java    |   5 +-
 .../taverna/server/master/TavernaServer.java    |   9 +-
 .../server/master/TavernaServerSupport.java     |  47 ++++----
 .../org/taverna/server/master/admin/Admin.java  |  67 ++++++-----
 .../server/master/api/TavernaServerBean.java    |  22 ++--
 .../server/master/common/Credential.java        |   4 +-
 .../org/taverna/server/master/common/Uri.java   |  21 ++--
 .../identity/WorkflowInternalAuthProvider.java  |  11 +-
 .../taverna/server/master/interfaces/Input.java |   8 +-
 .../master/interfaces/MessageDispatcher.java    |   8 +-
 .../localworker/AbstractRemoteRunFactory.java   |   5 +-
 .../master/localworker/ForkRunFactory.java      |   7 +-
 .../localworker/IdAwareForkRunFactory.java      |   7 +-
 .../master/notification/atom/EventDAO.java      |  13 +--
 .../master/rest/TavernaServerDirectoryREST.java |  27 +++--
 .../master/rest/TavernaServerInputREST.java     |  23 ++--
 .../master/rest/TavernaServerListenersREST.java |  37 +++---
 .../server/master/rest/TavernaServerREST.java   |  51 ++++----
 .../master/rest/TavernaServerRunREST.java       |  75 ++++++------
 .../master/rest/TavernaServerSecurityREST.java  | 117 +++++++++----------
 .../taverna/server/master/utils/JDOSupport.java |  15 ++-
 .../master/utils/WebappAwareDataSource.java     |   3 -
 .../server/master/worker/PolicyImpl.java        |   3 -
 .../server/master/worker/RemoteRunDelegate.java |   7 +-
 .../server/master/worker/RunConnection.java     |  15 +--
 .../server/master/worker/RunDBSupport.java      |  10 +-
 .../server/master/worker/RunDatabase.java       |   4 +-
 .../server/master/worker/RunDatabaseDAO.java    |  27 +++--
 .../master/worker/RunFactoryConfiguration.java  |  23 ++--
 .../master/worker/SecurityContextDelegate.java  |   5 +-
 .../master/worker/SecurityContextFactory.java   |   4 -
 .../server/master/TavernaServerImplTest.java    |   4 -
 .../taverna/server/master/mocks/ExampleRun.java |   5 +-
 .../taverna/server/master/mocks/MockPolicy.java |   3 -
 .../localworker/impl/DirectoryDelegate.java     |  11 +-
 .../server/localworker/impl/FileDelegate.java   |   8 +-
 .../server/localworker/impl/LocalWorker.java    |  11 +-
 .../localworker/impl/TavernaRunManager.java     |   5 -
 .../server/localworker/impl/WorkerCore.java     |  95 +++++++--------
 .../localworker/impl/utils/TimingOutTask.java   |   2 +-
 .../localworker/impl/LocalWorkerTest.java       |   3 -
 51 files changed, 441 insertions(+), 520 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index e00f579..3922b4a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -259,11 +259,9 @@
 	</build>
 	<dependencies>
 		<dependency>
-			<groupId>findbugs</groupId>
-			<artifactId>annotations</artifactId>
-			<version>1.0.0</version>
-			<type>jar</type>
-			<scope>compile</scope>
+			<groupId>com.google.code.findbugs</groupId>
+			<artifactId>jsr305</artifactId>
+			<version>1.3.7</version>
 		</dependency>
 	</dependencies>
 	<dependencyManagement>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteDirectory.java
----------------------------------------------------------------------
diff --git a/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteDirectory.java b/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteDirectory.java
index 0f3fea3..395842a 100644
--- a/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteDirectory.java
+++ b/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteDirectory.java
@@ -9,7 +9,7 @@ import java.io.IOException;
 import java.rmi.RemoteException;
 import java.util.Collection;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
+import javax.annotation.Nonnull;
 
 /**
  * Represents a directory that is the working directory of a workflow run, or a
@@ -26,7 +26,7 @@ public interface RemoteDirectory extends RemoteDirectoryEntry {
 	 * @throws IOException
 	 *             If anything goes wrong with listing the directory.
 	 */
-	@NonNull
+	@Nonnull
 	public Collection<RemoteDirectoryEntry> getContents()
 			throws RemoteException, IOException;
 
@@ -41,8 +41,8 @@ public interface RemoteDirectory extends RemoteDirectoryEntry {
 	 * @throws IOException
 	 *             If things go wrong with creating the subdirectory.
 	 */
-	@NonNull
-	public RemoteDirectory makeSubdirectory(@NonNull String name)
+	@Nonnull
+	public RemoteDirectory makeSubdirectory(@Nonnull String name)
 			throws RemoteException, IOException;
 
 	/**
@@ -56,7 +56,7 @@ public interface RemoteDirectory extends RemoteDirectoryEntry {
 	 * @throws IOException
 	 *             If anything goes wrong with creating the file.
 	 */
-	@NonNull
-	public RemoteFile makeEmptyFile(@NonNull String name)
+	@Nonnull
+	public RemoteFile makeEmptyFile(@Nonnull String name)
 			throws RemoteException, IOException;
 }

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteDirectoryEntry.java
----------------------------------------------------------------------
diff --git a/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteDirectoryEntry.java b/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteDirectoryEntry.java
index d1246de..1e04b44 100644
--- a/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteDirectoryEntry.java
+++ b/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteDirectoryEntry.java
@@ -10,8 +10,8 @@ import java.rmi.Remote;
 import java.rmi.RemoteException;
 import java.util.Date;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-import edu.umd.cs.findbugs.annotations.Nullable;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 
 /**
  * An entry in a {@link RemoteDirectory} representing a file or sub-directory.
@@ -27,7 +27,7 @@ public interface RemoteDirectoryEntry extends Remote {
 	 * @throws RemoteException
 	 *             If anything goes wrong with the communication.
 	 */
-	@NonNull
+	@Nonnull
 	public String getName() throws RemoteException;
 
 	/**
@@ -35,7 +35,7 @@ public interface RemoteDirectoryEntry extends Remote {
 	 * @throws RemoteException
 	 *             If anything goes wrong with the communication.
 	 */
-	@NonNull
+	@Nonnull
 	public Date getModificationDate() throws RemoteException;
 
 	/**

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteFile.java
----------------------------------------------------------------------
diff --git a/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteFile.java b/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteFile.java
index 6c65faa..e09466d 100644
--- a/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteFile.java
+++ b/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteFile.java
@@ -8,7 +8,7 @@ package org.taverna.server.localworker.remote;
 import java.io.IOException;
 import java.rmi.RemoteException;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
+import javax.annotation.Nonnull;
 
 /**
  * Represents a file in the working directory of a workflow instance run, or in
@@ -31,7 +31,7 @@ public interface RemoteFile extends RemoteDirectoryEntry {
 	 * @throws IOException
 	 *             If things go wrong reading the file.
 	 */
-	@NonNull
+	@Nonnull
 	byte[] getContents(int offset, int length) throws RemoteException,
 			IOException;
 
@@ -45,7 +45,7 @@ public interface RemoteFile extends RemoteDirectoryEntry {
 	 * @throws IOException
 	 *             If things go wrong writing the contents.
 	 */
-	void setContents(@NonNull byte[] data) throws RemoteException, IOException;
+	void setContents(@Nonnull byte[] data) throws RemoteException, IOException;
 
 	/**
 	 * Append the data to the file.
@@ -57,7 +57,7 @@ public interface RemoteFile extends RemoteDirectoryEntry {
 	 * @throws IOException
 	 *             If things go wrong writing the contents.
 	 */
-	void appendContents(@NonNull byte[] data) throws RemoteException,
+	void appendContents(@Nonnull byte[] data) throws RemoteException,
 			IOException;
 
 	/**
@@ -77,7 +77,7 @@ public interface RemoteFile extends RemoteDirectoryEntry {
 	 * @throws IOException
 	 *             If things go wrong during the copy.
 	 */
-	void copy(@NonNull RemoteFile sourceFile) throws RemoteException,
+	void copy(@Nonnull RemoteFile sourceFile) throws RemoteException,
 			IOException;
 
 	/**
@@ -85,7 +85,7 @@ public interface RemoteFile extends RemoteDirectoryEntry {
 	 * @throws RemoteException
 	 *             If anything goes wrong with the communication.
 	 */
-	@NonNull
+	@Nonnull
 	String getNativeName() throws RemoteException;
 
 	/**
@@ -93,6 +93,6 @@ public interface RemoteFile extends RemoteDirectoryEntry {
 	 * @throws RemoteException
 	 *             If anything goes wrong with the communication.
 	 */
-	@NonNull
+	@Nonnull
 	String getNativeHost() throws RemoteException;
 }

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteInput.java
----------------------------------------------------------------------
diff --git a/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteInput.java b/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteInput.java
index 838f491..7a7510c 100644
--- a/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteInput.java
+++ b/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteInput.java
@@ -8,8 +8,8 @@ package org.taverna.server.localworker.remote;
 import java.rmi.Remote;
 import java.rmi.RemoteException;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-import edu.umd.cs.findbugs.annotations.Nullable;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 
 /**
  * This represents the assignment of inputs to input ports of the workflow. Note
@@ -33,7 +33,7 @@ public interface RemoteInput extends Remote {
 	 * @throws RemoteException
 	 *             If anything goes wrong with the communication.
 	 */
-	@NonNull
+	@Nonnull
 	String getName() throws RemoteException;
 
 	/**
@@ -66,7 +66,7 @@ public interface RemoteInput extends Remote {
 	 * @throws RemoteException
 	 *             If anything goes wrong with the communication.
 	 */
-	void setFile(@NonNull String file) throws RemoteException;
+	void setFile(@Nonnull String file) throws RemoteException;
 
 	/**
 	 * Sets the value to use for this input. This overrides the use of the
@@ -77,7 +77,7 @@ public interface RemoteInput extends Remote {
 	 * @throws RemoteException
 	 *             If anything goes wrong with the communication.
 	 */
-	void setValue(@NonNull String value) throws RemoteException;
+	void setValue(@Nonnull String value) throws RemoteException;
 
 	/**
 	 * Sets the delimiter used to split this input port's value into a list.

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteListener.java
----------------------------------------------------------------------
diff --git a/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteListener.java b/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteListener.java
index 3bb5388..4001721 100644
--- a/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteListener.java
+++ b/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteListener.java
@@ -8,7 +8,7 @@ package org.taverna.server.localworker.remote;
 import java.rmi.Remote;
 import java.rmi.RemoteException;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
+import javax.annotation.Nonnull;
 
 /**
  * An event listener that is attached to a {@link RemoteSingleRun}.
@@ -21,7 +21,7 @@ public interface RemoteListener extends Remote {
 	 * @throws RemoteException
 	 *             If anything goes wrong with the communication.
 	 */
-	@NonNull
+	@Nonnull
 	public String getName() throws RemoteException;
 
 	/**
@@ -29,7 +29,7 @@ public interface RemoteListener extends Remote {
 	 * @throws RemoteException
 	 *             If anything goes wrong with the communication.
 	 */
-	@NonNull
+	@Nonnull
 	public String getType() throws RemoteException;
 
 	/**
@@ -37,7 +37,7 @@ public interface RemoteListener extends Remote {
 	 * @throws RemoteException
 	 *             If anything goes wrong with the communication.
 	 */
-	@NonNull
+	@Nonnull
 	public String getConfiguration() throws RemoteException;
 
 	/**
@@ -45,7 +45,7 @@ public interface RemoteListener extends Remote {
 	 * @throws RemoteException
 	 *             If anything goes wrong with the communication.
 	 */
-	@NonNull
+	@Nonnull
 	public String[] listProperties() throws RemoteException;
 
 	/**
@@ -58,8 +58,8 @@ public interface RemoteListener extends Remote {
 	 * @throws RemoteException
 	 *             If anything goes wrong with the communication.
 	 */
-	@NonNull
-	public String getProperty(@NonNull String propName) throws RemoteException;
+	@Nonnull
+	public String getProperty(@Nonnull String propName) throws RemoteException;
 
 	/**
 	 * Set the value of a particular property, which should be listed in the
@@ -72,6 +72,6 @@ public interface RemoteListener extends Remote {
 	 * @throws RemoteException
 	 *             If anything goes wrong with the communication.
 	 */
-	public void setProperty(@NonNull String propName, @NonNull String value)
+	public void setProperty(@Nonnull String propName, @Nonnull String value)
 			throws RemoteException;
 }

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteRunFactory.java
----------------------------------------------------------------------
diff --git a/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteRunFactory.java b/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteRunFactory.java
index 0a17802..fb3af6d 100644
--- a/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteRunFactory.java
+++ b/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteRunFactory.java
@@ -11,8 +11,8 @@ import java.util.UUID;
 
 import org.taverna.server.localworker.server.UsageRecordReceiver;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-import edu.umd.cs.findbugs.annotations.Nullable;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 
 /**
  * The main RMI-enabled interface for creating runs.
@@ -37,8 +37,8 @@ public interface RemoteRunFactory extends Remote {
 	 * @throws RemoteException
 	 *             If anything goes wrong with the communication.
 	 */
-	@NonNull
-	RemoteSingleRun make(@NonNull String workflow, @NonNull String creator,
+	@Nonnull
+	RemoteSingleRun make(@Nonnull String workflow, @Nonnull String creator,
 			@Nullable UsageRecordReceiver usageRecordReceiver,
 			@Nullable UUID masterID) throws RemoteException;
 
@@ -67,9 +67,9 @@ public interface RemoteRunFactory extends Remote {
 	 * @throws RemoteException
 	 *             If anything goes wrong with the communication.
 	 */
-	void setInteractionServiceDetails(@NonNull String host,
-			@NonNull String port, @NonNull String webdavPath,
-			@NonNull String feedPath) throws RemoteException;
+	void setInteractionServiceDetails(@Nonnull String host,
+			@Nonnull String port, @Nonnull String webdavPath,
+			@Nonnull String feedPath) throws RemoteException;
 
 	/**
 	 * Gets a count of the number of {@linkplain RemoteSingleRun workflow runs}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteSecurityContext.java
----------------------------------------------------------------------
diff --git a/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteSecurityContext.java b/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteSecurityContext.java
index dac84ca..35e6c09 100644
--- a/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteSecurityContext.java
+++ b/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteSecurityContext.java
@@ -10,7 +10,7 @@ import java.rmi.Remote;
 import java.rmi.RemoteException;
 import java.util.Map;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
+import javax.annotation.Nonnull;
 
 /**
  * Outline of the security context for a workflow run.
@@ -18,17 +18,17 @@ import edu.umd.cs.findbugs.annotations.NonNull;
  * @author Donal Fellows
  */
 public interface RemoteSecurityContext extends Remote {
-	void setKeystore(@NonNull byte[] keystore) throws RemoteException,
+	void setKeystore(@Nonnull byte[] keystore) throws RemoteException,
 			ImplementationException;
 
-	void setPassword(@NonNull char[] password) throws RemoteException,
+	void setPassword(@Nonnull char[] password) throws RemoteException,
 			ImplementationException;
 
-	void setTruststore(@NonNull byte[] truststore) throws RemoteException,
+	void setTruststore(@Nonnull byte[] truststore) throws RemoteException,
 			ImplementationException;
 
-	void setUriToAliasMap(@NonNull Map<URI, String> uriToAliasMap)
+	void setUriToAliasMap(@Nonnull Map<URI, String> uriToAliasMap)
 			throws RemoteException;
 
-	void setHelioToken(@NonNull String helioToken) throws RemoteException;
+	void setHelioToken(@Nonnull String helioToken) throws RemoteException;
 }

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteSingleRun.java
----------------------------------------------------------------------
diff --git a/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteSingleRun.java b/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteSingleRun.java
index 0f79363..19c2bcd 100644
--- a/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteSingleRun.java
+++ b/server-runinterface/src/main/java/org/taverna/server/localworker/remote/RemoteSingleRun.java
@@ -11,8 +11,8 @@ import java.rmi.RemoteException;
 import java.util.Date;
 import java.util.List;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-import edu.umd.cs.findbugs.annotations.Nullable;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 
 public interface RemoteSingleRun extends Remote {
 	/**
@@ -35,7 +35,7 @@ public interface RemoteSingleRun extends Remote {
 	 * @throws RemoteException
 	 *             If anything goes wrong with the communication.
 	 */
-	public void setInputBaclavaFile(@NonNull String filename)
+	public void setInputBaclavaFile(@Nonnull String filename)
 			throws RemoteException;
 
 	/**
@@ -43,7 +43,7 @@ public interface RemoteSingleRun extends Remote {
 	 * @throws RemoteException
 	 *             If anything goes wrong with the communication.
 	 */
-	@NonNull
+	@Nonnull
 	public List<RemoteInput> getInputs() throws RemoteException;
 
 	/**
@@ -55,8 +55,8 @@ public interface RemoteSingleRun extends Remote {
 	 * @throws RemoteException
 	 *             If anything goes wrong with the communication.
 	 */
-	@NonNull
-	public RemoteInput makeInput(@NonNull String name) throws RemoteException;
+	@Nonnull
+	public RemoteInput makeInput(@Nonnull String name) throws RemoteException;
 
 	/**
 	 * @return The file (relative to the working directory) to write the outputs
@@ -90,7 +90,7 @@ public interface RemoteSingleRun extends Remote {
 	 * @throws RemoteException
 	 *             If anything goes wrong with the communication.
 	 */
-	@NonNull
+	@Nonnull
 	public RemoteStatus getStatus() throws RemoteException;
 
 	/**
@@ -110,7 +110,7 @@ public interface RemoteSingleRun extends Remote {
 	 *             If the startup time of the workflow implementation exceeds a
 	 *             built-in threshold.
 	 */
-	public void setStatus(@NonNull RemoteStatus s)
+	public void setStatus(@Nonnull RemoteStatus s)
 			throws IllegalStateTransitionException, RemoteException,
 			ImplementationException, StillWorkingOnItException;
 
@@ -138,7 +138,7 @@ public interface RemoteSingleRun extends Remote {
 	 * @throws RemoteException
 	 *             If anything goes wrong with the communication.
 	 */
-	@NonNull
+	@Nonnull
 	public RemoteDirectory getWorkingDirectory() throws RemoteException;
 
 	/**
@@ -146,7 +146,7 @@ public interface RemoteSingleRun extends Remote {
 	 * @throws RemoteException
 	 *             If anything goes wrong with the communication.
 	 */
-	@NonNull
+	@Nonnull
 	public List<RemoteListener> getListeners() throws RemoteException;
 
 	/**
@@ -159,7 +159,7 @@ public interface RemoteSingleRun extends Remote {
 	 * @throws ImplementationException
 	 *             If something goes wrong when adding the listener.
 	 */
-	public void addListener(@NonNull RemoteListener listener)
+	public void addListener(@Nonnull RemoteListener listener)
 			throws RemoteException, ImplementationException;
 
 	/**
@@ -169,7 +169,7 @@ public interface RemoteSingleRun extends Remote {
 	 * @throws ImplementationException
 	 *             If something goes wrong when getting the context.
 	 */
-	@NonNull
+	@Nonnull
 	public RemoteSecurityContext getSecurityContext() throws RemoteException,
 			ImplementationException;
 
@@ -190,7 +190,7 @@ public interface RemoteSingleRun extends Remote {
 	 * @throws RemoteException
 	 *             If anything goes wrong with the communication.
 	 */
-	@NonNull
+	@Nonnull
 	public List<String> getListenerTypes() throws RemoteException;
 
 	/**
@@ -206,9 +206,9 @@ public interface RemoteSingleRun extends Remote {
 	 * @throws RemoteException
 	 *             If anything goes wrong with the communication.
 	 */
-	@NonNull
-	public RemoteListener makeListener(@NonNull String type,
-			@NonNull String configuration) throws RemoteException;
+	@Nonnull
+	public RemoteListener makeListener(@Nonnull String type,
+			@Nonnull String configuration) throws RemoteException;
 
 	/**
 	 * Configures the details to use when setting up the workflow run's
@@ -224,8 +224,8 @@ public interface RemoteSingleRun extends Remote {
 	 * @throws RemoteException
 	 *             If anything goes wrong with the communication.
 	 */
-	void setInteractionServiceDetails(@NonNull URL interactionFeed,
-			@NonNull URL webdavPath) throws RemoteException;
+	void setInteractionServiceDetails(@Nonnull URL interactionFeed,
+			@Nonnull URL webdavPath) throws RemoteException;
 
 	/**
 	 * A do-nothing method, used to check the general reachability of the

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-unix-forker/src/main/java/org/taverna/server/unixforker/Forker.java
----------------------------------------------------------------------
diff --git a/server-unix-forker/src/main/java/org/taverna/server/unixforker/Forker.java b/server-unix-forker/src/main/java/org/taverna/server/unixforker/Forker.java
index 5319a9e..f9dc632 100644
--- a/server-unix-forker/src/main/java/org/taverna/server/unixforker/Forker.java
+++ b/server-unix-forker/src/main/java/org/taverna/server/unixforker/Forker.java
@@ -21,7 +21,7 @@ import java.io.OutputStream;
 import java.io.OutputStreamWriter;
 import java.util.List;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
+import javax.annotation.Nonnull;
 
 /**
  * A simple class that forks off processes when asked to over its standard
@@ -43,7 +43,7 @@ public class Forker extends Thread {
 	 * @throws IOException
 	 *             If anything goes wrong.
 	 */
-	private static void loadPassword(@NonNull File passwordFile)
+	private static void loadPassword(@Nonnull File passwordFile)
 			throws IOException {
 		try {
 			err.println("attempting to load password from " + passwordFile);

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/ListenersREST.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/ListenersREST.java b/server-webapp/src/main/java/org/taverna/server/master/ListenersREST.java
index 1d7b89a..4b7d7f3 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/ListenersREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/ListenersREST.java
@@ -13,6 +13,7 @@ import static org.taverna.server.master.utils.RestUtils.opt;
 import java.util.ArrayList;
 import java.util.List;
 
+import javax.annotation.Nonnull;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriBuilder;
 import javax.ws.rs.core.UriInfo;
@@ -27,8 +28,6 @@ import org.taverna.server.master.rest.TavernaServerListenersREST;
 import org.taverna.server.master.utils.CallTimeLogger.PerfLogged;
 import org.taverna.server.master.utils.InvocationCounter.CallCounted;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-
 /**
  * RESTful interface to a single workflow run's event listeners.
  * 
@@ -71,7 +70,7 @@ abstract class ListenersREST implements TavernaServerListenersREST,
 		return makeListenerInterface().connect(l, run);
 	}
 
-	@NonNull
+	@Nonnull
 	protected abstract SingleListenerREST makeListenerInterface();
 
 	@Override

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java b/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java
index a55440a..b8e5a22 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/TavernaServer.java
@@ -36,6 +36,8 @@ import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.annotation.PreDestroy;
 import javax.annotation.Resource;
 import javax.annotation.security.DeclareRoles;
@@ -105,10 +107,6 @@ import org.taverna.server.master.utils.FilenameUtils;
 import org.taverna.server.master.utils.InvocationCounter.CallCounted;
 import org.taverna.server.port_description.OutputDescription;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-import edu.umd.cs.findbugs.annotations.Nullable;
-import edu.umd.cs.findbugs.annotations.SuppressWarnings;
-
 /**
  * The core implementation of the web application.
  * 
@@ -140,7 +138,6 @@ public abstract class TavernaServer implements TavernaServerSOAP,
 	@Resource
 	WebServiceContext jaxws;
 	@Context
-	@SuppressWarnings("UWF_UNWRITTEN_FIELD")
 	private HttpHeaders jaxrsHeaders;
 
 	// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
@@ -1243,7 +1240,7 @@ public abstract class TavernaServer implements TavernaServerSOAP,
 		return DEFAULT_HOST;
 	}
 
-	@NonNull
+	@Nonnull
 	private URI getPossiblyInsecureBaseUri() {
 		// See if JAX-RS can supply the info
 		UriInfo ui = getUriInfo();

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/TavernaServerSupport.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/TavernaServerSupport.java b/server-webapp/src/main/java/org/taverna/server/master/TavernaServerSupport.java
index 4072e67..c9a8dae 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/TavernaServerSupport.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/TavernaServerSupport.java
@@ -32,6 +32,8 @@ import java.util.Map;
 import java.util.Set;
 
 import javax.activation.DataHandler;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.annotation.PreDestroy;
 import javax.ws.rs.WebApplicationException;
 import javax.xml.bind.JAXBException;
@@ -77,10 +79,6 @@ import org.taverna.server.master.utils.FilenameUtils;
 import org.taverna.server.master.utils.InvocationCounter;
 import org.taverna.server.master.utils.UsernamePrincipal;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-import edu.umd.cs.findbugs.annotations.Nullable;
-import edu.umd.cs.findbugs.annotations.SuppressWarnings;
-
 /**
  * Web application support utilities.
  * 
@@ -365,7 +363,7 @@ public class TavernaServerSupport {
 	 * @throws NoUpdateException
 	 *             If the current user is not permitted to update the run.
 	 */
-	public void permitUpdate(@NonNull TavernaRun run) throws NoUpdateException {
+	public void permitUpdate(@Nonnull TavernaRun run) throws NoUpdateException {
 		if (isSuperUser()) {
 			accessLog
 					.warn("check for admin powers passed; elevated access rights granted for update");
@@ -405,7 +403,7 @@ public class TavernaServerSupport {
 	 * 
 	 * @return The identity of the user accessing the webapp.
 	 */
-	@NonNull
+	@Nonnull
 	public UsernamePrincipal getPrincipal() {
 		try {
 			Authentication auth = SecurityContextHolder.getContext()
@@ -446,8 +444,8 @@ public class TavernaServerSupport {
 	 *             If the workflow run doesn't exist or the current user doesn't
 	 *             have permission to see it.
 	 */
-	@NonNull
-	public TavernaRun getRun(@NonNull String name) throws UnknownRunException {
+	@Nonnull
+	public TavernaRun getRun(@Nonnull String name) throws UnknownRunException {
 		if (isSuperUser()) {
 			accessLog
 					.info("check for admin powers passed; elevated access rights granted for read");
@@ -481,9 +479,9 @@ public class TavernaServerSupport {
 	 *             If the run does not permit the current user to add listeners
 	 *             (or perform other types of update).
 	 */
-	@NonNull
-	public Listener makeListener(@NonNull TavernaRun run, @NonNull String type,
-			@NonNull String configuration) throws NoListenerException,
+	@Nonnull
+	public Listener makeListener(@Nonnull TavernaRun run, @Nonnull String type,
+			@Nonnull String configuration) throws NoListenerException,
 			NoUpdateException {
 		permitUpdate(run);
 		return listenerFactory.makeListener(run, type, configuration);
@@ -500,7 +498,7 @@ public class TavernaServerSupport {
 	 * @throws NoListenerException
 	 *             If no listener with that name exists.
 	 */
-	@NonNull
+	@Nonnull
 	public Listener getListener(TavernaRun run, String listenerName)
 			throws NoListenerException {
 		for (Listener l : run.getListeners())
@@ -526,7 +524,7 @@ public class TavernaServerSupport {
 	 * @throws UnknownRunException
 	 *             If no run with that name exists.
 	 */
-	@NonNull
+	@Nonnull
 	public String getProperty(String runName, String listenerName,
 			String propertyName) throws NoListenerException,
 			UnknownRunException {
@@ -548,7 +546,7 @@ public class TavernaServerSupport {
 	 *             If no listener with that name exists, or no property with
 	 *             that name exists.
 	 */
-	@NonNull
+	@Nonnull
 	public String getProperty(TavernaRun run, String listenerName,
 			String propertyName) throws NoListenerException {
 		return getListener(run, listenerName).getProperty(propertyName);
@@ -565,9 +563,9 @@ public class TavernaServerSupport {
 	 *            The name of the user to look up the permission for.
 	 * @return A permission description.
 	 */
-	@NonNull
-	public Permission getPermission(@NonNull TavernaSecurityContext context,
-			@NonNull String userName) {
+	@Nonnull
+	public Permission getPermission(@Nonnull TavernaSecurityContext context,
+			@Nonnull String userName) {
 		if (context.getPermittedDestroyers().contains(userName))
 			return Permission.Destroy;
 		if (context.getPermittedUpdaters().contains(userName))
@@ -592,7 +590,6 @@ public class TavernaServerSupport {
 	 *            {@link Permission#Destroy}; this is always enforced before
 	 *            checking for other permissions.
 	 */
-	@SuppressWarnings("SF_SWITCH_FALLTHROUGH")
 	public void setPermission(TavernaSecurityContext context, String userName,
 			Permission permission) {
 		Set<String> permSet;
@@ -674,7 +671,7 @@ public class TavernaServerSupport {
 	 *             If the run is unknown (e.g., because it is already
 	 *             destroyed).
 	 */
-	public void unregisterRun(@NonNull String runName, @NonNull TavernaRun run)
+	public void unregisterRun(@Nonnull String runName, @Nonnull TavernaRun run)
 			throws NoDestroyException, UnknownRunException {
 		if (run == null)
 			run = getRun(runName);
@@ -697,8 +694,8 @@ public class TavernaServerSupport {
 	 *             (Note that lifespan management requires the ability to
 	 *             destroy.)
 	 */
-	@NonNull
-	public Date updateExpiry(@NonNull TavernaRun run, @NonNull Date date)
+	@Nonnull
+	public Date updateExpiry(@Nonnull TavernaRun run, @Nonnull Date date)
 			throws NoDestroyException {
 		permitDestroy(run);
 		run.setExpiry(date);
@@ -821,8 +818,8 @@ public class TavernaServerSupport {
 	 * @return The content type. If all else fails, produces good old
 	 *         "application/octet-stream".
 	 */
-	@NonNull
-	public String getEstimatedContentType(@NonNull File f) {
+	@Nonnull
+	public String getEstimatedContentType(@Nonnull File f) {
 		String name = f.getName();
 		for (int idx = name.indexOf('.'); idx != -1; idx = name.indexOf('.',
 				idx + 1)) {
@@ -830,7 +827,7 @@ public class TavernaServerSupport {
 			if (mt != null)
 				return mt;
 		}
-		@NonNull
+		@Nonnull
 		String type = getExtensionMimeTypes(name);
 		if (!type.equals(UNKNOWN_MIME_TYPE))
 			return type;
@@ -909,7 +906,7 @@ public class TavernaServerSupport {
 		return fc;
 	}
 
-	@NonNull
+	@Nonnull
 	public List<Capability> getCapabilities() {
 		return capabilitySource.getCapabilities();
 	}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/admin/Admin.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/admin/Admin.java b/server-webapp/src/main/java/org/taverna/server/master/admin/Admin.java
index c0cf0f9..184c7b5 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/admin/Admin.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/admin/Admin.java
@@ -29,9 +29,9 @@ import static org.taverna.server.master.admin.Paths.REG_PORT;
 import static org.taverna.server.master.admin.Paths.REG_WAIT;
 import static org.taverna.server.master.admin.Paths.ROOT;
 import static org.taverna.server.master.admin.Paths.RUNS;
+import static org.taverna.server.master.admin.Paths.RUN_LIMIT;
 import static org.taverna.server.master.admin.Paths.STARTUP;
 import static org.taverna.server.master.admin.Paths.TOTAL_RUNS;
-import static org.taverna.server.master.admin.Paths.RUN_LIMIT;
 import static org.taverna.server.master.admin.Paths.URS;
 import static org.taverna.server.master.admin.Paths.UR_FILE;
 import static org.taverna.server.master.admin.Paths.USER;
@@ -45,6 +45,7 @@ import java.net.URI;
 import java.util.ArrayList;
 import java.util.List;
 
+import javax.annotation.Nonnull;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.DELETE;
 import javax.ws.rs.GET;
@@ -66,8 +67,6 @@ import org.ogf.usage.JobUsageRecord;
 import org.taverna.server.master.common.Uri;
 import org.taverna.server.master.common.VersionedElement;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-
 /**
  * The administration interface for Taverna Server.
  * 
@@ -84,7 +83,7 @@ public interface Admin {
 	@GET
 	@Path(ROOT)
 	@Produces("text/html")
-	@NonNull
+	@Nonnull
 	Response getUserInterface() throws IOException;
 
 	/**
@@ -111,7 +110,7 @@ public interface Admin {
 	@GET
 	@Path(ROOT)
 	@Produces({ XML, JSON })
-	@NonNull
+	@Nonnull
 	AdminDescription getDescription(@Context UriInfo ui);
 
 	/** What HTTP methods may we use? */
@@ -221,7 +220,7 @@ public interface Admin {
 	@Path(UR_FILE)
 	@Produces(PLAIN)
 	@Description("What file to dump usage records to.")
-	@NonNull
+	@Nonnull
 	String getURFile();
 
 	/**
@@ -236,8 +235,8 @@ public interface Admin {
 	@Consumes(PLAIN)
 	@Produces(PLAIN)
 	@Description("What file to dump usage records to.")
-	@NonNull
-	String setURFile(@NonNull String urFile);
+	@Nonnull
+	String setURFile(@Nonnull String urFile);
 
 	/** What HTTP methods may we use? */
 	@OPTIONS
@@ -306,7 +305,7 @@ public interface Admin {
 	@Path(REG_JAR)
 	@Produces(PLAIN)
 	@Description("What is the full pathname of the server's custom RMI registry executable JAR file?")
-	@NonNull
+	@Nonnull
 	String getRegistryJar();
 
 	/**
@@ -321,8 +320,8 @@ public interface Admin {
 	@Consumes(PLAIN)
 	@Produces(PLAIN)
 	@Description("What is the full pathname of the server's custom RMI registry executable JAR file?")
-	@NonNull
-	String setRegistryJar(@NonNull String registryJar);
+	@Nonnull
+	String setRegistryJar(@Nonnull String registryJar);
 
 	/** What HTTP methods may we use? */
 	@OPTIONS
@@ -339,7 +338,7 @@ public interface Admin {
 	@Path(REG_HOST)
 	@Produces(PLAIN)
 	@Description("Where is the RMI registry?")
-	@NonNull
+	@Nonnull
 	String getRegistryHost();
 
 	/**
@@ -354,8 +353,8 @@ public interface Admin {
 	@Consumes(PLAIN)
 	@Produces(PLAIN)
 	@Description("Where is the RMI registry?")
-	@NonNull
-	String setRegistryHost(@NonNull String registryHost);
+	@Nonnull
+	String setRegistryHost(@Nonnull String registryHost);
 
 	/** What HTTP methods may we use? */
 	@OPTIONS
@@ -513,7 +512,7 @@ public interface Admin {
 	@Path(JAVA)
 	@Produces(PLAIN)
 	@Description("Which Java binary should be used for execution of subprocesses?")
-	@NonNull
+	@Nonnull
 	String getJavaBinary();
 
 	/**
@@ -528,8 +527,8 @@ public interface Admin {
 	@Consumes(PLAIN)
 	@Produces(PLAIN)
 	@Description("Which Java binary should be used for execution of subprocesses?")
-	@NonNull
-	String setJavaBinary(@NonNull String javaBinary);
+	@Nonnull
+	String setJavaBinary(@Nonnull String javaBinary);
 
 	/** What HTTP methods may we use? */
 	@OPTIONS
@@ -546,7 +545,7 @@ public interface Admin {
 	@Path(ARGS)
 	@Produces({ XML, JSON })
 	@Description("What extra arguments should be supplied to Java subprocesses?")
-	@NonNull
+	@Nonnull
 	StringList getExtraArguments();
 
 	/**
@@ -561,8 +560,8 @@ public interface Admin {
 	@Consumes(XML)
 	@Produces({ XML, JSON })
 	@Description("What extra arguments should be supplied to Java subprocesses?")
-	@NonNull
-	StringList setExtraArguments(@NonNull StringList extraArguments);
+	@Nonnull
+	StringList setExtraArguments(@Nonnull StringList extraArguments);
 
 	/** What HTTP methods may we use? */
 	@OPTIONS
@@ -579,7 +578,7 @@ public interface Admin {
 	@Path(JAR_WORKER)
 	@Produces(PLAIN)
 	@Description("What is the full pathname of the server's per-user worker executable JAR file?")
-	@NonNull
+	@Nonnull
 	String getServerWorkerJar();
 
 	/**
@@ -594,8 +593,8 @@ public interface Admin {
 	@Consumes(PLAIN)
 	@Produces(PLAIN)
 	@Description("What is the full pathname of the server's per-user worker executable JAR file?")
-	@NonNull
-	String setServerWorkerJar(@NonNull String serverWorkerJar);
+	@Nonnull
+	String setServerWorkerJar(@Nonnull String serverWorkerJar);
 
 	/** What HTTP methods may we use? */
 	@OPTIONS
@@ -612,7 +611,7 @@ public interface Admin {
 	@Path(EXEC_WF)
 	@Produces(PLAIN)
 	@Description("What is the full pathname of the core Taverna executeWorkflow script?")
-	@NonNull
+	@Nonnull
 	String getExecuteWorkflowScript();
 
 	/**
@@ -627,8 +626,8 @@ public interface Admin {
 	@Consumes(PLAIN)
 	@Produces(PLAIN)
 	@Description("What is the full pathname of the core Taverna executeWorkflow script?")
-	@NonNull
-	String setExecuteWorkflowScript(@NonNull String executeWorkflowScript);
+	@Nonnull
+	String setExecuteWorkflowScript(@Nonnull String executeWorkflowScript);
 
 	/** What HTTP methods may we use? */
 	@OPTIONS
@@ -710,7 +709,7 @@ public interface Admin {
 	@Path(PASSFILE)
 	@Produces(PLAIN)
 	@Description("What is the full pathname of the file containing the password used for impersonating other users? (On Unix, this is the password for the deployment user to use \"sudo\".)")
-	@NonNull
+	@Nonnull
 	String getRunasPasswordFile();
 
 	/**
@@ -726,8 +725,8 @@ public interface Admin {
 	@Consumes(PLAIN)
 	@Produces(PLAIN)
 	@Description("What is the full pathname of the file containing the password used for impersonating other users? (On Unix, this is the password for the deployment user to use \"sudo\".)")
-	@NonNull
-	String setRunasPasswordFile(@NonNull String runasPasswordFile);
+	@Nonnull
+	String setRunasPasswordFile(@Nonnull String runasPasswordFile);
 
 	/** What HTTP methods may we use? */
 	@OPTIONS
@@ -744,7 +743,7 @@ public interface Admin {
 	@Path(JAR_FORKER)
 	@Produces(PLAIN)
 	@Description("What is the full pathname of the server's special authorized \"forker\" executable JAR file?")
-	@NonNull
+	@Nonnull
 	String getServerForkerJar();
 
 	/**
@@ -759,8 +758,8 @@ public interface Admin {
 	@Consumes(PLAIN)
 	@Produces(PLAIN)
 	@Description("What is the full pathname of the server's special authorized \"forker\" executable JAR file?")
-	@NonNull
-	String setServerForkerJar(@NonNull String serverForkerJar);
+	@Nonnull
+	String setServerForkerJar(@Nonnull String serverForkerJar);
 
 	/** What HTTP methods may we use? */
 	@OPTIONS
@@ -882,7 +881,7 @@ public interface Admin {
 	@Consumes(XML)
 	@Produces({ XML, JSON })
 	@Description("What are the current list of workflow URIs that may be started? Empty means allow any, including user-supplied workflows.")
-	StringList setPermittedWorkflowURIs(@NonNull StringList permitted);
+	StringList setPermittedWorkflowURIs(@Nonnull StringList permitted);
 
 	/** What HTTP methods may we use? */
 	@OPTIONS
@@ -906,7 +905,7 @@ public interface Admin {
 	@Path(USERS)
 	@Consumes(XML)
 	@Description("Create a user.")
-	Response useradd(UserDesc userdesc, @NonNull @Context UriInfo ui);
+	Response useradd(UserDesc userdesc, @Nonnull @Context UriInfo ui);
 
 	@PUT
 	@Path(USER)

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/api/TavernaServerBean.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/api/TavernaServerBean.java b/server-webapp/src/main/java/org/taverna/server/master/api/TavernaServerBean.java
index e3f9b53..5a14fb6 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/api/TavernaServerBean.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/api/TavernaServerBean.java
@@ -5,6 +5,8 @@
  */
 package org.taverna.server.master.api;
 
+import javax.annotation.Nonnull;
+
 import org.springframework.beans.factory.annotation.Required;
 import org.taverna.server.master.ContentsDescriptorBuilder;
 import org.taverna.server.master.TavernaServerSupport;
@@ -18,8 +20,6 @@ import org.taverna.server.master.rest.TavernaServerREST;
 import org.taverna.server.master.soap.TavernaServerSOAP;
 import org.taverna.server.master.utils.FilenameUtils;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-
 /**
  * The methods of the webapp that are accessed by beans other than itself or
  * those which are told directly about it. This exists so that an AOP proxy can
@@ -34,21 +34,21 @@ public interface TavernaServerBean extends TavernaServerSOAP, TavernaServerREST,
 	 *            The policy being installed by Spring.
 	 */
 	@Required
-	void setPolicy(@NonNull Policy policy);
+	void setPolicy(@Nonnull Policy policy);
 
 	/**
 	 * @param runStore
 	 *            The run store being installed by Spring.
 	 */
 	@Required
-	void setRunStore(@NonNull RunStore runStore);
+	void setRunStore(@Nonnull RunStore runStore);
 
 	/**
 	 * @param converter
 	 *            The filename converter being installed by Spring.
 	 */
 	@Required
-	void setFileUtils(@NonNull FilenameUtils converter);
+	void setFileUtils(@Nonnull FilenameUtils converter);
 
 	/**
 	 * @param cdBuilder
@@ -56,28 +56,28 @@ public interface TavernaServerBean extends TavernaServerSOAP, TavernaServerREST,
 	 */
 	@Required
 	void setContentsDescriptorBuilder(
-			@NonNull ContentsDescriptorBuilder cdBuilder);
+			@Nonnull ContentsDescriptorBuilder cdBuilder);
 
 	/**
 	 * @param notificationEngine
 	 *            The notification engine being installed by Spring.
 	 */
 	@Required
-	void setNotificationEngine(@NonNull NotificationEngine notificationEngine);
+	void setNotificationEngine(@Nonnull NotificationEngine notificationEngine);
 
 	/**
 	 * @param support
 	 *            The support bean being installed by Spring.
 	 */
 	@Required
-	void setSupport(@NonNull TavernaServerSupport support);
+	void setSupport(@Nonnull TavernaServerSupport support);
 
 	/**
 	 * @param eventSource
 	 *            The event source bean being installed by Spring.
 	 */
 	@Required
-	void setEventSource(@NonNull EventDAO eventSource);
+	void setEventSource(@Nonnull EventDAO eventSource);
 
 	/**
 	 * The nastier parts of security initialisation in SOAP calls, which we want
@@ -87,7 +87,7 @@ public interface TavernaServerBean extends TavernaServerSOAP, TavernaServerREST,
 	 *            The context to configure.
 	 * @return True if we did <i>not</i> initialise things.
 	 */
-	boolean initObsoleteSOAPSecurity(@NonNull TavernaSecurityContext context);
+	boolean initObsoleteSOAPSecurity(@Nonnull TavernaSecurityContext context);
 
 	/**
 	 * The nastier parts of security initialisation in REST calls, which we want
@@ -97,5 +97,5 @@ public interface TavernaServerBean extends TavernaServerSOAP, TavernaServerREST,
 	 *            The context to configure.
 	 * @return True if we did <i>not</i> initialise things.
 	 */
-	boolean initObsoleteRESTSecurity(@NonNull TavernaSecurityContext context);
+	boolean initObsoleteRESTSecurity(@Nonnull TavernaSecurityContext context);
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/common/Credential.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/common/Credential.java b/server-webapp/src/main/java/org/taverna/server/master/common/Credential.java
index d1ea5fd..5c16e79 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/common/Credential.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/common/Credential.java
@@ -20,7 +20,7 @@ import javax.xml.bind.annotation.XmlSeeAlso;
 import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.XmlType;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
+import javax.annotation.Nonnull;
 
 /**
  * A description of a private credential. This description is characterised by a
@@ -65,7 +65,7 @@ public abstract class Credential implements Serializable {
 		return equals((Credential) o);
 	}
 
-	protected boolean equals(@NonNull Credential c) {
+	protected boolean equals(@Nonnull Credential c) {
 		return id.equals(c.id);
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/common/Uri.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/common/Uri.java b/server-webapp/src/main/java/org/taverna/server/master/common/Uri.java
index f96572a..d6d057c 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/common/Uri.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/common/Uri.java
@@ -25,8 +25,7 @@ import org.apache.commons.logging.Log;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.web.PortMapper;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-import edu.umd.cs.findbugs.annotations.SuppressWarnings;
+import javax.annotation.Nonnull;
 
 /**
  * A class that makes it simpler to work with an element with a {@link URI} in
@@ -56,7 +55,7 @@ public class Uri {
 	 * @param ref
 	 *            Where to point to.
 	 */
-	public Uri(@NonNull URI ref) {
+	public Uri(@Nonnull URI ref) {
 		this.ref = secure(ref);
 	}
 
@@ -68,7 +67,7 @@ public class Uri {
 	 * @param strings
 	 *            The parameters to the factory.
 	 */
-	public Uri(@NonNull UriBuilder ub, String... strings) {
+	public Uri(@Nonnull UriBuilder ub, String... strings) {
 		ref = secure(ub).build((Object[]) strings);
 	}
 
@@ -82,7 +81,7 @@ public class Uri {
 	 * @param strings
 	 *            The parameters to the factory.
 	 */
-	public Uri(@NonNull UriInfo ui, @NonNull String path, String... strings) {
+	public Uri(@Nonnull UriInfo ui, @Nonnull String path, String... strings) {
 		this(ui, true, path, strings);
 	}
 
@@ -98,7 +97,7 @@ public class Uri {
 	 * @param strings
 	 *            The parameters to the factory.
 	 */
-	public Uri(@NonNull UriInfo ui, boolean secure, @NonNull String path,
+	public Uri(@Nonnull UriInfo ui, boolean secure, @Nonnull String path,
 			String... strings) {
 		UriBuilder ub = ui.getAbsolutePathBuilder();
 		if (secure) {
@@ -190,27 +189,25 @@ public class Uri {
 			return null;
 		}
 
-		@SuppressWarnings
 		public Rewriter() {
 			instance = this;
 		}
 
 		@PreDestroy
-		@SuppressWarnings
 		public void done() {
 			instance = null;
 			Uri.log = null;
 		}
 
-		@NonNull
-		URI rewrite(@NonNull String url) {
+		@Nonnull
+		URI rewrite(@Nonnull String url) {
 			if (rewriteTarget != null)
 				url = url.replaceFirst(rewriteRE, rewriteTarget);
 			return URI.create(url);
 		}
 
-		@NonNull
-		public UriBuilder getSecuredUriBuilder(@NonNull UriBuilder uribuilder) {
+		@Nonnull
+		public UriBuilder getSecuredUriBuilder(@Nonnull UriBuilder uribuilder) {
 			if (suppress)
 				return uribuilder.clone();
 			UriBuilder ub = new RewritingUriBuilder(uribuilder);

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/identity/WorkflowInternalAuthProvider.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/identity/WorkflowInternalAuthProvider.java b/server-webapp/src/main/java/org/taverna/server/master/identity/WorkflowInternalAuthProvider.java
index d81e692..d8361e5 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/identity/WorkflowInternalAuthProvider.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/identity/WorkflowInternalAuthProvider.java
@@ -17,6 +17,7 @@ import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.Set;
 
+import javax.annotation.Nonnull;
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
 import javax.servlet.http.HttpServletRequest;
@@ -44,8 +45,6 @@ import org.taverna.server.master.utils.CallTimeLogger.PerfLogged;
 import org.taverna.server.master.utils.UsernamePrincipal;
 import org.taverna.server.master.worker.RunDatabaseDAO;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-
 /**
  * A special authentication provider that allows a workflow to authenticate to
  * itself. This is used to allow the workflow to publish to its own interaction
@@ -132,9 +131,9 @@ public class WorkflowInternalAuthProvider extends
 	 *             generic AuthenticationException.
 	 */
 	protected void additionalAuthenticationChecks(UserDetails userRecord,
-			@NonNull Object principal, @NonNull Object credentials)
+			@Nonnull Object principal, @Nonnull Object credentials)
 			throws Exception {
-		@NonNull
+		@Nonnull
 		HttpServletRequest req = ((ServletRequestAttributes) currentRequestAttributes())
 				.getRequest();
 
@@ -189,7 +188,7 @@ public class WorkflowInternalAuthProvider extends
 	 *             If something goes wrong. It will be logged and converted into
 	 *             a general AuthenticationException.
 	 */
-	@NonNull
+	@Nonnull
 	protected UserDetails retrieveUser(String username, Object details)
 			throws Exception {
 		if (details == null || !(details instanceof WebAuthenticationDetails))
@@ -234,7 +233,7 @@ public class WorkflowInternalAuthProvider extends
 	}
 
 	@Override
-	@NonNull
+	@Nonnull
 	@PerfLogged
 	protected final UserDetails retrieveUser(String username,
 			UsernamePasswordAuthenticationToken token) {

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/interfaces/Input.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/interfaces/Input.java b/server-webapp/src/main/java/org/taverna/server/master/interfaces/Input.java
index b6ce3e5..31cb7cb 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/interfaces/Input.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/interfaces/Input.java
@@ -5,13 +5,13 @@
  */
 package org.taverna.server.master.interfaces;
 
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
 import org.taverna.server.master.common.Status;
 import org.taverna.server.master.exceptions.BadStateChangeException;
 import org.taverna.server.master.exceptions.FilesystemAccessException;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-import edu.umd.cs.findbugs.annotations.Nullable;
-
 /**
  * This represents the assignment of inputs to input ports of the workflow. Note
  * that the <tt>file</tt> and <tt>value</tt> properties are never set at the
@@ -30,7 +30,7 @@ public interface Input {
 	/**
 	 * @return The name of this input port. This may not be changed.
 	 */
-	@NonNull
+	@Nonnull
 	public String getName();
 
 	/**

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/interfaces/MessageDispatcher.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/interfaces/MessageDispatcher.java b/server-webapp/src/main/java/org/taverna/server/master/interfaces/MessageDispatcher.java
index d324d21..37dbf2c 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/interfaces/MessageDispatcher.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/interfaces/MessageDispatcher.java
@@ -5,7 +5,7 @@
  */
 package org.taverna.server.master.interfaces;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
+import javax.annotation.Nonnull;
 
 /**
  * The interface supported by all notification message dispatchers.
@@ -39,7 +39,7 @@ public interface MessageDispatcher {
 	 * @throws Exception
 	 *             If anything goes wrong.
 	 */
-	void dispatch(@NonNull TavernaRun originator,
-			@NonNull String messageSubject, @NonNull String messageContent,
-			@NonNull String targetParameter) throws Exception;
+	void dispatch(@Nonnull TavernaRun originator,
+			@Nonnull String messageSubject, @Nonnull String messageContent,
+			@Nonnull String targetParameter) throws Exception;
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java b/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java
index cc0a9fb..4394b4b 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/localworker/AbstractRemoteRunFactory.java
@@ -266,8 +266,7 @@ public abstract class AbstractRemoteRunFactory extends RunFactoryConfiguration
 	 * Configures the Java security model. Not currently used, as it is
 	 * viciously difficult to get right!
 	 */
-	// @SuppressWarnings("unused")
-	@edu.umd.cs.findbugs.annotations.SuppressWarnings("UPM_UNCALLED_PRIVATE_METHOD")
+	@SuppressWarnings("unused")
 	private static void installSecurityManager() {
 		if (getSecurityManager() == null) {
 			setProperty("java.security.policy", AbstractRemoteRunFactory.class
@@ -388,8 +387,6 @@ public abstract class AbstractRemoteRunFactory extends RunFactoryConfiguration
 	 */
 	protected UsageRecordReceiver makeURReciver(UsernamePrincipal creator) {
 		try {
-			@edu.umd.cs.findbugs.annotations.SuppressWarnings({
-					"SE_BAD_FIELD_INNER_CLASS", "SE_NO_SERIALVERSIONID" })
 			@SuppressWarnings("serial")
 			class URReceiver extends UnicastRemoteObject implements
 					UsageRecordReceiver {

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java b/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
index 521742d..0449471 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/localworker/ForkRunFactory.java
@@ -24,6 +24,7 @@ import java.rmi.RemoteException;
 import java.util.Calendar;
 import java.util.UUID;
 
+import javax.annotation.Nonnull;
 import javax.annotation.PostConstruct;
 import javax.xml.bind.JAXBException;
 
@@ -37,8 +38,6 @@ import org.taverna.server.master.exceptions.NoCreateException;
 import org.taverna.server.master.factories.ConfigurableRunFactory;
 import org.taverna.server.master.utils.UsernamePrincipal;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-
 /**
  * A simple factory for workflow runs that forks runs from a subprocess.
  * 
@@ -346,8 +345,8 @@ public class ForkRunFactory extends AbstractRemoteRunFactory implements
 	 * @throws RemoteException
 	 *             If anything fails (communications error, etc.)
 	 */
-	private RemoteSingleRun getRealRun(@NonNull UsernamePrincipal creator,
-			@NonNull String wf, UUID id) throws RemoteException {
+	private RemoteSingleRun getRealRun(@Nonnull UsernamePrincipal creator,
+			@Nonnull String wf, UUID id) throws RemoteException {
 		String globaluser = "Unknown Person";
 		if (creator != null)
 			globaluser = creator.getName();

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java b/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
index 6512149..6edf128 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/localworker/IdAwareForkRunFactory.java
@@ -34,6 +34,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 
+import javax.annotation.Nonnull;
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
 import javax.xml.bind.JAXBException;
@@ -52,8 +53,6 @@ import org.taverna.server.master.factories.ConfigurableRunFactory;
 import org.taverna.server.master.interfaces.LocalIdentityMapper;
 import org.taverna.server.master.utils.UsernamePrincipal;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-
 /**
  * A simple factory for workflow runs that forks runs from a subprocess.
  * 
@@ -272,8 +271,8 @@ public class IdAwareForkRunFactory extends AbstractRemoteRunFactory implements
 	 * @throws RemoteException
 	 *             If anything fails (communications error, etc.)
 	 */
-	private RemoteSingleRun getRealRun(@NonNull UsernamePrincipal creator,
-			@NonNull String username, @NonNull String wf, UUID id)
+	private RemoteSingleRun getRealRun(@Nonnull UsernamePrincipal creator,
+			@Nonnull String username, @Nonnull String wf, UUID id)
 			throws RemoteException {
 		String globaluser = "Unknown Person";
 		if (creator != null)

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/notification/atom/EventDAO.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/notification/atom/EventDAO.java b/server-webapp/src/main/java/org/taverna/server/master/notification/atom/EventDAO.java
index eec44f7..ac33133 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/notification/atom/EventDAO.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/notification/atom/EventDAO.java
@@ -12,6 +12,7 @@ import java.util.List;
 import java.util.concurrent.ArrayBlockingQueue;
 import java.util.concurrent.BlockingQueue;
 
+import javax.annotation.Nonnull;
 import javax.jdo.annotations.PersistenceAware;
 
 import org.apache.commons.logging.Log;
@@ -24,8 +25,6 @@ import org.taverna.server.master.interfaces.UriBuilderFactory;
 import org.taverna.server.master.utils.JDOSupport;
 import org.taverna.server.master.utils.UsernamePrincipal;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-
 /**
  * The database interface that supports the event feed.
  * 
@@ -63,9 +62,9 @@ public class EventDAO extends JDOSupport<Event> implements MessageDispatcher {
 	 *            The identity of the user to get the events for.
 	 * @return A copy of the list of events currently known about.
 	 */
-	@NonNull
+	@Nonnull
 	@WithinSingleTransaction
-	public List<Event> getEvents(@NonNull UsernamePrincipal user) {
+	public List<Event> getEvents(@Nonnull UsernamePrincipal user) {
 		@SuppressWarnings("unchecked")
 		List<String> ids = (List<String>) namedQuery("eventsForUser").execute(
 				user.getName());
@@ -89,9 +88,9 @@ public class EventDAO extends JDOSupport<Event> implements MessageDispatcher {
 	 *            The handle of the event to look up.
 	 * @return A copy of the event.
 	 */
-	@NonNull
+	@Nonnull
 	@WithinSingleTransaction
-	public Event getEvent(@NonNull UsernamePrincipal user, @NonNull String id) {
+	public Event getEvent(@Nonnull UsernamePrincipal user, @Nonnull String id) {
 		@SuppressWarnings("unchecked")
 		List<String> ids = (List<String>) namedQuery("eventForUserAndId")
 				.execute(user.getName(), id);
@@ -111,7 +110,7 @@ public class EventDAO extends JDOSupport<Event> implements MessageDispatcher {
 	 *            The identifier of the event to delete.
 	 */
 	@WithinSingleTransaction
-	public void deleteEventById(@NonNull String id) {
+	public void deleteEventById(@Nonnull String id) {
 		delete(getById(id));
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerDirectoryREST.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerDirectoryREST.java b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerDirectoryREST.java
index b280e4c..ea2f776 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerDirectoryREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerDirectoryREST.java
@@ -18,6 +18,7 @@ import java.io.InputStream;
 import java.net.URI;
 import java.util.List;
 
+import javax.annotation.Nonnull;
 import javax.annotation.security.RolesAllowed;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.DELETE;
@@ -42,8 +43,6 @@ import org.taverna.server.master.exceptions.NoUpdateException;
 import org.taverna.server.master.interfaces.Directory;
 import org.taverna.server.master.interfaces.File;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-
 /**
  * Representation of how a workflow run's working directory tree looks.
  * 
@@ -65,8 +64,8 @@ public interface TavernaServerDirectoryREST {
 	@GET
 	@Path("/")
 	@Description("Describes the working directory of the workflow run.")
-	@NonNull
-	DirectoryContents getDescription(@NonNull @Context UriInfo ui)
+	@Nonnull
+	DirectoryContents getDescription(@Nonnull @Context UriInfo ui)
 			throws FilesystemAccessException;
 
 	/** Get an outline of the operations supported. */
@@ -100,10 +99,10 @@ public interface TavernaServerDirectoryREST {
 	@Produces({ XML, JSON, BYTES, ZIP, WILDCARD })
 	@Description("Gives a description of the named entity in or beneath the "
 			+ "working directory of the workflow run (either a Directory or File).")
-	@NonNull
+	@Nonnull
 	Response getDirectoryOrFileContents(
-			@NonNull @PathParam("path") List<PathSegment> path,
-			@NonNull @Context UriInfo ui, @NonNull @Context HttpHeaders headers)
+			@Nonnull @PathParam("path") List<PathSegment> path,
+			@Nonnull @Context UriInfo ui, @Nonnull @Context HttpHeaders headers)
 			throws NoDirectoryEntryException, FilesystemAccessException,
 			NegotiationFailedException;
 
@@ -133,11 +132,11 @@ public interface TavernaServerDirectoryREST {
 			+ "directory of the workflow run, or creates or updates a file's "
 			+ "contents, where that file is in or below the working directory "
 			+ "of a workflow run.")
-	@NonNull
+	@Nonnull
 	Response makeDirectoryOrUpdateFile(
-			@NonNull @PathParam("path") List<PathSegment> parent,
-			@NonNull MakeOrUpdateDirEntry operation,
-			@NonNull @Context UriInfo ui) throws NoUpdateException,
+			@Nonnull @PathParam("path") List<PathSegment> parent,
+			@Nonnull MakeOrUpdateDirEntry operation,
+			@Nonnull @Context UriInfo ui) throws NoUpdateException,
 			FilesystemAccessException, NoDirectoryEntryException;
 
 	/**
@@ -165,7 +164,7 @@ public interface TavernaServerDirectoryREST {
 	@Description("Creates or updates a file in a particular location beneath the "
 			+ "working directory of the workflow run with the contents of a "
 			+ "publicly readable URL.")
-	@NonNull
+	@Nonnull
 	Response setFileContentsFromURL(@PathParam("path") List<PathSegment> file,
 			List<URI> referenceList, @Context UriInfo ui)
 			throws NoDirectoryEntryException, NoUpdateException,
@@ -194,7 +193,7 @@ public interface TavernaServerDirectoryREST {
 	@Consumes({ BYTES, WILDCARD })
 	@Description("Creates or updates a file in a particular location beneath the "
 			+ "working directory of the workflow run.")
-	@NonNull
+	@Nonnull
 	Response setFileContents(@PathParam("path") List<PathSegment> file,
 			InputStream contents, @Context UriInfo ui)
 			throws NoDirectoryEntryException, NoUpdateException,
@@ -218,7 +217,7 @@ public interface TavernaServerDirectoryREST {
 	@Path("{path:.*}")
 	@Description("Deletes a file or directory that is in or below the working "
 			+ "directory of a workflow run.")
-	@NonNull
+	@Nonnull
 	Response destroyDirectoryEntry(@PathParam("path") List<PathSegment> path)
 			throws NoUpdateException, FilesystemAccessException,
 			NoDirectoryEntryException;

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerInputREST.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerInputREST.java b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerInputREST.java
index 2b8db65..1104212 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerInputREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerInputREST.java
@@ -16,6 +16,7 @@ import static org.taverna.server.master.rest.TavernaServerInputREST.PathNames.ON
 import java.util.ArrayList;
 import java.util.List;
 
+import javax.annotation.Nonnull;
 import javax.annotation.security.RolesAllowed;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.GET;
@@ -48,8 +49,6 @@ import org.taverna.server.master.interfaces.Input;
 import org.taverna.server.master.interfaces.TavernaRun;
 import org.taverna.server.port_description.InputDescription;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-
 /**
  * This represents how a Taverna Server workflow run's inputs looks to a RESTful
  * API.
@@ -68,7 +67,7 @@ public interface TavernaServerInputREST {
 	@Path("/")
 	@Produces({ XML, JSON })
 	@Description("Describe the sub-URIs of this resource.")
-	@NonNull
+	@Nonnull
 	InputsDescriptor get();
 
 	/** Get an outline of the operations supported. */
@@ -85,7 +84,7 @@ public interface TavernaServerInputREST {
 	@Path(EXPECTED)
 	@Produces({ XML, JSON })
 	@Description("Describe the expected inputs of this workflow run.")
-	@NonNull
+	@Nonnull
 	InputDescription getExpected();
 
 	/** Get an outline of the operations supported. */
@@ -103,7 +102,7 @@ public interface TavernaServerInputREST {
 	@Produces(TEXT)
 	@Description("Gives the Baclava file describing the inputs, or empty if "
 			+ "individual files are used.")
-	@NonNull
+	@Nonnull
 	String getBaclavaFile();
 
 	/**
@@ -125,8 +124,8 @@ public interface TavernaServerInputREST {
 	@Consumes(TEXT)
 	@Produces(TEXT)
 	@Description("Sets the Baclava file describing the inputs.")
-	@NonNull
-	String setBaclavaFile(@NonNull String filename) throws NoUpdateException,
+	@Nonnull
+	String setBaclavaFile(@Nonnull String filename) throws NoUpdateException,
 			BadStateChangeException, FilesystemAccessException;
 
 	/** Get an outline of the operations supported. */
@@ -151,8 +150,8 @@ public interface TavernaServerInputREST {
 	@Produces({ XML, JSON })
 	@Description("Gives a description of what is used to supply a particular "
 			+ "input.")
-	@NonNull
-	InDesc getInput(@NonNull @PathParam("name") String name,
+	@Nonnull
+	InDesc getInput(@Nonnull @PathParam("name") String name,
 			@Context UriInfo uriInfo) throws BadInputPortNameException;
 
 	/**
@@ -182,9 +181,9 @@ public interface TavernaServerInputREST {
 	@Consumes({ XML, JSON })
 	@Produces({ XML, JSON })
 	@Description("Sets the source for a particular input port.")
-	@NonNull
-	InDesc setInput(@NonNull @PathParam("name") String name,
-			@NonNull InDesc inputDescriptor, @Context UriInfo uriInfo) throws NoUpdateException,
+	@Nonnull
+	InDesc setInput(@Nonnull @PathParam("name") String name,
+			@Nonnull InDesc inputDescriptor, @Context UriInfo uriInfo) throws NoUpdateException,
 			BadStateChangeException, FilesystemAccessException,
 			BadPropertyValueException, BadInputPortNameException;
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerListenersREST.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerListenersREST.java b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerListenersREST.java
index b868230..e9b067e 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerListenersREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerListenersREST.java
@@ -15,6 +15,7 @@ import java.net.URI;
 import java.util.ArrayList;
 import java.util.List;
 
+import javax.annotation.Nonnull;
 import javax.annotation.security.RolesAllowed;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.GET;
@@ -42,8 +43,6 @@ import org.taverna.server.master.exceptions.NoListenerException;
 import org.taverna.server.master.exceptions.NoUpdateException;
 import org.taverna.server.master.interfaces.Listener;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-
 /**
  * This represents <i>all</i> the event listeners attached to a workflow run.
  * 
@@ -65,8 +64,8 @@ public interface TavernaServerListenersREST {
 	@Path("/")
 	@Produces({ XML, JSON })
 	@Description("Get the listeners installed in the workflow run.")
-	@NonNull
-	Listeners getDescription(@NonNull @Context UriInfo ui);
+	@Nonnull
+	Listeners getDescription(@Nonnull @Context UriInfo ui);
 
 	/**
 	 * Add a new event listener to the named workflow run.
@@ -87,9 +86,9 @@ public interface TavernaServerListenersREST {
 	@Path("/")
 	@Consumes({ XML, JSON })
 	@Description("Add a new event listener to the named workflow run.")
-	@NonNull
-	Response addListener(@NonNull ListenerDefinition typeAndConfiguration,
-			@NonNull @Context UriInfo ui) throws NoUpdateException,
+	@Nonnull
+	Response addListener(@Nonnull ListenerDefinition typeAndConfiguration,
+			@Nonnull @Context UriInfo ui) throws NoUpdateException,
 			NoListenerException;
 
 	/** Get an outline of the operations supported. */
@@ -109,9 +108,9 @@ public interface TavernaServerListenersREST {
 	 */
 	@Path("{name}")
 	@Description("Resolve a particular listener from its name.")
-	@NonNull
+	@Nonnull
 	TavernaServerListenerREST getListener(
-			@NonNull @PathParam("name") String name) throws NoListenerException;
+			@Nonnull @PathParam("name") String name) throws NoListenerException;
 
 	/**
 	 * This represents a single event listener attached to a workflow run.
@@ -135,8 +134,8 @@ public interface TavernaServerListenersREST {
 		@Path("/")
 		@Produces({ XML, JSON })
 		@Description("Get the description of this listener.")
-		@NonNull
-		ListenerDescription getDescription(@NonNull @Context UriInfo ui);
+		@Nonnull
+		ListenerDescription getDescription(@Nonnull @Context UriInfo ui);
 
 		/** Get an outline of the operations supported. */
 		@OPTIONS
@@ -155,7 +154,7 @@ public interface TavernaServerListenersREST {
 		@Produces(TEXT)
 		@Description("Get the configuration for the given event listener that "
 				+ "is attached to a workflow run.")
-		@NonNull
+		@Nonnull
 		String getConfiguration();
 
 		/** Get an outline of the operations supported. */
@@ -178,8 +177,8 @@ public interface TavernaServerListenersREST {
 		@Produces({ XML, JSON })
 		@Description("Get the list of properties supported by a given event "
 				+ "listener attached to a workflow run.")
-		@NonNull
-		Properties getProperties(@NonNull @Context UriInfo ui);
+		@Nonnull
+		Properties getProperties(@Nonnull @Context UriInfo ui);
 
 		/** Get an outline of the operations supported. */
 		@OPTIONS
@@ -198,9 +197,9 @@ public interface TavernaServerListenersREST {
 		 */
 		@Path("properties/{propertyName}")
 		@Description("Get an object representing a particular property.")
-		@NonNull
+		@Nonnull
 		Property getProperty(
-				@NonNull @PathParam("propertyName") String propertyName)
+				@Nonnull @PathParam("propertyName") String propertyName)
 				throws NoListenerException;
 	}
 
@@ -224,7 +223,7 @@ public interface TavernaServerListenersREST {
 		@Produces(TEXT)
 		@Description("Get the value of the particular property of an event "
 				+ "listener attached to a workflow run.")
-		@NonNull
+		@Nonnull
 		String getValue();
 
 		/**
@@ -246,8 +245,8 @@ public interface TavernaServerListenersREST {
 		@Produces(TEXT)
 		@Description("Set the value of the particular property of an event "
 				+ "listener attached to a workflow run.")
-		@NonNull
-		String setValue(@NonNull String value) throws NoUpdateException,
+		@Nonnull
+		String setValue(@Nonnull String value) throws NoUpdateException,
 				NoListenerException;
 
 		/** Get an outline of the operations supported. */

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/6ce771d1/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerREST.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerREST.java b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerREST.java
index b25a39a..2ed4959 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerREST.java
@@ -26,6 +26,7 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
+import javax.annotation.Nonnull;
 import javax.annotation.security.RolesAllowed;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.GET;
@@ -57,8 +58,6 @@ import org.taverna.server.master.exceptions.UnknownRunException;
 import org.taverna.server.master.interfaces.TavernaRun;
 import org.taverna.server.master.soap.TavernaServerSOAP;
 
-import edu.umd.cs.findbugs.annotations.NonNull;
-
 /**
  * The REST service interface to Taverna 2.5.3 Server.
  * 
@@ -80,8 +79,8 @@ public interface TavernaServerREST {
 	@Path(ROOT)
 	@Produces({ XML, JSON })
 	@Description("Produces the description of the service.")
-	@NonNull
-	ServerDescription describeService(@NonNull @Context UriInfo ui);
+	@Nonnull
+	ServerDescription describeService(@Nonnull @Context UriInfo ui);
 
 	/** Get an outline of the operations supported. */
 	@OPTIONS
@@ -101,8 +100,8 @@ public interface TavernaServerREST {
 	@Produces({ XML, JSON })
 	@RolesAllowed(USER)
 	@Description("Produces a list of all runs visible to the user.")
-	@NonNull
-	RunList listUsersRuns(@NonNull @Context UriInfo ui);
+	@Nonnull
+	RunList listUsersRuns(@Nonnull @Context UriInfo ui);
 
 	/**
 	 * Accepts (or not) a request to create a new run executing the given
@@ -122,9 +121,9 @@ public interface TavernaServerREST {
 	@RolesAllowed(USER)
 	@Description("Accepts (or not) a request to create a new run executing "
 			+ "the given workflow.")
-	@NonNull
-	Response submitWorkflow(@NonNull Workflow workflow,
-			@NonNull @Context UriInfo ui) throws NoUpdateException;
+	@Nonnull
+	Response submitWorkflow(@Nonnull Workflow workflow,
+			@Nonnull @Context UriInfo ui) throws NoUpdateException;
 
 	/**
 	 * Accepts (or not) a request to create a new run executing the workflow at
@@ -147,9 +146,9 @@ public interface TavernaServerREST {
 	@RolesAllowed(USER)
 	@Description("Accepts a URL to a workflow to download and run. The URL "
 			+ "must be hosted on a publicly-accessible service.")
-	@NonNull
-	Response submitWorkflowByURL(@NonNull List<URI> referenceList,
-			@NonNull @Context UriInfo ui) throws NoCreateException,
+	@Nonnull
+	Response submitWorkflowByURL(@Nonnull List<URI> referenceList,
+			@Nonnull @Context UriInfo ui) throws NoCreateException,
 			NoUpdateException;
 
 	/** Get an outline of the operations supported. */
@@ -164,7 +163,7 @@ public interface TavernaServerREST {
 	 */
 	@Path(POL)
 	@Description("The policies supported by this server.")
-	@NonNull
+	@Nonnull
 	PolicyView getPolicyDescription();
 
 	/**
@@ -181,10 +180,10 @@ public interface TavernaServerREST {
 	@Path(RUNS + "/{runName}")
 	@RolesAllowed(USER)
 	@Description("Get a particular named run resource to dispatch to.")
-	@NonNull
+	@Nonnull
 	TavernaServerRunREST getRunResource(
-			@NonNull @PathParam("runName") String runName,
-			@NonNull @Context UriInfo uriInfo) throws UnknownRunException;
+			@Nonnull @PathParam("runName") String runName,
+			@Nonnull @Context UriInfo uriInfo) throws UnknownRunException;
 
 	/**
 	 * Factored out path names used in the {@link TavernaServerREST} interface
@@ -271,8 +270,8 @@ public interface TavernaServerREST {
 		@Path(ROOT)
 		@Produces({ XML, JSON })
 		@Description("Describe the parts of this policy.")
-		@NonNull
-		public PolicyDescription getDescription(@NonNull @Context UriInfo ui);
+		@Nonnull
+		public PolicyDescription getDescription(@Nonnull @Context UriInfo ui);
 
 		/**
 		 * Gets the maximum number of simultaneous runs that the user may
@@ -288,7 +287,7 @@ public interface TavernaServerREST {
 		@RolesAllowed(USER)
 		@Description("Gets the maximum number of simultaneous runs in any "
 				+ "state that the user may create.")
-		@NonNull
+		@Nonnull
 		public int getMaxSimultaneousRuns();
 
 		/**
@@ -324,7 +323,7 @@ public interface TavernaServerREST {
 		@Produces({ XML, JSON })
 		@RolesAllowed(USER)
 		@Description("Gets the list of permitted workflows.")
-		@NonNull
+		@Nonnull
 		public PermittedWorkflows getPermittedWorkflows();
 
 		/**
@@ -338,7 +337,7 @@ public interface TavernaServerREST {
 		@Produces({ XML, JSON })
 		@RolesAllowed(USER)
 		@Description("Gets the list of permitted event listener types.")
-		@NonNull
+		@Nonnull
 		public PermittedListeners getPermittedListeners();
 
 		/**
@@ -355,7 +354,7 @@ public interface TavernaServerREST {
 		@Description("Gets the list of supported, enabled notification "
 				+ "fabrics. Each corresponds (approximately) to a protocol, "
 				+ "e.g., email.")
-		@NonNull
+		@Nonnull
 		public EnabledNotificationFabrics getEnabledNotifiers();
 
 		@GET
@@ -364,7 +363,7 @@ public interface TavernaServerREST {
 		@RolesAllowed(USER)
 		@Description("Gets a description of the capabilities supported by "
 				+ "this installation of Taverna Server.")
-		@NonNull
+		@Nonnull
 		public CapabilityList getCapabilities();
 
 		/**
@@ -572,7 +571,7 @@ public interface TavernaServerREST {
 		@Path("/")
 		@Produces("application/atom+xml;type=feed")
 		@Description("Get an Atom feed for the user's events.")
-		@NonNull
+		@Nonnull
 		Feed getFeed(@Context UriInfo ui);
 
 		/**
@@ -584,7 +583,7 @@ public interface TavernaServerREST {
 		@Path("{id}")
 		@Produces("application/atom+xml;type=entry")
 		@Description("Get a particular Atom event.")
-		@NonNull
-		Entry getEvent(@NonNull @PathParam("id") String id);
+		@Nonnull
+		Entry getEvent(@Nonnull @PathParam("id") String id);
 	}
 }


[16/50] [abbrv] incubator-taverna-server git commit: Switch to release version of clt

Posted by st...@apache.org.
Switch to release version of clt

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/0802c0f8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/0802c0f8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/0802c0f8

Branch: refs/heads/master
Commit: 0802c0f82fb6195aa36410fbf6831d8dd574645a
Parents: fde9938
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Tue Apr 22 15:11:17 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Tue Apr 22 15:11:17 2014 +0100

----------------------------------------------------------------------
 server-webapp/pom.xml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0802c0f8/server-webapp/pom.xml
----------------------------------------------------------------------
diff --git a/server-webapp/pom.xml b/server-webapp/pom.xml
index ef4c82f..9de52a1 100644
--- a/server-webapp/pom.xml
+++ b/server-webapp/pom.xml
@@ -20,7 +20,8 @@
 		<version.spring-security>3.1.4.RELEASE</version.spring-security>
 		<version.asm>3.3.1</version.asm>
 		<version.smack>3.2.1</version.smack>
-		<version.commandline>2.5-SNAPSHOT</version.commandline>
+		<version.commandline>2.5.0</version.commandline>
+		<edition.commandline>enterprise</edition.commandline>
 		<version.jdoapi>3.0.1</version.jdoapi>
 		<forker.module>server-unix-forker</forker.module>
 		<util.dir>${project.build.directory}/${project.build.finalName}/WEB-INF/classes/util</util.dir>
@@ -555,8 +556,8 @@
 						<configuration>
 							<artifactItems>
 								<artifactItem>
-									<groupId>net.sf.taverna.t2</groupId>
-									<artifactId>taverna-commandline</artifactId>
+									<groupId>net.sf.taverna.t2.taverna-commandline</groupId>
+									<artifactId>taverna-commandline-${edition.commandline}</artifactId>
 									<version>${version.commandline}</version>
 									<type>zip</type>
 									<classifier>bin</classifier>


[48/50] [abbrv] incubator-taverna-server git commit: Tweak maven metadata

Posted by st...@apache.org.
Tweak maven metadata

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/0a242e7d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/0a242e7d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/0a242e7d

Branch: refs/heads/master
Commit: 0a242e7d02bbe7ec7d223b213ca7c18894f1be44
Parents: 0b9c4f9
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Wed Sep 3 13:08:54 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Wed Sep 3 13:08:54 2014 +0100

----------------------------------------------------------------------
 server-client/pom.xml | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/0a242e7d/server-client/pom.xml
----------------------------------------------------------------------
diff --git a/server-client/pom.xml b/server-client/pom.xml
index bac3ea5..4cc0492 100644
--- a/server-client/pom.xml
+++ b/server-client/pom.xml
@@ -118,4 +118,6 @@
 			</plugins>
 		</pluginManagement>
 	</build>
+	<inceptionYear>2014</inceptionYear>
+	<name>Server Client OSGi Module</name>
 </project>
\ No newline at end of file


[04/50] [abbrv] incubator-taverna-server git commit: Use Java 7 idioms.

Posted by st...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/main/java/org/taverna/server/master/worker/SecurityContextDelegate.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/worker/SecurityContextDelegate.java b/server-webapp/src/main/java/org/taverna/server/master/worker/SecurityContextDelegate.java
index 65fe25f..a868dee 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/worker/SecurityContextDelegate.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/worker/SecurityContextDelegate.java
@@ -23,6 +23,8 @@ import java.security.GeneralSecurityException;
 import java.security.Key;
 import java.security.KeyStore;
 import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
 import java.security.cert.Certificate;
 import java.security.cert.CertificateException;
 import java.security.cert.CertificateFactory;
@@ -30,6 +32,7 @@ import java.security.cert.X509Certificate;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
 
 import javax.security.auth.x500.X500Principal;
@@ -62,14 +65,14 @@ import edu.umd.cs.findbugs.annotations.Nullable;
 public abstract class SecurityContextDelegate implements TavernaSecurityContext {
 	Log log = LogFactory.getLog("Taverna.Server.Worker");
 	private final UsernamePrincipal owner;
-	private final List<Credential> credentials = new ArrayList<Credential>();
-	private final List<Trust> trusted = new ArrayList<Trust>();
+	private final List<Credential> credentials = new ArrayList<>();
+	private final List<Trust> trusted = new ArrayList<>();
 	private final RemoteRunDelegate run;
 	private final Object lock = new Object();
 	final SecurityContextFactory factory;
 
 	private transient Keystore keystore;
-	private transient HashMap<URI, String> uriToAliasMap;
+	private transient Map<URI, String> uriToAliasMap;
 
 	/**
 	 * Initialise the context delegate.
@@ -195,7 +198,7 @@ public abstract class SecurityContextDelegate implements TavernaSecurityContext
 		try {
 			t.loadedCertificates = CertificateFactory.getInstance(t.fileType)
 					.generateCertificates(contentsAsStream);
-			t.serverName = new ArrayList<String>(t.loadedCertificates.size());
+			t.serverName = new ArrayList<>(t.loadedCertificates.size());
 			for (Certificate c : t.loadedCertificates)
 				t.serverName.add(getPrincipalName(((X509Certificate) c)
 						.getSubjectX500Principal()));
@@ -278,10 +281,9 @@ public abstract class SecurityContextDelegate implements TavernaSecurityContext
 			IOException, ImplementationException {
 		RemoteSecurityContext rc = run.run.getSecurityContext();
 
-		List<Trust> trusted = new ArrayList<Trust>(this.trusted);
+		List<Trust> trusted = new ArrayList<>(this.trusted);
 		this.trusted.clear();
-		List<Credential> credentials = new ArrayList<Credential>(
-				this.credentials);
+		List<Credential> credentials = new ArrayList<>(this.credentials);
 		this.credentials.clear();
 
 		try {
@@ -298,7 +300,7 @@ public abstract class SecurityContextDelegate implements TavernaSecurityContext
 			log.info("constructing merged keystore");
 			Truststore truststore = new Truststore(password);
 			Keystore keystore = new Keystore(password);
-			HashMap<URI, String> uriToAliasMap = new HashMap<URI, String>();
+			Map<URI, String> uriToAliasMap = new HashMap<>();
 			int trustedCount = 0, keyCount = 0;
 
 			synchronized (lock) {
@@ -430,9 +432,7 @@ public abstract class SecurityContextDelegate implements TavernaSecurityContext
 				throw new InvalidCredentialException(CREDENTIAL_FILE_SIZE_LIMIT
 						+ "kB limit hit");
 			return new ByteArrayInputStream(f.getContents(0, (int) size));
-		} catch (NoDirectoryEntryException e) {
-			throw new InvalidCredentialException(e);
-		} catch (FilesystemAccessException e) {
+		} catch (NoDirectoryEntryException | FilesystemAccessException e) {
 			throw new InvalidCredentialException(e);
 		} catch (ClassCastException e) {
 			throw new InvalidCredentialException("not a file", e);
@@ -502,17 +502,11 @@ public abstract class SecurityContextDelegate implements TavernaSecurityContext
 		}
 	}
 
-	/**
-	 * A trust store that can only be added to or serialized. Only trusted
-	 * certificates can be placed in it.
-	 * 
-	 * @author Donal Fellows
-	 */
-	class Truststore {
+	static class SecurityStore {
 		private KeyStore ks;
 		private char[] password;
 
-		Truststore(char[] password) throws GeneralSecurityException {
+		SecurityStore(char[] password) throws GeneralSecurityException {
 			this.password = password.clone();
 			ks = KeyStore.getInstance("UBER", "BC");
 			try {
@@ -523,6 +517,59 @@ public abstract class SecurityContextDelegate implements TavernaSecurityContext
 			}
 		}
 
+		final synchronized void setCertificate(String alias, Certificate c)
+				throws KeyStoreException {
+			if (ks == null)
+				throw new IllegalStateException("store already written");
+			ks.setCertificateEntry(alias, c);
+		}
+
+		final synchronized void setKey(String alias, Key key, Certificate[] trustChain)
+				throws KeyStoreException {
+			if (ks == null)
+				throw new IllegalStateException("store already written");
+			ks.setKeyEntry(alias, key, password, trustChain);
+		}
+
+		final synchronized byte[] serialize(boolean logIt)
+				throws GeneralSecurityException {
+			if (ks == null)
+				throw new IllegalStateException("store already written");
+			try (ByteArrayOutputStream stream = new ByteArrayOutputStream()) {
+				ks.store(stream, password);
+				if (logIt)
+					LogFactory.getLog("Taverna.Server.Worker").debug(
+							"serialized UBER/BC truststore (size: " + ks.size()
+									+ ") with password \""
+									+ new String(password) + "\"");
+				return stream.toByteArray();
+			} catch (IOException e) {
+				throw new GeneralSecurityException(
+						"problem serializing keystore", e);
+			} finally {
+				ks = null;
+				fill(password, ' ');
+			}
+		}
+
+		@Override
+		protected final void finalize() {
+			fill(password, ' ');
+			ks = null;
+		}
+	}
+
+	/**
+	 * A trust store that can only be added to or serialized. Only trusted
+	 * certificates can be placed in it.
+	 * 
+	 * @author Donal Fellows
+	 */
+	class Truststore extends SecurityStore {
+		Truststore(char[] password) throws GeneralSecurityException {
+			super(password);
+		}
+
 		/**
 		 * Add a trusted certificate to the truststore. No certificates can be
 		 * added after the truststore is serialized.
@@ -533,14 +580,12 @@ public abstract class SecurityContextDelegate implements TavernaSecurityContext
 		 *             If anything goes wrong.
 		 */
 		public void addCertificate(Certificate cert) throws KeyStoreException {
-			if (ks == null)
-				throw new IllegalStateException("truststore already written");
 			X509Certificate c = (X509Certificate) cert;
 			String alias = format("trustedcert#%s#%s#%s",
 					getPrincipalName(c.getSubjectX500Principal()),
 					getPrincipalName(c.getIssuerX500Principal()),
 					factory.x500Utils.getSerial(c));
-			ks.setCertificateEntry(alias, c);
+			setCertificate(alias, c);
 			if (log.isDebugEnabled() && factory.logSecurityDetails)
 				log.debug("added cert with alias \"" + alias + "\" of type "
 						+ c.getClass().getCanonicalName());
@@ -554,30 +599,8 @@ public abstract class SecurityContextDelegate implements TavernaSecurityContext
 		 * @throws GeneralSecurityException
 		 *             If anything goes wrong.
 		 */
-		public byte[] serialize() throws GeneralSecurityException, IOException {
-			if (ks == null)
-				throw new IllegalStateException("truststore already written");
-			ByteArrayOutputStream stream = new ByteArrayOutputStream();
-			try {
-				ks.store(stream, password);
-				stream.close();
-				if (log.isDebugEnabled() && factory.logSecurityDetails)
-					log.debug("serialized UBER/BC truststore (size: "
-							+ ks.size() + ") with password \""
-							+ new String(password) + "\"");
-			} catch (IOException e) {
-				throw new GeneralSecurityException(
-						"problem serializing truststore", e);
-			}
-			fill(password, ' ');
-			ks = null;
-			return stream.toByteArray();
-		}
-
-		@Override
-		protected void finalize() {
-			fill(password, ' ');
-			ks = null;
+		public byte[] serialize() throws GeneralSecurityException {
+			return serialize(log.isDebugEnabled() && factory.logSecurityDetails);
 		}
 	}
 
@@ -587,20 +610,9 @@ public abstract class SecurityContextDelegate implements TavernaSecurityContext
 	 * 
 	 * @author Donal Fellows
 	 */
-	class Keystore {
-		private KeyStore ks;
-		private char[] password;
-
+	class Keystore extends SecurityStore {
 		Keystore(char[] password) throws GeneralSecurityException {
-			this.password = password.clone();
-
-			ks = KeyStore.getInstance("UBER", "BC");
-			try {
-				ks.load(null, password);
-			} catch (IOException e) {
-				throw new GeneralSecurityException(
-						"problem initializing blank keystore", e);
-			}
+			super(password);
 		}
 
 		/**
@@ -619,9 +631,7 @@ public abstract class SecurityContextDelegate implements TavernaSecurityContext
 		 */
 		public void addKey(String alias, Key key, Certificate[] trustChain)
 				throws KeyStoreException {
-			if (ks == null)
-				throw new IllegalStateException("keystore already written");
-			ks.setKeyEntry(alias, key, password, trustChain);
+			setKey(alias, key, trustChain);
 			if (log.isDebugEnabled() && factory.logSecurityDetails)
 				log.debug("added key with alias \"" + alias + "\" of type "
 						+ key.getClass().getCanonicalName());
@@ -636,29 +646,7 @@ public abstract class SecurityContextDelegate implements TavernaSecurityContext
 		 *             If anything goes wrong.
 		 */
 		public byte[] serialize() throws GeneralSecurityException {
-			if (ks == null)
-				throw new IllegalStateException("keystore already written");
-			ByteArrayOutputStream stream = new ByteArrayOutputStream();
-			try {
-				ks.store(stream, password);
-				stream.close();
-				if (log.isDebugEnabled() && factory.logSecurityDetails)
-					log.debug("serialized UBER/BC keystore (size: " + ks.size()
-							+ ") with password \"" + new String(password)
-							+ "\"");
-			} catch (IOException e) {
-				throw new GeneralSecurityException(
-						"problem serializing keystore", e);
-			}
-			fill(password, ' ');
-			ks = null;
-			return stream.toByteArray();
-		}
-
-		@Override
-		protected void finalize() {
-			fill(password, ' ');
-			ks = null;
+			return serialize(log.isDebugEnabled() && factory.logSecurityDetails);
 		}
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/test/java/org/taverna/server/master/WorkflowSerializationTest.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/test/java/org/taverna/server/master/WorkflowSerializationTest.java b/server-webapp/src/test/java/org/taverna/server/master/WorkflowSerializationTest.java
index 6caafe8..4d49d17 100644
--- a/server-webapp/src/test/java/org/taverna/server/master/WorkflowSerializationTest.java
+++ b/server-webapp/src/test/java/org/taverna/server/master/WorkflowSerializationTest.java
@@ -32,14 +32,15 @@ public class WorkflowSerializationTest {
 		w.content[0].setAttribute("xyz", "abc");
 
 		ByteArrayOutputStream baos = new ByteArrayOutputStream();
-		ObjectOutputStream oos = new ObjectOutputStream(baos);
-		oos.writeObject(w);
-		oos.close();
+		try (ObjectOutputStream oos = new ObjectOutputStream(baos)) {
+			oos.writeObject(w);
+		}
 
-		ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
-		ObjectInputStream ois = new ObjectInputStream(bais);
-		Object o = ois.readObject();
-		ois.close();
+		Object o;
+		try (ObjectInputStream ois = new ObjectInputStream(
+				new ByteArrayInputStream(baos.toByteArray()))) {
+			o = ois.readObject();
+		}
 
 		Assert.assertNotNull(o);
 		Assert.assertEquals(w.getClass(), o.getClass());

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/test/java/org/taverna/server/master/mocks/ExampleRun.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/test/java/org/taverna/server/master/mocks/ExampleRun.java b/server-webapp/src/test/java/org/taverna/server/master/mocks/ExampleRun.java
index 2796c7b..e4e674d 100644
--- a/server-webapp/src/test/java/org/taverna/server/master/mocks/ExampleRun.java
+++ b/server-webapp/src/test/java/org/taverna/server/master/mocks/ExampleRun.java
@@ -62,12 +62,12 @@ public class ExampleRun implements TavernaRun, TavernaSecurityContext {
 
 	public ExampleRun(UsernamePrincipal creator, Workflow workflow, Date expiry) {
 		this.id = randomUUID().toString();
-		this.listeners = new ArrayList<Listener>();
+		this.listeners = new ArrayList<>();
 		this.status = Initialized;
 		this.owner = creator;
 		this.workflow = workflow;
 		this.expiry = expiry;
-		this.inputs = new ArrayList<Input>();
+		this.inputs = new ArrayList<>();
 		listeners.add(new DefaultListener());
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/test/java/org/taverna/server/master/mocks/MockPolicy.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/test/java/org/taverna/server/master/mocks/MockPolicy.java b/server-webapp/src/test/java/org/taverna/server/master/mocks/MockPolicy.java
index 23fb1be..6109716 100644
--- a/server-webapp/src/test/java/org/taverna/server/master/mocks/MockPolicy.java
+++ b/server-webapp/src/test/java/org/taverna/server/master/mocks/MockPolicy.java
@@ -21,7 +21,7 @@ public class MockPolicy extends SimpleServerPolicy {
 
 	public int maxruns = 10;
 	Integer usermaxruns;
-	Set<TavernaRun> denyaccess = new HashSet<TavernaRun>();
+	Set<TavernaRun> denyaccess = new HashSet<>();
 	boolean exnOnUpdate, exnOnCreate, exnOnDelete;
 
 	@Override

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/test/java/org/taverna/server/master/mocks/SimpleListenerFactory.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/test/java/org/taverna/server/master/mocks/SimpleListenerFactory.java b/server-webapp/src/test/java/org/taverna/server/master/mocks/SimpleListenerFactory.java
index 8892032..d864214 100644
--- a/server-webapp/src/test/java/org/taverna/server/master/mocks/SimpleListenerFactory.java
+++ b/server-webapp/src/test/java/org/taverna/server/master/mocks/SimpleListenerFactory.java
@@ -16,7 +16,7 @@ import org.taverna.server.master.interfaces.TavernaRun;
  * @author Donal Fellows
  */
 public class SimpleListenerFactory implements ListenerFactory {
-	private Map<String, Builder> builders = new HashMap<String, Builder>();
+	private Map<String, Builder> builders = new HashMap<>();
 
 	public void setBuilders(Map<String, Builder> builders) {
 		this.builders = builders;
@@ -24,7 +24,7 @@ public class SimpleListenerFactory implements ListenerFactory {
 
 	@Override
 	public List<String> getSupportedListenerTypes() {
-		return new ArrayList<String>(builders.keySet());
+		return new ArrayList<>(builders.keySet());
 	}
 
 	@Override

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-webapp/src/test/java/org/taverna/server/master/mocks/SimpleNonpersistentRunStore.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/test/java/org/taverna/server/master/mocks/SimpleNonpersistentRunStore.java b/server-webapp/src/test/java/org/taverna/server/master/mocks/SimpleNonpersistentRunStore.java
index 49bf59a..a3751e4 100644
--- a/server-webapp/src/test/java/org/taverna/server/master/mocks/SimpleNonpersistentRunStore.java
+++ b/server-webapp/src/test/java/org/taverna/server/master/mocks/SimpleNonpersistentRunStore.java
@@ -21,7 +21,7 @@ import org.taverna.server.master.utils.UsernamePrincipal;
  * @author Donal Fellows
  */
 public class SimpleNonpersistentRunStore implements RunStore {
-	private Map<String, TavernaRun> store = new HashMap<String, TavernaRun>();
+	private Map<String, TavernaRun> store = new HashMap<>();
 	private Object lock = new Object();
 
 	Timer timer;
@@ -107,12 +107,11 @@ public class SimpleNonpersistentRunStore implements RunStore {
 
 	@Override
 	public Map<String, TavernaRun> listRuns(UsernamePrincipal user, Policy p) {
-		HashMap<String, TavernaRun> filtered = new HashMap<String, TavernaRun>();
+		Map<String, TavernaRun> filtered = new HashMap<>();
 		synchronized (lock) {
-			for (Map.Entry<String, TavernaRun> entry : store.entrySet()) {
+			for (Map.Entry<String, TavernaRun> entry : store.entrySet())
 				if (p.permitAccess(user, entry.getValue()))
 					filtered.put(entry.getKey(), entry.getValue());
-			}
 		}
 		return filtered;
 	}
@@ -137,7 +136,7 @@ class CleanerTask extends TimerTask {
 	WeakReference<SimpleNonpersistentRunStore> store;
 
 	CleanerTask(SimpleNonpersistentRunStore store, int interval) {
-		this.store = new WeakReference<SimpleNonpersistentRunStore>(store);
+		this.store = new WeakReference<>(store);
 		int tms = interval * 1000;
 		store.timer.scheduleAtFixedRate(this, tms, tms);
 	}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-worker/src/main/java/org/taverna/server/localworker/impl/DirectoryDelegate.java
----------------------------------------------------------------------
diff --git a/server-worker/src/main/java/org/taverna/server/localworker/impl/DirectoryDelegate.java b/server-worker/src/main/java/org/taverna/server/localworker/impl/DirectoryDelegate.java
index 0364994..6d736f0 100644
--- a/server-worker/src/main/java/org/taverna/server/localworker/impl/DirectoryDelegate.java
+++ b/server-worker/src/main/java/org/taverna/server/localworker/impl/DirectoryDelegate.java
@@ -17,6 +17,7 @@ import java.rmi.server.UnicastRemoteObject;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Date;
+import java.util.List;
 
 import org.apache.commons.collections.MapIterator;
 import org.apache.commons.collections.map.ReferenceMap;
@@ -58,7 +59,7 @@ public class DirectoryDelegate extends UnicastRemoteObject implements
 	@Override
 	public Collection<RemoteDirectoryEntry> getContents()
 			throws RemoteException {
-		ArrayList<RemoteDirectoryEntry> result = new ArrayList<RemoteDirectoryEntry>();
+		List<RemoteDirectoryEntry> result = new ArrayList<>();
 		for (String s : dir.list()) {
 			if (s.equals(".") || s.equals(".."))
 				continue;
@@ -115,7 +116,7 @@ public class DirectoryDelegate extends UnicastRemoteObject implements
 			throw new IOException("tried to destroy main job working directory");
 		Collection<RemoteDirectoryEntry> values;
 		synchronized (localCache) {
-			values = new ArrayList<RemoteDirectoryEntry>(localCache.values());
+			values = new ArrayList<>(localCache.values());
 		}
 		for (RemoteDirectoryEntry obj : values) {
 			if (obj == null)

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-worker/src/main/java/org/taverna/server/localworker/impl/FileDelegate.java
----------------------------------------------------------------------
diff --git a/server-worker/src/main/java/org/taverna/server/localworker/impl/FileDelegate.java b/server-worker/src/main/java/org/taverna/server/localworker/impl/FileDelegate.java
index a679e70..616a3d8 100644
--- a/server-worker/src/main/java/org/taverna/server/localworker/impl/FileDelegate.java
+++ b/server-worker/src/main/java/org/taverna/server/localworker/impl/FileDelegate.java
@@ -58,17 +58,11 @@ public class FileDelegate extends UnicastRemoteObject implements RemoteFile {
 		if (length < 0 || length > 1024 * 64)
 			length = 1024 * 64;
 		byte[] buffer = new byte[length];
-		FileInputStream fis = null;
 		int read;
-		try {
-			fis = new FileInputStream(file);
-			if (offset > 0)
-				if (fis.skip(offset) != offset)
-					throw new IOException("did not move to correct offset in file");
+		try (FileInputStream fis = new FileInputStream(file)) {
+			if (offset > 0 && fis.skip(offset) != offset)
+				throw new IOException("did not move to correct offset in file");
 			read = fis.read(buffer);
-		} finally {
-			if (fis != null)
-				fis.close();
 		}
 		if (read <= 0)
 			return new byte[0];
@@ -87,25 +81,15 @@ public class FileDelegate extends UnicastRemoteObject implements RemoteFile {
 
 	@Override
 	public void setContents(byte[] data) throws IOException {
-		FileOutputStream fos = null;
-		try {
-			fos = new FileOutputStream(file);
+		try (FileOutputStream fos = new FileOutputStream(file)) {
 			fos.write(data);
-		} finally {
-			if (fos != null)
-				fos.close();
 		}
 	}
 
 	@Override
 	public void appendContents(byte[] data) throws IOException {
-		FileOutputStream fos = null;
-		try {
-			fos = new FileOutputStream(file, true);
+		try (FileOutputStream fos = new FileOutputStream(file, true)) {
 			fos.write(data);
-		} finally {
-			if (fos != null)
-				fos.close();
 		}
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-worker/src/main/java/org/taverna/server/localworker/impl/LocalWorker.java
----------------------------------------------------------------------
diff --git a/server-worker/src/main/java/org/taverna/server/localworker/impl/LocalWorker.java b/server-worker/src/main/java/org/taverna/server/localworker/impl/LocalWorker.java
index 5484ba9..bcac762 100644
--- a/server-worker/src/main/java/org/taverna/server/localworker/impl/LocalWorker.java
+++ b/server-worker/src/main/java/org/taverna/server/localworker/impl/LocalWorker.java
@@ -164,9 +164,9 @@ public class LocalWorker extends UnicastRemoteObject implements RemoteSingleRun
 	 */
 	char[] keystorePassword = KEYSTORE_PASSWORD;
 	/** Additional server-specified environment settings. */
-	Map<String, String> environment = new HashMap<String, String>();
+	Map<String, String> environment = new HashMap<>();
 	/** Additional server-specified java runtime settings. */
-	List<String> runtimeSettings = new ArrayList<String>();
+	List<String> runtimeSettings = new ArrayList<>();
 	URL interactionFeedURL;
 	URL webdavURL;
 	private boolean doProvenance = true;
@@ -332,7 +332,7 @@ public class LocalWorker extends UnicastRemoteObject implements RemoteSingleRun
 
 	@Override
 	public List<RemoteInput> getInputs() throws RemoteException {
-		ArrayList<RemoteInput> result = new ArrayList<RemoteInput>();
+		ArrayList<RemoteInput> result = new ArrayList<>();
 		for (String name : inputFiles.keySet())
 			result.add(new InputDelegate(name));
 		return result;
@@ -473,13 +473,13 @@ public class LocalWorker extends UnicastRemoteObject implements RemoteSingleRun
 		}
 
 		@Override
-		public void setUriToAliasMap(HashMap<URI, String> uriToAliasMap)
+		public void setUriToAliasMap(Map<URI, String> uriToAliasMap)
 				throws RemoteException {
 			if (status != Initialized)
 				throw new RemoteException("not initializing");
 			if (uriToAliasMap == null)
 				return;
-			ArrayList<String> lines = new ArrayList<String>();
+			ArrayList<String> lines = new ArrayList<>();
 			for (Entry<URI, String> site : uriToAliasMap.entrySet())
 				lines.add(site.getKey().toASCIIString() + " " + site.getValue());
 			// write(URI_ALIAS_MAP, lines);

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-worker/src/main/java/org/taverna/server/localworker/impl/TavernaRunManager.java
----------------------------------------------------------------------
diff --git a/server-worker/src/main/java/org/taverna/server/localworker/impl/TavernaRunManager.java b/server-worker/src/main/java/org/taverna/server/localworker/impl/TavernaRunManager.java
index 43c31fd..ffcdab5 100644
--- a/server-worker/src/main/java/org/taverna/server/localworker/impl/TavernaRunManager.java
+++ b/server-worker/src/main/java/org/taverna/server/localworker/impl/TavernaRunManager.java
@@ -71,8 +71,8 @@ public class TavernaRunManager extends UnicastRemoteObject implements
 	public static String interactionPort;
 	public static String interactionWebdavPath;
 	public static String interactionFeedPath;
-	Map<String, String> seedEnvironment = new HashMap<String, String>();
-	List<String> javaInitParams = new ArrayList<String>();
+	Map<String, String> seedEnvironment = new HashMap<>();
+	List<String> javaInitParams = new ArrayList<>();
 	private int activeRuns = 0;
 
 	/**
@@ -147,7 +147,7 @@ public class TavernaRunManager extends UnicastRemoteObject implements
 		if (creator == null)
 			throw new RemoteException("no creator");
 		try {
-			Holder<String> wfid = new Holder<String>("???");
+			Holder<String> wfid = new Holder<>("???");
 			workflow = unwrapWorkflow(workflow, wfid);
 			out.println("Creating run from workflow <" + wfid.value + "> for <"
 					+ creator + ">");

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-worker/src/main/java/org/taverna/server/localworker/impl/WorkerCore.java
----------------------------------------------------------------------
diff --git a/server-worker/src/main/java/org/taverna/server/localworker/impl/WorkerCore.java b/server-worker/src/main/java/org/taverna/server/localworker/impl/WorkerCore.java
index 09cb85b..8be92fe 100644
--- a/server-worker/src/main/java/org/taverna/server/localworker/impl/WorkerCore.java
+++ b/server-worker/src/main/java/org/taverna/server/localworker/impl/WorkerCore.java
@@ -95,7 +95,7 @@ import edu.umd.cs.findbugs.annotations.SuppressWarnings;
 public class WorkerCore extends UnicastRemoteObject implements Worker,
 		RemoteListener {
 	@NonNull
-	static final Map<String, Property> pmap = new HashMap<String, Property>();
+	static final Map<String, Property> pmap = new HashMap<>();
 	/**
 	 * Regular expression to extract the detailed timing information from the
 	 * output of /usr/bin/time
@@ -157,7 +157,7 @@ public class WorkerCore extends UnicastRemoteObject implements Worker,
 		super();
 		stdout = new StringWriter();
 		stderr = new StringWriter();
-		pid = new Holder<Integer>();
+		pid = new Holder<>();
 		this.accounting = accounting;
 	}
 
@@ -479,7 +479,7 @@ public class WorkerCore extends UnicastRemoteObject implements Worker,
 	@Override
 	public void killWorker() {
 		if (!finished && subprocess != null) {
-			final Holder<Integer> code = new Holder<Integer>();
+			final Holder<Integer> code = new Holder<>();
 			for (TimingOutTask tot : new TimingOutTask[] { new TimingOutTask() {
 				/** Check if the workflow terminated of its own accord */
 				@Override
@@ -583,8 +583,6 @@ public class WorkerCore extends UnicastRemoteObject implements Worker,
 			ur.addDisk(sizeOfDirectory(wd)).setStorageUnit("B");
 			if (urreceiver != null)
 				urreceiver.acceptUsageRecord(ur.marshal());
-		} catch (RuntimeException e) {
-			e.printStackTrace();
 		} catch (Exception e) {
 			e.printStackTrace();
 		}
@@ -854,9 +852,8 @@ class PasswordWriterThread extends Thread {
 
 	@Override
 	public void run() {
-		PrintWriter pw = null;
-		try {
-			pw = new PrintWriter(new OutputStreamWriter(to, SYSTEM_ENCODING));
+		try (PrintWriter pw = new PrintWriter(new OutputStreamWriter(to,
+				SYSTEM_ENCODING))) {
 			pw.println(chars);
 		} catch (UnsupportedEncodingException e) {
 			// Not much we can do here
@@ -868,8 +865,6 @@ class PasswordWriterThread extends Thread {
 			 */
 			if (chars != KEYSTORE_PASSWORD)
 				Arrays.fill(chars, '\00');
-			if (pw != null)
-				pw.close();
 		}
 	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/867242f6/server-worker/src/test/java/org/taverna/server/localworker/impl/LocalWorkerTest.java
----------------------------------------------------------------------
diff --git a/server-worker/src/test/java/org/taverna/server/localworker/impl/LocalWorkerTest.java b/server-worker/src/test/java/org/taverna/server/localworker/impl/LocalWorkerTest.java
index b0d7f63..5e8f7ae 100644
--- a/server-worker/src/test/java/org/taverna/server/localworker/impl/LocalWorkerTest.java
+++ b/server-worker/src/test/java/org/taverna/server/localworker/impl/LocalWorkerTest.java
@@ -106,13 +106,12 @@ public class LocalWorkerTest {
 			events.add(Integer.toString(dirLen));
 			events.add(inputBaclava == null ? "<null>" : inputBaclava
 					.toString().substring(dirLen));
-			Map<String, String> in = new TreeMap<String, String>();
-			for (Entry<String, File> name : inputFiles.entrySet()) {
+			Map<String, String> in = new TreeMap<>();
+			for (Entry<String, File> name : inputFiles.entrySet())
 				in.put(name.getKey(), name.getValue() == null ? "<null>" : name
 						.getValue().getName());
-			}
 			events.add(in.toString());
-			events.add(new TreeMap<String, String>(inputValues).toString());
+			events.add(new TreeMap<>(inputValues).toString());
 			events.add(outputBaclava == null ? "<null>" : outputBaclava
 					.getName());
 			// TODO: check cmdir and cmpass
@@ -160,7 +159,7 @@ public class LocalWorkerTest {
 	public void setUp() throws Exception {
 		lw = new LocalWorker("XWC", "WF", null, randomUUID(),
 				new HashMap<String, String>(), new ArrayList<String>(), factory);
-		events = new ArrayList<String>();
+		events = new ArrayList<>();
 		returnThisStatus = RemoteStatus.Operating;
 	}
 


[06/50] [abbrv] incubator-taverna-server git commit: Empty delimiter is same as undelimited.

Posted by st...@apache.org.
Empty delimiter is same as undelimited.

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/be2723ec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/be2723ec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/be2723ec

Branch: refs/heads/master
Commit: be2723ec3f5ad6bcc5573b4371d84b0842a4bf58
Parents: ef0aeb0
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Fri Mar 28 14:11:32 2014 +0000
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Fri Mar 28 14:11:32 2014 +0000

----------------------------------------------------------------------
 .../src/main/java/org/taverna/server/master/InputREST.java     | 6 +++++-
 .../org/taverna/server/master/rest/TavernaServerInputREST.java | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/be2723ec/server-webapp/src/main/java/org/taverna/server/master/InputREST.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/InputREST.java b/server-webapp/src/main/java/org/taverna/server/master/InputREST.java
index a1a7387..6dd41d0 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/InputREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/InputREST.java
@@ -131,8 +131,12 @@ class InputREST implements TavernaServerInputREST, InputBean {
 			throw new BadInputPortNameException("bad input name");
 		if (ac == null)
 			throw new BadPropertyValueException("no content!");
+		if (inputDescriptor.delimiter != null
+				&& inputDescriptor.delimiter.isEmpty())
+			inputDescriptor.delimiter = null;
 		if (ac instanceof InDesc.Reference)
-			return setRemoteInput(name, (InDesc.Reference) ac, inputDescriptor.delimiter, ui);
+			return setRemoteInput(name, (InDesc.Reference) ac,
+					inputDescriptor.delimiter, ui);
 		if (!(ac instanceof InDesc.File || ac instanceof InDesc.Value))
 			throw new BadPropertyValueException("unknown content type");
 		support.permitUpdate(run);

http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/be2723ec/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerInputREST.java
----------------------------------------------------------------------
diff --git a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerInputREST.java b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerInputREST.java
index 14aad3f..dcd2629 100644
--- a/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerInputREST.java
+++ b/server-webapp/src/main/java/org/taverna/server/master/rest/TavernaServerInputREST.java
@@ -292,7 +292,7 @@ public interface TavernaServerInputREST {
 		@XmlAttribute(required = false)
 		public Uri descriptorRef;
 		/** The character to use to split the input into a list. */
-		@XmlAttribute(required = false)
+		@XmlAttribute(name = "listDelimiter", required = false)
 		public String delimiter;
 
 		/**


[28/50] [abbrv] incubator-taverna-server git commit: Taverna Commandline 2.5.1-SNAPSHOT

Posted by st...@apache.org.
Taverna Commandline 2.5.1-SNAPSHOT


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/b8e9c409
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/b8e9c409
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/b8e9c409

Branch: refs/heads/master
Commit: b8e9c409e3a8cfb5844e23936c7efd67dc7bebc0
Parents: 7ed66db
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Authored: Mon May 12 17:26:12 2014 +0100
Committer: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Committed: Mon May 12 17:26:12 2014 +0100

----------------------------------------------------------------------
 server-webapp/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/b8e9c409/server-webapp/pom.xml
----------------------------------------------------------------------
diff --git a/server-webapp/pom.xml b/server-webapp/pom.xml
index f5d7584..05cdf3f 100644
--- a/server-webapp/pom.xml
+++ b/server-webapp/pom.xml
@@ -20,7 +20,7 @@
 		<version.spring-security>3.1.4.RELEASE</version.spring-security>
 		<version.asm>3.3.1</version.asm>
 		<version.smack>3.2.1</version.smack>
-		<version.commandline>2.5.0</version.commandline>
+		<version.commandline>2.5.1-SNAPSHOT</version.commandline>
 		<edition.commandline>enterprise</edition.commandline>
 		<version.jdoapi>3.0.1</version.jdoapi>
 		<forker.module>server-unix-forker</forker.module>


[23/50] [abbrv] incubator-taverna-server git commit: Ensure that we apply patches to the correct directory.

Posted by st...@apache.org.
Ensure that we apply patches to the correct directory.

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/d285a5fb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/d285a5fb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/d285a5fb

Branch: refs/heads/master
Commit: d285a5fbfa86b6e7e8e33baffb54830ecec256af
Parents: 88716a8
Author: Donal Fellows <do...@manchester.ac.uk>
Authored: Fri Apr 25 10:44:14 2014 +0100
Committer: Donal Fellows <do...@manchester.ac.uk>
Committed: Fri Apr 25 10:44:14 2014 +0100

----------------------------------------------------------------------
 server-webapp/pom.xml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/d285a5fb/server-webapp/pom.xml
----------------------------------------------------------------------
diff --git a/server-webapp/pom.xml b/server-webapp/pom.xml
index 4a1cdfa..f5d7584 100644
--- a/server-webapp/pom.xml
+++ b/server-webapp/pom.xml
@@ -25,6 +25,7 @@
 		<version.jdoapi>3.0.1</version.jdoapi>
 		<forker.module>server-unix-forker</forker.module>
 		<util.dir>${project.build.directory}/${project.build.finalName}/WEB-INF/classes/util</util.dir>
+		<cmdline.dir>${util.dir}/taverna-commandline-${edition.commandline}-${version.commandline}</cmdline.dir>
 	</properties>
 
 	<dependencies>
@@ -719,7 +720,7 @@
 							<goal>copy-resources</goal>
 						</goals>
 						<configuration>
-							<outputDirectory>${util.dir}/taverna-commandline-${version.commandline}</outputDirectory>
+							<outputDirectory>${cmdline.dir}</outputDirectory>
 							<resources>
 								<resource>
 									<directory>src/main/replacementscripts</directory>
@@ -744,9 +745,9 @@
 						</goals>
 						<configuration>
 							<executable>/bin/sh</executable>
-							<workingDirectory>${util.dir}/taverna-commandline-${version.commandline}</workingDirectory>
+							<workingDirectory>${cmdline.dir}</workingDirectory>
 							<environmentVariables>
-								<RAVEN_APPHOME>${util.dir}/taverna-commandline-${version.commandline}</RAVEN_APPHOME>
+								<RAVEN_APPHOME>${cmdline.dir}</RAVEN_APPHOME>
 							</environmentVariables>
 							<arguments>
 								<argument>./executeworkflow.sh</argument>