You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@taverna.apache.org by re...@apache.org on 2015/03/20 18:01:08 UTC
incubator-taverna-engine git commit: package names changed to
org.apache.taverna.*
Repository: incubator-taverna-engine
Updated Branches:
refs/heads/master 55900be96 -> a36853983
package names changed to org.apache.taverna.*
Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/commit/a3685398
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/tree/a3685398
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/diff/a3685398
Branch: refs/heads/master
Commit: a3685398337646594a72b44fc4bee3bfa670c788
Parents: 55900be
Author: redmitry <re...@84.88.50.62>
Authored: Fri Mar 20 16:46:28 2015 +0100
Committer: bscuser <bs...@84.88.50.62>
Committed: Fri Mar 20 17:56:37 2015 +0100
----------------------------------------------------------------------
.../api/ActivityConfigurationException.java | 45 ++++++
.../api/ActivityNotFoundException.java | 45 ++++++
.../capability/api/ActivityService.java | 125 +++++++++++++++++
.../capability/api/ConfigurationException.java | 47 +++++++
.../DispatchLayerConfigurationException.java | 45 ++++++
.../api/DispatchLayerNotFoundException.java | 45 ++++++
.../capability/api/DispatchLayerService.java | 89 ++++++++++++
.../api/ActivityConfigurationException.java | 46 ------
.../api/ActivityNotFoundException.java | 46 ------
.../capability/api/ActivityService.java | 126 -----------------
.../capability/api/ConfigurationException.java | 48 -------
.../DispatchLayerConfigurationException.java | 46 ------
.../api/DispatchLayerNotFoundException.java | 46 ------
.../capability/api/DispatchLayerService.java | 90 ------------
.../activity/impl/ActivityServiceImpl.java | 139 ++++++++++++++++++
.../dispatch/impl/DispatchLayerServiceImpl.java | 111 +++++++++++++++
.../activity/impl/ActivityServiceImpl.java | 140 -------------------
.../dispatch/impl/DispatchLayerServiceImpl.java | 112 ---------------
.../execution/api/ExecutionEnvironment.java | 8 +-
.../impl/ExecutionEnvironmentServiceImpl.java | 8 +-
.../execution/impl/local/LocalExecution.java | 4 +-
.../impl/local/LocalExecutionEnvironment.java | 12 +-
.../impl/local/LocalExecutionService.java | 4 +-
.../impl/local/WorkflowToDataflowMapper.java | 12 +-
.../services/impl/ServiceRegistryImpl.java | 6 +-
25 files changed, 718 insertions(+), 727 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/a3685398/taverna-capability-api/src/main/java/org/apache/taverna/platform/capability/api/ActivityConfigurationException.java
----------------------------------------------------------------------
diff --git a/taverna-capability-api/src/main/java/org/apache/taverna/platform/capability/api/ActivityConfigurationException.java b/taverna-capability-api/src/main/java/org/apache/taverna/platform/capability/api/ActivityConfigurationException.java
new file mode 100644
index 0000000..56854e8
--- /dev/null
+++ b/taverna-capability-api/src/main/java/org/apache/taverna/platform/capability/api/ActivityConfigurationException.java
@@ -0,0 +1,45 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+package org.apache.taverna.platform.capability.api;
+
+/**
+ * Thrown when an activity's configuration is incorrect.
+ *
+ * @author David Withers
+ */
+public class ActivityConfigurationException extends ConfigurationException {
+ private static final long serialVersionUID = 3132495676192826758L;
+
+ public ActivityConfigurationException() {
+ super();
+ }
+
+ public ActivityConfigurationException(String message) {
+ super(message);
+ }
+
+ public ActivityConfigurationException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public ActivityConfigurationException(Throwable cause) {
+ super(cause);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/a3685398/taverna-capability-api/src/main/java/org/apache/taverna/platform/capability/api/ActivityNotFoundException.java
----------------------------------------------------------------------
diff --git a/taverna-capability-api/src/main/java/org/apache/taverna/platform/capability/api/ActivityNotFoundException.java b/taverna-capability-api/src/main/java/org/apache/taverna/platform/capability/api/ActivityNotFoundException.java
new file mode 100644
index 0000000..3226aa6
--- /dev/null
+++ b/taverna-capability-api/src/main/java/org/apache/taverna/platform/capability/api/ActivityNotFoundException.java
@@ -0,0 +1,45 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+package org.apache.taverna.platform.capability.api;
+
+/**
+ * Thrown when an activity is not found.
+ *
+ * @author David Withers
+ */
+public class ActivityNotFoundException extends Exception {
+ private static final long serialVersionUID = 1232220199558615801L;
+
+ public ActivityNotFoundException() {
+ super();
+ }
+
+ public ActivityNotFoundException(String message) {
+ super(message);
+ }
+
+ public ActivityNotFoundException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public ActivityNotFoundException(Throwable cause) {
+ super(cause);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/a3685398/taverna-capability-api/src/main/java/org/apache/taverna/platform/capability/api/ActivityService.java
----------------------------------------------------------------------
diff --git a/taverna-capability-api/src/main/java/org/apache/taverna/platform/capability/api/ActivityService.java b/taverna-capability-api/src/main/java/org/apache/taverna/platform/capability/api/ActivityService.java
new file mode 100644
index 0000000..fe8adac
--- /dev/null
+++ b/taverna-capability-api/src/main/java/org/apache/taverna/platform/capability/api/ActivityService.java
@@ -0,0 +1,125 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+package org.apache.taverna.platform.capability.api;
+
+import java.net.URI;
+import java.util.Set;
+
+import net.sf.taverna.t2.workflowmodel.processor.activity.Activity;
+import org.apache.taverna.scufl2.api.port.InputActivityPort;
+import org.apache.taverna.scufl2.api.port.OutputActivityPort;
+
+import com.fasterxml.jackson.databind.JsonNode;
+
+/**
+ * Service for discovering available activities and the properties required to
+ * configure the activities.
+ *
+ * @author David Withers
+ */
+public interface ActivityService {
+ /**
+ * Returns the available activity types.
+ *
+ * @return the available activity types
+ */
+ Set<URI> getActivityTypes();
+
+ /**
+ * Returns true if and only if the activity type exists.
+ *
+ * @param uri
+ * the activity type to check
+ * @return whether the activity type exists
+ */
+ boolean activityExists(URI activityType);
+
+ /**
+ * Returns the JSON Schema for the configuration required by an activity.
+ *
+ * @param activityType
+ * the activity type
+ * @return the JSON Schema for the configuration required by an activity
+ * @throws ActivityNotFoundException
+ * if an activity cannot be found for the specified URI
+ * @throws ActivityConfigurationException
+ * if the JSON Schema cannot be created
+ */
+ JsonNode getActivityConfigurationSchema(URI activityType)
+ throws ActivityNotFoundException, ActivityConfigurationException;
+
+ /**
+ * Returns the input ports that the activity type requires to be present in
+ * order to execute with the specified configuration.
+ * <p>
+ * If the activity does not require any input port for the configuration
+ * then an empty set is returned.
+ *
+ * @param configuration
+ * the activity configuration
+ * @throws ActivityNotFoundException
+ * if the activity cannot be found
+ * @throws ActivityConfigurationException
+ * if the activity configuration is incorrect
+ * @return the input ports that the activity requires to be present in order
+ * to execute
+ */
+ Set<InputActivityPort> getActivityInputPorts(URI activityType,
+ JsonNode configuration) throws ActivityNotFoundException,
+ ActivityConfigurationException;
+
+ /**
+ * Returns the output ports that the activity type requires to be present in
+ * order to execute with the specified configuration.
+ * <p>
+ * If the activity type does not require any output ports for the
+ * configuration then an empty set is returned.
+ *
+ * @param configuration
+ * the activity configuration
+ * @throws ActivityNotFoundException
+ * if the activity cannot be found
+ * @throws ActivityConfigurationException
+ * if the activity configuration is incorrect
+ * @return the output ports that the activity requires to be present in
+ * order to execute
+ */
+ Set<OutputActivityPort> getActivityOutputPorts(URI activityType,
+ JsonNode configuration) throws ActivityNotFoundException,
+ ActivityConfigurationException;
+
+ /**
+ * Returns the activity for the specified activity type. If configuration is
+ * not null the returned activity will be configured.
+ *
+ * @param activityType
+ * the activity type
+ * @param configuration
+ * the configuration for the activity, can be <code>null</code>
+ * @return the activity for the specified activityType
+ * @throws ActivityNotFoundException
+ * if an activity cannot be found for the specified activity
+ * type
+ * @throws ActivityConfigurationException
+ * if the configuration is not valid
+ */
+ Activity<?> createActivity(URI activityType, JsonNode configuration)
+ throws ActivityNotFoundException, ActivityConfigurationException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/a3685398/taverna-capability-api/src/main/java/org/apache/taverna/platform/capability/api/ConfigurationException.java
----------------------------------------------------------------------
diff --git a/taverna-capability-api/src/main/java/org/apache/taverna/platform/capability/api/ConfigurationException.java b/taverna-capability-api/src/main/java/org/apache/taverna/platform/capability/api/ConfigurationException.java
new file mode 100644
index 0000000..ef3c784
--- /dev/null
+++ b/taverna-capability-api/src/main/java/org/apache/taverna/platform/capability/api/ConfigurationException.java
@@ -0,0 +1,47 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+package org.apache.taverna.platform.capability.api;
+
+/**
+ * Thrown when a {@link org.apache.taverna.scufl2.api.common.Configurable
+ * Configurable} cannot be configured by a
+ * {@link org.apache.taverna.scufl2.api.configurations.Configuration Configuration}.
+ *
+ * @author David Withers
+ */
+public class ConfigurationException extends Exception {
+ private static final long serialVersionUID = -6129960388197785712L;
+
+ public ConfigurationException() {
+ super();
+ }
+
+ public ConfigurationException(String message) {
+ super(message);
+ }
+
+ public ConfigurationException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public ConfigurationException(Throwable cause) {
+ super(cause);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/a3685398/taverna-capability-api/src/main/java/org/apache/taverna/platform/capability/api/DispatchLayerConfigurationException.java
----------------------------------------------------------------------
diff --git a/taverna-capability-api/src/main/java/org/apache/taverna/platform/capability/api/DispatchLayerConfigurationException.java b/taverna-capability-api/src/main/java/org/apache/taverna/platform/capability/api/DispatchLayerConfigurationException.java
new file mode 100644
index 0000000..1950224
--- /dev/null
+++ b/taverna-capability-api/src/main/java/org/apache/taverna/platform/capability/api/DispatchLayerConfigurationException.java
@@ -0,0 +1,45 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+package org.apache.taverna.platform.capability.api;
+
+/**
+ * Thrown when a dispatch layer's configuration is incorrect.
+ *
+ * @author David Withers
+ */
+public class DispatchLayerConfigurationException extends ConfigurationException {
+ private static final long serialVersionUID = -6180865500734235308L;
+
+ public DispatchLayerConfigurationException() {
+ super();
+ }
+
+ public DispatchLayerConfigurationException(String message) {
+ super(message);
+ }
+
+ public DispatchLayerConfigurationException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public DispatchLayerConfigurationException(Throwable cause) {
+ super(cause);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/a3685398/taverna-capability-api/src/main/java/org/apache/taverna/platform/capability/api/DispatchLayerNotFoundException.java
----------------------------------------------------------------------
diff --git a/taverna-capability-api/src/main/java/org/apache/taverna/platform/capability/api/DispatchLayerNotFoundException.java b/taverna-capability-api/src/main/java/org/apache/taverna/platform/capability/api/DispatchLayerNotFoundException.java
new file mode 100644
index 0000000..e8d0278
--- /dev/null
+++ b/taverna-capability-api/src/main/java/org/apache/taverna/platform/capability/api/DispatchLayerNotFoundException.java
@@ -0,0 +1,45 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+package org.apache.taverna.platform.capability.api;
+
+/**
+ * Thrown when a dispatch layer is not found.
+ *
+ * @author David Withers
+ */
+public class DispatchLayerNotFoundException extends Exception {
+ private static final long serialVersionUID = -7227237239711803139L;
+
+ public DispatchLayerNotFoundException() {
+ super();
+ }
+
+ public DispatchLayerNotFoundException(String message) {
+ super(message);
+ }
+
+ public DispatchLayerNotFoundException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public DispatchLayerNotFoundException(Throwable cause) {
+ super(cause);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/a3685398/taverna-capability-api/src/main/java/org/apache/taverna/platform/capability/api/DispatchLayerService.java
----------------------------------------------------------------------
diff --git a/taverna-capability-api/src/main/java/org/apache/taverna/platform/capability/api/DispatchLayerService.java b/taverna-capability-api/src/main/java/org/apache/taverna/platform/capability/api/DispatchLayerService.java
new file mode 100644
index 0000000..a6cfb53
--- /dev/null
+++ b/taverna-capability-api/src/main/java/org/apache/taverna/platform/capability/api/DispatchLayerService.java
@@ -0,0 +1,89 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+package org.apache.taverna.platform.capability.api;
+
+import java.net.URI;
+import java.util.Set;
+
+import net.sf.taverna.t2.workflowmodel.processor.dispatch.DispatchLayer;
+
+import com.fasterxml.jackson.databind.JsonNode;
+
+/**
+ * Service for discovering available dispatch layers and the properties required
+ * to configure the layers.
+ *
+ * @author David Withers
+ */
+public interface DispatchLayerService {
+ /**
+ * Returns the available dispatch layer types.
+ *
+ * @return a the available dispatch layer types
+ */
+ Set<URI> getDispatchLayerTypes();
+
+ /**
+ * Returns true iff a dispatch layer exists for the specified URI.
+ *
+ * @param dispatchLayerType
+ * the dispatch layer type to check
+ * @return true if a dispatch layer exists for the specified URI
+ */
+ boolean dispatchLayerExists(URI dispatchLayerType);
+
+ /**
+ * Returns the JSON Schema for the configuration required by a dispatch
+ * layer.
+ *
+ * @param activityType
+ * the activity type
+ * @return the JSON Schema for the configuration required by a dispatch
+ * layer
+ * @throws DispatchLayerNotFoundException
+ * if a dispatch layer cannot be found for the specified URI
+ * @throws DispatchLayerConfigurationException
+ * if the JSON Schema cannot be created
+ */
+ JsonNode getDispatchLayerConfigurationSchema(URI dispatchLayerType)
+ throws DispatchLayerNotFoundException,
+ DispatchLayerConfigurationException;
+
+ /**
+ * Returns the dispatch layer for the specified URI.
+ *
+ * If configuration is not null the returned dispatch layer will be
+ * configured.
+ *
+ * @param uri
+ * a URI that identifies a dispatch layer
+ * @param configuration
+ * the configuration for the dispatch layer, can be
+ * <code>null</code>
+ * @return the dispatch layer for the specified URI
+ * @throws DispatchLayerNotFoundException
+ * if a dispatch layer cannot be found for the specified URI
+ * @throws DispatchLayerConfigurationException
+ * if the configuration is not valid
+ */
+ DispatchLayer<?> createDispatchLayer(URI uri, JsonNode configuration)
+ throws DispatchLayerNotFoundException,
+ DispatchLayerConfigurationException;
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/a3685398/taverna-capability-api/src/main/java/uk/org/taverna/platform/capability/api/ActivityConfigurationException.java
----------------------------------------------------------------------
diff --git a/taverna-capability-api/src/main/java/uk/org/taverna/platform/capability/api/ActivityConfigurationException.java b/taverna-capability-api/src/main/java/uk/org/taverna/platform/capability/api/ActivityConfigurationException.java
deleted file mode 100644
index c9833e9..0000000
--- a/taverna-capability-api/src/main/java/uk/org/taverna/platform/capability/api/ActivityConfigurationException.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2010 The University of Manchester
- *
- * Modifications to the initial code base are copyright of their
- * respective authors, or their employers as appropriate.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package uk.org.taverna.platform.capability.api;
-
-/**
- * Thrown when an activity's configuration is incorrect.
- *
- * @author David Withers
- */
-public class ActivityConfigurationException extends ConfigurationException {
- private static final long serialVersionUID = 3132495676192826758L;
-
- public ActivityConfigurationException() {
- super();
- }
-
- public ActivityConfigurationException(String message) {
- super(message);
- }
-
- public ActivityConfigurationException(String message, Throwable cause) {
- super(message, cause);
- }
-
- public ActivityConfigurationException(Throwable cause) {
- super(cause);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/a3685398/taverna-capability-api/src/main/java/uk/org/taverna/platform/capability/api/ActivityNotFoundException.java
----------------------------------------------------------------------
diff --git a/taverna-capability-api/src/main/java/uk/org/taverna/platform/capability/api/ActivityNotFoundException.java b/taverna-capability-api/src/main/java/uk/org/taverna/platform/capability/api/ActivityNotFoundException.java
deleted file mode 100644
index 82a6e71..0000000
--- a/taverna-capability-api/src/main/java/uk/org/taverna/platform/capability/api/ActivityNotFoundException.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2010 The University of Manchester
- *
- * Modifications to the initial code base are copyright of their
- * respective authors, or their employers as appropriate.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package uk.org.taverna.platform.capability.api;
-
-/**
- * Thrown when an activity is not found.
- *
- * @author David Withers
- */
-public class ActivityNotFoundException extends Exception {
- private static final long serialVersionUID = 1232220199558615801L;
-
- public ActivityNotFoundException() {
- super();
- }
-
- public ActivityNotFoundException(String message) {
- super(message);
- }
-
- public ActivityNotFoundException(String message, Throwable cause) {
- super(message, cause);
- }
-
- public ActivityNotFoundException(Throwable cause) {
- super(cause);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/a3685398/taverna-capability-api/src/main/java/uk/org/taverna/platform/capability/api/ActivityService.java
----------------------------------------------------------------------
diff --git a/taverna-capability-api/src/main/java/uk/org/taverna/platform/capability/api/ActivityService.java b/taverna-capability-api/src/main/java/uk/org/taverna/platform/capability/api/ActivityService.java
deleted file mode 100644
index 683ea0e..0000000
--- a/taverna-capability-api/src/main/java/uk/org/taverna/platform/capability/api/ActivityService.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2010 The University of Manchester
- *
- * Modifications to the initial code base are copyright of their
- * respective authors, or their employers as appropriate.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package uk.org.taverna.platform.capability.api;
-
-import java.net.URI;
-import java.util.Set;
-
-import net.sf.taverna.t2.workflowmodel.processor.activity.Activity;
-import org.apache.taverna.scufl2.api.port.InputActivityPort;
-import org.apache.taverna.scufl2.api.port.OutputActivityPort;
-
-import com.fasterxml.jackson.databind.JsonNode;
-
-/**
- * Service for discovering available activities and the properties required to
- * configure the activities.
- *
- * @author David Withers
- */
-public interface ActivityService {
- /**
- * Returns the available activity types.
- *
- * @return the available activity types
- */
- Set<URI> getActivityTypes();
-
- /**
- * Returns true if and only if the activity type exists.
- *
- * @param uri
- * the activity type to check
- * @return whether the activity type exists
- */
- boolean activityExists(URI activityType);
-
- /**
- * Returns the JSON Schema for the configuration required by an activity.
- *
- * @param activityType
- * the activity type
- * @return the JSON Schema for the configuration required by an activity
- * @throws ActivityNotFoundException
- * if an activity cannot be found for the specified URI
- * @throws ActivityConfigurationException
- * if the JSON Schema cannot be created
- */
- JsonNode getActivityConfigurationSchema(URI activityType)
- throws ActivityNotFoundException, ActivityConfigurationException;
-
- /**
- * Returns the input ports that the activity type requires to be present in
- * order to execute with the specified configuration.
- * <p>
- * If the activity does not require any input port for the configuration
- * then an empty set is returned.
- *
- * @param configuration
- * the activity configuration
- * @throws ActivityNotFoundException
- * if the activity cannot be found
- * @throws ActivityConfigurationException
- * if the activity configuration is incorrect
- * @return the input ports that the activity requires to be present in order
- * to execute
- */
- Set<InputActivityPort> getActivityInputPorts(URI activityType,
- JsonNode configuration) throws ActivityNotFoundException,
- ActivityConfigurationException;
-
- /**
- * Returns the output ports that the activity type requires to be present in
- * order to execute with the specified configuration.
- * <p>
- * If the activity type does not require any output ports for the
- * configuration then an empty set is returned.
- *
- * @param configuration
- * the activity configuration
- * @throws ActivityNotFoundException
- * if the activity cannot be found
- * @throws ActivityConfigurationException
- * if the activity configuration is incorrect
- * @return the output ports that the activity requires to be present in
- * order to execute
- */
- Set<OutputActivityPort> getActivityOutputPorts(URI activityType,
- JsonNode configuration) throws ActivityNotFoundException,
- ActivityConfigurationException;
-
- /**
- * Returns the activity for the specified activity type. If configuration is
- * not null the returned activity will be configured.
- *
- * @param activityType
- * the activity type
- * @param configuration
- * the configuration for the activity, can be <code>null</code>
- * @return the activity for the specified activityType
- * @throws ActivityNotFoundException
- * if an activity cannot be found for the specified activity
- * type
- * @throws ActivityConfigurationException
- * if the configuration is not valid
- */
- Activity<?> createActivity(URI activityType, JsonNode configuration)
- throws ActivityNotFoundException, ActivityConfigurationException;
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/a3685398/taverna-capability-api/src/main/java/uk/org/taverna/platform/capability/api/ConfigurationException.java
----------------------------------------------------------------------
diff --git a/taverna-capability-api/src/main/java/uk/org/taverna/platform/capability/api/ConfigurationException.java b/taverna-capability-api/src/main/java/uk/org/taverna/platform/capability/api/ConfigurationException.java
deleted file mode 100644
index 6abf43a..0000000
--- a/taverna-capability-api/src/main/java/uk/org/taverna/platform/capability/api/ConfigurationException.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2010 The University of Manchester
- *
- * Modifications to the initial code base are copyright of their
- * respective authors, or their employers as appropriate.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package uk.org.taverna.platform.capability.api;
-
-/**
- * Thrown when a {@link org.apache.taverna.scufl2.api.common.Configurable
- * Configurable} cannot be configured by a
- * {@link org.apache.taverna.scufl2.api.configurations.Configuration Configuration}.
- *
- * @author David Withers
- */
-public class ConfigurationException extends Exception {
- private static final long serialVersionUID = -6129960388197785712L;
-
- public ConfigurationException() {
- super();
- }
-
- public ConfigurationException(String message) {
- super(message);
- }
-
- public ConfigurationException(String message, Throwable cause) {
- super(message, cause);
- }
-
- public ConfigurationException(Throwable cause) {
- super(cause);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/a3685398/taverna-capability-api/src/main/java/uk/org/taverna/platform/capability/api/DispatchLayerConfigurationException.java
----------------------------------------------------------------------
diff --git a/taverna-capability-api/src/main/java/uk/org/taverna/platform/capability/api/DispatchLayerConfigurationException.java b/taverna-capability-api/src/main/java/uk/org/taverna/platform/capability/api/DispatchLayerConfigurationException.java
deleted file mode 100644
index 824df29..0000000
--- a/taverna-capability-api/src/main/java/uk/org/taverna/platform/capability/api/DispatchLayerConfigurationException.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2011 The University of Manchester
- *
- * Modifications to the initial code base are copyright of their
- * respective authors, or their employers as appropriate.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package uk.org.taverna.platform.capability.api;
-
-/**
- * Thrown when a dispatch layer's configuration is incorrect.
- *
- * @author David Withers
- */
-public class DispatchLayerConfigurationException extends ConfigurationException {
- private static final long serialVersionUID = -6180865500734235308L;
-
- public DispatchLayerConfigurationException() {
- super();
- }
-
- public DispatchLayerConfigurationException(String message) {
- super(message);
- }
-
- public DispatchLayerConfigurationException(String message, Throwable cause) {
- super(message, cause);
- }
-
- public DispatchLayerConfigurationException(Throwable cause) {
- super(cause);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/a3685398/taverna-capability-api/src/main/java/uk/org/taverna/platform/capability/api/DispatchLayerNotFoundException.java
----------------------------------------------------------------------
diff --git a/taverna-capability-api/src/main/java/uk/org/taverna/platform/capability/api/DispatchLayerNotFoundException.java b/taverna-capability-api/src/main/java/uk/org/taverna/platform/capability/api/DispatchLayerNotFoundException.java
deleted file mode 100644
index 7492b61..0000000
--- a/taverna-capability-api/src/main/java/uk/org/taverna/platform/capability/api/DispatchLayerNotFoundException.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2011 The University of Manchester
- *
- * Modifications to the initial code base are copyright of their
- * respective authors, or their employers as appropriate.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package uk.org.taverna.platform.capability.api;
-
-/**
- * Thrown when a dispatch layer is not found.
- *
- * @author David Withers
- */
-public class DispatchLayerNotFoundException extends Exception {
- private static final long serialVersionUID = -7227237239711803139L;
-
- public DispatchLayerNotFoundException() {
- super();
- }
-
- public DispatchLayerNotFoundException(String message) {
- super(message);
- }
-
- public DispatchLayerNotFoundException(String message, Throwable cause) {
- super(message, cause);
- }
-
- public DispatchLayerNotFoundException(Throwable cause) {
- super(cause);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/a3685398/taverna-capability-api/src/main/java/uk/org/taverna/platform/capability/api/DispatchLayerService.java
----------------------------------------------------------------------
diff --git a/taverna-capability-api/src/main/java/uk/org/taverna/platform/capability/api/DispatchLayerService.java b/taverna-capability-api/src/main/java/uk/org/taverna/platform/capability/api/DispatchLayerService.java
deleted file mode 100644
index 978b1b5..0000000
--- a/taverna-capability-api/src/main/java/uk/org/taverna/platform/capability/api/DispatchLayerService.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2011 The University of Manchester
- *
- * Modifications to the initial code base are copyright of their
- * respective authors, or their employers as appropriate.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package uk.org.taverna.platform.capability.api;
-
-import java.net.URI;
-import java.util.Set;
-
-import net.sf.taverna.t2.workflowmodel.processor.dispatch.DispatchLayer;
-
-import com.fasterxml.jackson.databind.JsonNode;
-
-/**
- * Service for discovering available dispatch layers and the properties required
- * to configure the layers.
- *
- * @author David Withers
- */
-public interface DispatchLayerService {
- /**
- * Returns the available dispatch layer types.
- *
- * @return a the available dispatch layer types
- */
- Set<URI> getDispatchLayerTypes();
-
- /**
- * Returns true iff a dispatch layer exists for the specified URI.
- *
- * @param dispatchLayerType
- * the dispatch layer type to check
- * @return true if a dispatch layer exists for the specified URI
- */
- boolean dispatchLayerExists(URI dispatchLayerType);
-
- /**
- * Returns the JSON Schema for the configuration required by a dispatch
- * layer.
- *
- * @param activityType
- * the activity type
- * @return the JSON Schema for the configuration required by a dispatch
- * layer
- * @throws DispatchLayerNotFoundException
- * if a dispatch layer cannot be found for the specified URI
- * @throws DispatchLayerConfigurationException
- * if the JSON Schema cannot be created
- */
- JsonNode getDispatchLayerConfigurationSchema(URI dispatchLayerType)
- throws DispatchLayerNotFoundException,
- DispatchLayerConfigurationException;
-
- /**
- * Returns the dispatch layer for the specified URI.
- *
- * If configuration is not null the returned dispatch layer will be
- * configured.
- *
- * @param uri
- * a URI that identifies a dispatch layer
- * @param configuration
- * the configuration for the dispatch layer, can be
- * <code>null</code>
- * @return the dispatch layer for the specified URI
- * @throws DispatchLayerNotFoundException
- * if a dispatch layer cannot be found for the specified URI
- * @throws DispatchLayerConfigurationException
- * if the configuration is not valid
- */
- DispatchLayer<?> createDispatchLayer(URI uri, JsonNode configuration)
- throws DispatchLayerNotFoundException,
- DispatchLayerConfigurationException;
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/a3685398/taverna-capability-impl/src/main/java/org/apache/taverna/platform/capability/activity/impl/ActivityServiceImpl.java
----------------------------------------------------------------------
diff --git a/taverna-capability-impl/src/main/java/org/apache/taverna/platform/capability/activity/impl/ActivityServiceImpl.java b/taverna-capability-impl/src/main/java/org/apache/taverna/platform/capability/activity/impl/ActivityServiceImpl.java
new file mode 100644
index 0000000..685b2bd
--- /dev/null
+++ b/taverna-capability-impl/src/main/java/org/apache/taverna/platform/capability/activity/impl/ActivityServiceImpl.java
@@ -0,0 +1,139 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+package org.apache.taverna.platform.capability.activity.impl;
+
+import java.net.URI;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import net.sf.taverna.t2.workflowmodel.processor.activity.Activity;
+import net.sf.taverna.t2.workflowmodel.processor.activity.ActivityFactory;
+import net.sf.taverna.t2.workflowmodel.processor.activity.ActivityInputPort;
+import net.sf.taverna.t2.workflowmodel.processor.activity.ActivityOutputPort;
+import org.apache.taverna.platform.capability.api.ActivityConfigurationException;
+import org.apache.taverna.platform.capability.api.ActivityNotFoundException;
+import org.apache.taverna.platform.capability.api.ActivityService;
+import org.apache.taverna.scufl2.api.port.InputActivityPort;
+import org.apache.taverna.scufl2.api.port.OutputActivityPort;
+
+import com.fasterxml.jackson.databind.JsonNode;
+
+public class ActivityServiceImpl implements ActivityService {
+ private List<ActivityFactory> activityFactories;
+
+ @Override
+ public Set<URI> getActivityTypes() {
+ Set<URI> activityTypes = new HashSet<>();
+ for (ActivityFactory activityFactory : activityFactories)
+ activityTypes.add(activityFactory.getActivityType());
+ return activityTypes;
+ }
+
+ @Override
+ public boolean activityExists(URI uri) {
+ for (ActivityFactory activityFactory : activityFactories)
+ if (activityFactory.getActivityType().equals(uri))
+ return true;
+ return false;
+ }
+
+ @Override
+ public JsonNode getActivityConfigurationSchema(URI activityType)
+ throws ActivityNotFoundException {
+ ActivityFactory factory = getActivityFactory(activityType);
+ return factory.getActivityConfigurationSchema();
+ }
+
+ @Override
+ public Activity<?> createActivity(URI activityType, JsonNode configuration)
+ throws ActivityNotFoundException, ActivityConfigurationException {
+ ActivityFactory factory = getActivityFactory(activityType);
+ @SuppressWarnings("unchecked")
+ Activity<JsonNode> activity = (Activity<JsonNode>) factory
+ .createActivity();
+ try {
+ if (configuration != null)
+ activity.configure(configuration);
+ } catch (net.sf.taverna.t2.workflowmodel.processor.activity.ActivityConfigurationException e) {
+ throw new ActivityConfigurationException(e);
+ }
+ return activity;
+ }
+
+ @Override
+ public Set<InputActivityPort> getActivityInputPorts(URI activityType,
+ JsonNode configuration) throws ActivityNotFoundException,
+ ActivityConfigurationException {
+ Set<InputActivityPort> inputPorts = new HashSet<>();
+ try {
+ for (ActivityInputPort port : getActivityFactory(activityType)
+ .getInputPorts(configuration)) {
+ InputActivityPort inputActivityPort = new InputActivityPort();
+ inputActivityPort.setName(port.getName());
+ inputActivityPort.setDepth(port.getDepth());
+ inputPorts.add(inputActivityPort);
+ }
+ return inputPorts;
+ } catch (net.sf.taverna.t2.workflowmodel.processor.activity.ActivityConfigurationException e) {
+ throw new ActivityConfigurationException(e);
+ }
+ }
+
+ @Override
+ public Set<OutputActivityPort> getActivityOutputPorts(URI activityType,
+ JsonNode configuration) throws ActivityNotFoundException,
+ ActivityConfigurationException {
+ Set<OutputActivityPort> outputPorts = new HashSet<>();
+ try {
+ for (ActivityOutputPort port : getActivityFactory(activityType)
+ .getOutputPorts(configuration)) {
+ OutputActivityPort outputActivityPort = new OutputActivityPort();
+ outputActivityPort.setName(port.getName());
+ outputActivityPort.setDepth(port.getDepth());
+ outputActivityPort.setGranularDepth(port.getGranularDepth());
+ outputPorts.add(outputActivityPort);
+ }
+ } catch (net.sf.taverna.t2.workflowmodel.processor.activity.ActivityConfigurationException e) {
+ throw new ActivityConfigurationException(e);
+ }
+ return outputPorts;
+ }
+
+ /**
+ * Sets the list of available <code>ActivityFactory</code>s. In a production
+ * environment this should be set by Spring DM.
+ *
+ * @param activityFactories
+ * the list of available <code>ActivityFactory</code>s
+ */
+ public void setActivityFactories(List<ActivityFactory> activityFactories) {
+ this.activityFactories = activityFactories;
+ }
+
+ private ActivityFactory getActivityFactory(URI activityType)
+ throws ActivityNotFoundException {
+ for (ActivityFactory activityFactory : activityFactories)
+ if (activityFactory.getActivityType().equals(activityType))
+ return activityFactory;
+ throw new ActivityNotFoundException("Could not find an activity for "
+ + activityType);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/a3685398/taverna-capability-impl/src/main/java/org/apache/taverna/platform/capability/dispatch/impl/DispatchLayerServiceImpl.java
----------------------------------------------------------------------
diff --git a/taverna-capability-impl/src/main/java/org/apache/taverna/platform/capability/dispatch/impl/DispatchLayerServiceImpl.java b/taverna-capability-impl/src/main/java/org/apache/taverna/platform/capability/dispatch/impl/DispatchLayerServiceImpl.java
new file mode 100644
index 0000000..ddad1e5
--- /dev/null
+++ b/taverna-capability-impl/src/main/java/org/apache/taverna/platform/capability/dispatch/impl/DispatchLayerServiceImpl.java
@@ -0,0 +1,111 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+package org.apache.taverna.platform.capability.dispatch.impl;
+
+import java.net.URI;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.logging.Logger;
+
+import net.sf.taverna.t2.workflowmodel.processor.dispatch.DispatchLayer;
+import net.sf.taverna.t2.workflowmodel.processor.dispatch.DispatchLayerFactory;
+import org.apache.taverna.platform.capability.api.DispatchLayerConfigurationException;
+import org.apache.taverna.platform.capability.api.DispatchLayerNotFoundException;
+import org.apache.taverna.platform.capability.api.DispatchLayerService;
+
+import com.fasterxml.jackson.databind.JsonNode;
+
+/**
+ * @author David Withers
+ */
+public class DispatchLayerServiceImpl implements DispatchLayerService {
+ @SuppressWarnings("unused")
+ private static Logger logger = Logger
+ .getLogger(DispatchLayerServiceImpl.class.getName());
+
+ private List<DispatchLayerFactory> dispatchLayerFactories;
+
+ @Override
+ public Set<URI> getDispatchLayerTypes() {
+ Set<URI> dispatchLayerTypes = new HashSet<>();
+ for (DispatchLayerFactory dispatchLayerFactory : dispatchLayerFactories)
+ dispatchLayerTypes.addAll(dispatchLayerFactory
+ .getDispatchLayerTypes());
+ return dispatchLayerTypes;
+ }
+
+ @Override
+ public boolean dispatchLayerExists(URI dispatchLayerType) {
+ for (DispatchLayerFactory dispatchLayerFactory : dispatchLayerFactories)
+ if (dispatchLayerFactory.getDispatchLayerTypes().contains(
+ dispatchLayerType))
+ return true;
+ return false;
+ }
+
+ @Override
+ public JsonNode getDispatchLayerConfigurationSchema(URI dispatchLayerType)
+ throws DispatchLayerNotFoundException {
+ DispatchLayerFactory factory = getDispatchLayerFactory(dispatchLayerType);
+ return factory.getDispatchLayerConfigurationSchema(dispatchLayerType);
+ }
+
+ @Override
+ public DispatchLayer<?> createDispatchLayer(URI dispatchLayerType,
+ JsonNode configuration) throws DispatchLayerNotFoundException,
+ DispatchLayerConfigurationException {
+ DispatchLayerFactory factory = getDispatchLayerFactory(dispatchLayerType);
+ @SuppressWarnings("unchecked")
+ DispatchLayer<JsonNode> dispatchLayer = (DispatchLayer<JsonNode>) factory
+ .createDispatchLayer(dispatchLayerType);
+
+ try {
+ if (configuration != null)
+ dispatchLayer.configure(configuration);
+ } catch (net.sf.taverna.t2.workflowmodel.ConfigurationException e) {
+ throw new DispatchLayerConfigurationException(e);
+ }
+ return dispatchLayer;
+ }
+
+ /**
+ * Sets the list of available <code>DispatchLayerFactory</code>s.
+ *
+ * In a production environment this should be set by Spring DM.
+ *
+ * @param dispatchLayerFactories
+ * the list of available <code>DispatchLayerFactory</code>s
+ */
+ public void setDispatchLayerFactories(
+ List<DispatchLayerFactory> dispatchLayerFactories) {
+ this.dispatchLayerFactories = dispatchLayerFactories;
+ }
+
+ private DispatchLayerFactory getDispatchLayerFactory(URI dispatchLayerType)
+ throws DispatchLayerNotFoundException {
+ for (DispatchLayerFactory dispatchLayerFactory : dispatchLayerFactories)
+ if (dispatchLayerFactory.getDispatchLayerTypes().contains(
+ dispatchLayerType))
+ return dispatchLayerFactory;
+ throw new DispatchLayerNotFoundException(
+ "Could not find a dispatch layer for " + dispatchLayerType);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/a3685398/taverna-capability-impl/src/main/java/uk/org/taverna/platform/capability/activity/impl/ActivityServiceImpl.java
----------------------------------------------------------------------
diff --git a/taverna-capability-impl/src/main/java/uk/org/taverna/platform/capability/activity/impl/ActivityServiceImpl.java b/taverna-capability-impl/src/main/java/uk/org/taverna/platform/capability/activity/impl/ActivityServiceImpl.java
deleted file mode 100644
index 8a2f73e..0000000
--- a/taverna-capability-impl/src/main/java/uk/org/taverna/platform/capability/activity/impl/ActivityServiceImpl.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2010 The University of Manchester
- *
- * Modifications to the initial code base are copyright of their
- * respective authors, or their employers as appropriate.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package uk.org.taverna.platform.capability.activity.impl;
-
-import java.net.URI;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import net.sf.taverna.t2.workflowmodel.processor.activity.Activity;
-import net.sf.taverna.t2.workflowmodel.processor.activity.ActivityFactory;
-import net.sf.taverna.t2.workflowmodel.processor.activity.ActivityInputPort;
-import net.sf.taverna.t2.workflowmodel.processor.activity.ActivityOutputPort;
-import uk.org.taverna.platform.capability.api.ActivityConfigurationException;
-import uk.org.taverna.platform.capability.api.ActivityNotFoundException;
-import uk.org.taverna.platform.capability.api.ActivityService;
-import org.apache.taverna.scufl2.api.port.InputActivityPort;
-import org.apache.taverna.scufl2.api.port.OutputActivityPort;
-
-import com.fasterxml.jackson.databind.JsonNode;
-
-public class ActivityServiceImpl implements ActivityService {
- private List<ActivityFactory> activityFactories;
-
- @Override
- public Set<URI> getActivityTypes() {
- Set<URI> activityTypes = new HashSet<>();
- for (ActivityFactory activityFactory : activityFactories)
- activityTypes.add(activityFactory.getActivityType());
- return activityTypes;
- }
-
- @Override
- public boolean activityExists(URI uri) {
- for (ActivityFactory activityFactory : activityFactories)
- if (activityFactory.getActivityType().equals(uri))
- return true;
- return false;
- }
-
- @Override
- public JsonNode getActivityConfigurationSchema(URI activityType)
- throws ActivityNotFoundException {
- ActivityFactory factory = getActivityFactory(activityType);
- return factory.getActivityConfigurationSchema();
- }
-
- @Override
- public Activity<?> createActivity(URI activityType, JsonNode configuration)
- throws ActivityNotFoundException, ActivityConfigurationException {
- ActivityFactory factory = getActivityFactory(activityType);
- @SuppressWarnings("unchecked")
- Activity<JsonNode> activity = (Activity<JsonNode>) factory
- .createActivity();
- try {
- if (configuration != null)
- activity.configure(configuration);
- } catch (net.sf.taverna.t2.workflowmodel.processor.activity.ActivityConfigurationException e) {
- throw new ActivityConfigurationException(e);
- }
- return activity;
- }
-
- @Override
- public Set<InputActivityPort> getActivityInputPorts(URI activityType,
- JsonNode configuration) throws ActivityNotFoundException,
- ActivityConfigurationException {
- Set<InputActivityPort> inputPorts = new HashSet<>();
- try {
- for (ActivityInputPort port : getActivityFactory(activityType)
- .getInputPorts(configuration)) {
- InputActivityPort inputActivityPort = new InputActivityPort();
- inputActivityPort.setName(port.getName());
- inputActivityPort.setDepth(port.getDepth());
- inputPorts.add(inputActivityPort);
- }
- return inputPorts;
- } catch (net.sf.taverna.t2.workflowmodel.processor.activity.ActivityConfigurationException e) {
- throw new ActivityConfigurationException(e);
- }
- }
-
- @Override
- public Set<OutputActivityPort> getActivityOutputPorts(URI activityType,
- JsonNode configuration) throws ActivityNotFoundException,
- ActivityConfigurationException {
- Set<OutputActivityPort> outputPorts = new HashSet<>();
- try {
- for (ActivityOutputPort port : getActivityFactory(activityType)
- .getOutputPorts(configuration)) {
- OutputActivityPort outputActivityPort = new OutputActivityPort();
- outputActivityPort.setName(port.getName());
- outputActivityPort.setDepth(port.getDepth());
- outputActivityPort.setGranularDepth(port.getGranularDepth());
- outputPorts.add(outputActivityPort);
- }
- } catch (net.sf.taverna.t2.workflowmodel.processor.activity.ActivityConfigurationException e) {
- throw new ActivityConfigurationException(e);
- }
- return outputPorts;
- }
-
- /**
- * Sets the list of available <code>ActivityFactory</code>s. In a production
- * environment this should be set by Spring DM.
- *
- * @param activityFactories
- * the list of available <code>ActivityFactory</code>s
- */
- public void setActivityFactories(List<ActivityFactory> activityFactories) {
- this.activityFactories = activityFactories;
- }
-
- private ActivityFactory getActivityFactory(URI activityType)
- throws ActivityNotFoundException {
- for (ActivityFactory activityFactory : activityFactories)
- if (activityFactory.getActivityType().equals(activityType))
- return activityFactory;
- throw new ActivityNotFoundException("Could not find an activity for "
- + activityType);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/a3685398/taverna-capability-impl/src/main/java/uk/org/taverna/platform/capability/dispatch/impl/DispatchLayerServiceImpl.java
----------------------------------------------------------------------
diff --git a/taverna-capability-impl/src/main/java/uk/org/taverna/platform/capability/dispatch/impl/DispatchLayerServiceImpl.java b/taverna-capability-impl/src/main/java/uk/org/taverna/platform/capability/dispatch/impl/DispatchLayerServiceImpl.java
deleted file mode 100644
index 0de59b1..0000000
--- a/taverna-capability-impl/src/main/java/uk/org/taverna/platform/capability/dispatch/impl/DispatchLayerServiceImpl.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2011 The University of Manchester
- *
- * Modifications to the initial code base are copyright of their
- * respective authors, or their employers as appropriate.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package uk.org.taverna.platform.capability.dispatch.impl;
-
-import java.net.URI;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.logging.Logger;
-
-import net.sf.taverna.t2.workflowmodel.processor.dispatch.DispatchLayer;
-import net.sf.taverna.t2.workflowmodel.processor.dispatch.DispatchLayerFactory;
-import uk.org.taverna.platform.capability.api.DispatchLayerConfigurationException;
-import uk.org.taverna.platform.capability.api.DispatchLayerNotFoundException;
-import uk.org.taverna.platform.capability.api.DispatchLayerService;
-
-import com.fasterxml.jackson.databind.JsonNode;
-
-/**
- * @author David Withers
- */
-public class DispatchLayerServiceImpl implements DispatchLayerService {
- @SuppressWarnings("unused")
- private static Logger logger = Logger
- .getLogger(DispatchLayerServiceImpl.class.getName());
-
- private List<DispatchLayerFactory> dispatchLayerFactories;
-
- @Override
- public Set<URI> getDispatchLayerTypes() {
- Set<URI> dispatchLayerTypes = new HashSet<>();
- for (DispatchLayerFactory dispatchLayerFactory : dispatchLayerFactories)
- dispatchLayerTypes.addAll(dispatchLayerFactory
- .getDispatchLayerTypes());
- return dispatchLayerTypes;
- }
-
- @Override
- public boolean dispatchLayerExists(URI dispatchLayerType) {
- for (DispatchLayerFactory dispatchLayerFactory : dispatchLayerFactories)
- if (dispatchLayerFactory.getDispatchLayerTypes().contains(
- dispatchLayerType))
- return true;
- return false;
- }
-
- @Override
- public JsonNode getDispatchLayerConfigurationSchema(URI dispatchLayerType)
- throws DispatchLayerNotFoundException {
- DispatchLayerFactory factory = getDispatchLayerFactory(dispatchLayerType);
- return factory.getDispatchLayerConfigurationSchema(dispatchLayerType);
- }
-
- @Override
- public DispatchLayer<?> createDispatchLayer(URI dispatchLayerType,
- JsonNode configuration) throws DispatchLayerNotFoundException,
- DispatchLayerConfigurationException {
- DispatchLayerFactory factory = getDispatchLayerFactory(dispatchLayerType);
- @SuppressWarnings("unchecked")
- DispatchLayer<JsonNode> dispatchLayer = (DispatchLayer<JsonNode>) factory
- .createDispatchLayer(dispatchLayerType);
-
- try {
- if (configuration != null)
- dispatchLayer.configure(configuration);
- } catch (net.sf.taverna.t2.workflowmodel.ConfigurationException e) {
- throw new DispatchLayerConfigurationException(e);
- }
- return dispatchLayer;
- }
-
- /**
- * Sets the list of available <code>DispatchLayerFactory</code>s.
- *
- * In a production environment this should be set by Spring DM.
- *
- * @param dispatchLayerFactories
- * the list of available <code>DispatchLayerFactory</code>s
- */
- public void setDispatchLayerFactories(
- List<DispatchLayerFactory> dispatchLayerFactories) {
- this.dispatchLayerFactories = dispatchLayerFactories;
- }
-
- private DispatchLayerFactory getDispatchLayerFactory(URI dispatchLayerType)
- throws DispatchLayerNotFoundException {
- for (DispatchLayerFactory dispatchLayerFactory : dispatchLayerFactories)
- if (dispatchLayerFactory.getDispatchLayerTypes().contains(
- dispatchLayerType))
- return dispatchLayerFactory;
- throw new DispatchLayerNotFoundException(
- "Could not find a dispatch layer for " + dispatchLayerType);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/a3685398/taverna-execution-api/src/main/java/uk/org/taverna/platform/execution/api/ExecutionEnvironment.java
----------------------------------------------------------------------
diff --git a/taverna-execution-api/src/main/java/uk/org/taverna/platform/execution/api/ExecutionEnvironment.java b/taverna-execution-api/src/main/java/uk/org/taverna/platform/execution/api/ExecutionEnvironment.java
index 0408308..a61e68d 100644
--- a/taverna-execution-api/src/main/java/uk/org/taverna/platform/execution/api/ExecutionEnvironment.java
+++ b/taverna-execution-api/src/main/java/uk/org/taverna/platform/execution/api/ExecutionEnvironment.java
@@ -23,10 +23,10 @@ package uk.org.taverna.platform.execution.api;
import java.net.URI;
import java.util.Set;
-import uk.org.taverna.platform.capability.api.ActivityConfigurationException;
-import uk.org.taverna.platform.capability.api.ActivityNotFoundException;
-import uk.org.taverna.platform.capability.api.DispatchLayerConfigurationException;
-import uk.org.taverna.platform.capability.api.DispatchLayerNotFoundException;
+import org.apache.taverna.platform.capability.api.ActivityConfigurationException;
+import org.apache.taverna.platform.capability.api.ActivityNotFoundException;
+import org.apache.taverna.platform.capability.api.DispatchLayerConfigurationException;
+import org.apache.taverna.platform.capability.api.DispatchLayerNotFoundException;
import com.fasterxml.jackson.databind.JsonNode;
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/a3685398/taverna-execution-impl/src/main/java/uk/org/taverna/platform/execution/impl/ExecutionEnvironmentServiceImpl.java
----------------------------------------------------------------------
diff --git a/taverna-execution-impl/src/main/java/uk/org/taverna/platform/execution/impl/ExecutionEnvironmentServiceImpl.java b/taverna-execution-impl/src/main/java/uk/org/taverna/platform/execution/impl/ExecutionEnvironmentServiceImpl.java
index c05848f..d45366e 100644
--- a/taverna-execution-impl/src/main/java/uk/org/taverna/platform/execution/impl/ExecutionEnvironmentServiceImpl.java
+++ b/taverna-execution-impl/src/main/java/uk/org/taverna/platform/execution/impl/ExecutionEnvironmentServiceImpl.java
@@ -26,10 +26,10 @@ import java.util.HashSet;
import java.util.Set;
import java.util.logging.Logger;
-import uk.org.taverna.platform.capability.api.ActivityConfigurationException;
-import uk.org.taverna.platform.capability.api.ActivityNotFoundException;
-import uk.org.taverna.platform.capability.api.DispatchLayerConfigurationException;
-import uk.org.taverna.platform.capability.api.DispatchLayerNotFoundException;
+import org.apache.taverna.platform.capability.api.ActivityConfigurationException;
+import org.apache.taverna.platform.capability.api.ActivityNotFoundException;
+import org.apache.taverna.platform.capability.api.DispatchLayerConfigurationException;
+import org.apache.taverna.platform.capability.api.DispatchLayerNotFoundException;
import uk.org.taverna.platform.execution.api.ExecutionEnvironment;
import uk.org.taverna.platform.execution.api.ExecutionEnvironmentService;
import uk.org.taverna.platform.execution.api.ExecutionService;
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/a3685398/taverna-execution-local/src/main/java/uk/org/taverna/platform/execution/impl/local/LocalExecution.java
----------------------------------------------------------------------
diff --git a/taverna-execution-local/src/main/java/uk/org/taverna/platform/execution/impl/local/LocalExecution.java b/taverna-execution-local/src/main/java/uk/org/taverna/platform/execution/impl/local/LocalExecution.java
index 796828d..df7e47f 100644
--- a/taverna-execution-local/src/main/java/uk/org/taverna/platform/execution/impl/local/LocalExecution.java
+++ b/taverna-execution-local/src/main/java/uk/org/taverna/platform/execution/impl/local/LocalExecution.java
@@ -50,8 +50,8 @@ import net.sf.taverna.t2.workflowmodel.InvalidDataflowException;
import org.apache.taverna.robundle.Bundle;
import org.apache.taverna.databundle.DataBundles;
-import uk.org.taverna.platform.capability.api.ActivityService;
-import uk.org.taverna.platform.capability.api.DispatchLayerService;
+import org.apache.taverna.platform.capability.api.ActivityService;
+import org.apache.taverna.platform.capability.api.DispatchLayerService;
import uk.org.taverna.platform.execution.api.AbstractExecution;
import uk.org.taverna.platform.execution.api.InvalidWorkflowException;
import uk.org.taverna.platform.report.ActivityReport;
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/a3685398/taverna-execution-local/src/main/java/uk/org/taverna/platform/execution/impl/local/LocalExecutionEnvironment.java
----------------------------------------------------------------------
diff --git a/taverna-execution-local/src/main/java/uk/org/taverna/platform/execution/impl/local/LocalExecutionEnvironment.java b/taverna-execution-local/src/main/java/uk/org/taverna/platform/execution/impl/local/LocalExecutionEnvironment.java
index 674dcd1..35f7a99 100644
--- a/taverna-execution-local/src/main/java/uk/org/taverna/platform/execution/impl/local/LocalExecutionEnvironment.java
+++ b/taverna-execution-local/src/main/java/uk/org/taverna/platform/execution/impl/local/LocalExecutionEnvironment.java
@@ -23,12 +23,12 @@ package uk.org.taverna.platform.execution.impl.local;
import java.net.URI;
import java.util.Set;
-import uk.org.taverna.platform.capability.api.ActivityConfigurationException;
-import uk.org.taverna.platform.capability.api.ActivityNotFoundException;
-import uk.org.taverna.platform.capability.api.ActivityService;
-import uk.org.taverna.platform.capability.api.DispatchLayerConfigurationException;
-import uk.org.taverna.platform.capability.api.DispatchLayerNotFoundException;
-import uk.org.taverna.platform.capability.api.DispatchLayerService;
+import org.apache.taverna.platform.capability.api.ActivityConfigurationException;
+import org.apache.taverna.platform.capability.api.ActivityNotFoundException;
+import org.apache.taverna.platform.capability.api.ActivityService;
+import org.apache.taverna.platform.capability.api.DispatchLayerConfigurationException;
+import org.apache.taverna.platform.capability.api.DispatchLayerNotFoundException;
+import org.apache.taverna.platform.capability.api.DispatchLayerService;
import uk.org.taverna.platform.execution.api.AbstractExecutionEnvironment;
import com.fasterxml.jackson.databind.JsonNode;
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/a3685398/taverna-execution-local/src/main/java/uk/org/taverna/platform/execution/impl/local/LocalExecutionService.java
----------------------------------------------------------------------
diff --git a/taverna-execution-local/src/main/java/uk/org/taverna/platform/execution/impl/local/LocalExecutionService.java b/taverna-execution-local/src/main/java/uk/org/taverna/platform/execution/impl/local/LocalExecutionService.java
index fe4b3bc..ba1ee7f 100644
--- a/taverna-execution-local/src/main/java/uk/org/taverna/platform/execution/impl/local/LocalExecutionService.java
+++ b/taverna-execution-local/src/main/java/uk/org/taverna/platform/execution/impl/local/LocalExecutionService.java
@@ -31,8 +31,8 @@ import net.sf.taverna.t2.workflowmodel.Edits;
import org.apache.taverna.robundle.Bundle;
-import uk.org.taverna.platform.capability.api.ActivityService;
-import uk.org.taverna.platform.capability.api.DispatchLayerService;
+import org.apache.taverna.platform.capability.api.ActivityService;
+import org.apache.taverna.platform.capability.api.DispatchLayerService;
import uk.org.taverna.platform.execution.api.AbstractExecutionService;
import uk.org.taverna.platform.execution.api.Execution;
import uk.org.taverna.platform.execution.api.ExecutionEnvironment;
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/a3685398/taverna-execution-local/src/main/java/uk/org/taverna/platform/execution/impl/local/WorkflowToDataflowMapper.java
----------------------------------------------------------------------
diff --git a/taverna-execution-local/src/main/java/uk/org/taverna/platform/execution/impl/local/WorkflowToDataflowMapper.java b/taverna-execution-local/src/main/java/uk/org/taverna/platform/execution/impl/local/WorkflowToDataflowMapper.java
index 1bce24b..1ffd5ca 100644
--- a/taverna-execution-local/src/main/java/uk/org/taverna/platform/execution/impl/local/WorkflowToDataflowMapper.java
+++ b/taverna-execution-local/src/main/java/uk/org/taverna/platform/execution/impl/local/WorkflowToDataflowMapper.java
@@ -47,12 +47,12 @@ import net.sf.taverna.t2.workflowmodel.processor.dispatch.DispatchLayer;
import net.sf.taverna.t2.workflowmodel.processor.dispatch.DispatchStack;
import net.sf.taverna.t2.workflowmodel.processor.iteration.IterationStrategy;
import net.sf.taverna.t2.workflowmodel.processor.iteration.NamedInputPortNode;
-import uk.org.taverna.platform.capability.api.ActivityConfigurationException;
-import uk.org.taverna.platform.capability.api.ActivityNotFoundException;
-import uk.org.taverna.platform.capability.api.ActivityService;
-import uk.org.taverna.platform.capability.api.DispatchLayerConfigurationException;
-import uk.org.taverna.platform.capability.api.DispatchLayerNotFoundException;
-import uk.org.taverna.platform.capability.api.DispatchLayerService;
+import org.apache.taverna.platform.capability.api.ActivityConfigurationException;
+import org.apache.taverna.platform.capability.api.ActivityNotFoundException;
+import org.apache.taverna.platform.capability.api.ActivityService;
+import org.apache.taverna.platform.capability.api.DispatchLayerConfigurationException;
+import org.apache.taverna.platform.capability.api.DispatchLayerNotFoundException;
+import org.apache.taverna.platform.capability.api.DispatchLayerService;
import uk.org.taverna.platform.execution.api.InvalidWorkflowException;
import org.apache.taverna.scufl2.api.activity.Activity;
import org.apache.taverna.scufl2.api.common.Scufl2Tools;
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/a3685398/taverna-services-impl/src/main/java/uk/org/taverna/commons/services/impl/ServiceRegistryImpl.java
----------------------------------------------------------------------
diff --git a/taverna-services-impl/src/main/java/uk/org/taverna/commons/services/impl/ServiceRegistryImpl.java b/taverna-services-impl/src/main/java/uk/org/taverna/commons/services/impl/ServiceRegistryImpl.java
index 2532005..bb5a0d0 100644
--- a/taverna-services-impl/src/main/java/uk/org/taverna/commons/services/impl/ServiceRegistryImpl.java
+++ b/taverna-services-impl/src/main/java/uk/org/taverna/commons/services/impl/ServiceRegistryImpl.java
@@ -26,9 +26,9 @@ import java.util.Set;
import uk.org.taverna.commons.services.ActivityTypeNotFoundException;
import uk.org.taverna.commons.services.InvalidConfigurationException;
import uk.org.taverna.commons.services.ServiceRegistry;
-import uk.org.taverna.platform.capability.api.ActivityConfigurationException;
-import uk.org.taverna.platform.capability.api.ActivityNotFoundException;
-import uk.org.taverna.platform.capability.api.ActivityService;
+import org.apache.taverna.platform.capability.api.ActivityConfigurationException;
+import org.apache.taverna.platform.capability.api.ActivityNotFoundException;
+import org.apache.taverna.platform.capability.api.ActivityService;
import org.apache.taverna.scufl2.api.port.InputActivityPort;
import org.apache.taverna.scufl2.api.port.OutputActivityPort;