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 21:50:56 UTC
[4/5] incubator-taverna-osgi git commit: temporarily empty repository
http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/2f5a0e94/taverna-configuration-api/src/main/java/uk/org/taverna/configuration/ConfigurationUIFactory.java
----------------------------------------------------------------------
diff --git a/taverna-configuration-api/src/main/java/uk/org/taverna/configuration/ConfigurationUIFactory.java b/taverna-configuration-api/src/main/java/uk/org/taverna/configuration/ConfigurationUIFactory.java
deleted file mode 100644
index 8ff0e8f..0000000
--- a/taverna-configuration-api/src/main/java/uk/org/taverna/configuration/ConfigurationUIFactory.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 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.configuration;
-
-import javax.swing.JPanel;
-
-public interface ConfigurationUIFactory {
- public boolean canHandle(String uuid);
- public JPanel getConfigurationPanel();
- public Configurable getConfigurable();
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/2f5a0e94/taverna-configuration-api/src/main/java/uk/org/taverna/configuration/package.html
----------------------------------------------------------------------
diff --git a/taverna-configuration-api/src/main/java/uk/org/taverna/configuration/package.html b/taverna-configuration-api/src/main/java/uk/org/taverna/configuration/package.html
deleted file mode 100644
index cff8d0a..0000000
--- a/taverna-configuration-api/src/main/java/uk/org/taverna/configuration/package.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<body>
-Contains classes related to general configuration management.
-</body>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/2f5a0e94/taverna-configuration-api/src/main/java/uk/org/taverna/configuration/proxy/HttpProxyConfiguration.java
----------------------------------------------------------------------
diff --git a/taverna-configuration-api/src/main/java/uk/org/taverna/configuration/proxy/HttpProxyConfiguration.java b/taverna-configuration-api/src/main/java/uk/org/taverna/configuration/proxy/HttpProxyConfiguration.java
deleted file mode 100644
index 0fa686b..0000000
--- a/taverna-configuration-api/src/main/java/uk/org/taverna/configuration/proxy/HttpProxyConfiguration.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2013 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.configuration.proxy;
-
-import uk.org.taverna.configuration.Configurable;
-
-/**
- * The HttpProxyConfiguration handles the configuration of HTTP
- * proxy when Taverna is launched.
- *
- * @author David Withers
- */
-public interface HttpProxyConfiguration extends Configurable {
-
- /**
- * The acceptable values for which proxy values to use
- */
- public static String USE_SYSTEM_PROPERTIES_OPTION = "useSystemProperties";
- public static String USE_NO_PROXY_OPTION = "useNoProxy";
- public static String USE_SPECIFIED_VALUES_OPTION = "useSpecifiedValues";
-
- /**
- * The key within the Properties where the value will indicate which set of
- * proxy values to use
- */
- public static String PROXY_USE_OPTION = "proxyUseOption";
-
- /**
- * The keys within the Properties for the ad hoc Taverna proxy settings
- */
- public static String TAVERNA_PROXY_HOST = "tavernaProxyHost";
- public static String TAVERNA_PROXY_PORT = "tavernaProxyPort";
- public static String TAVERNA_PROXY_USER = "tavernaProxyUser";
- public static String TAVERNA_PROXY_PASSWORD = "tavernaProxyPassword";
- public static String TAVERNA_NON_PROXY_HOSTS = "tavernaNonProxyHosts";
-
- /**
- * The keys within the Properties for the System proxy settings
- */
- public static String SYSTEM_PROXY_HOST = "systemProxyHost";
- public static String SYSTEM_PROXY_PORT = "systemProxyPort";
- public static String SYSTEM_PROXY_USER = "systemProxyUser";
- public static String SYSTEM_PROXY_PASSWORD = "systemProxyPassword";
- public static String SYSTEM_NON_PROXY_HOSTS = "systemNonProxyHosts";
-
- /**
- * The keys within the System Properties that are used for specifying HTTP
- * proxy information
- */
- public static String PROXY_HOST = "http.proxyHost";
- public static String PROXY_PORT = "http.proxyPort";
- public static String PROXY_USER = "http.proxyUser";
- public static String PROXY_PASSWORD = "http.proxyPassword";
- public static String NON_PROXY_HOSTS = "http.nonProxyHosts";
-
- /**
- * Change the System Proxy settings according to the property values.
- */
- public void changeProxySettings();
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/2f5a0e94/taverna-configuration-api/src/test/java/uk/org/taverna/configuration/AbstractConfigurableTest.java
----------------------------------------------------------------------
diff --git a/taverna-configuration-api/src/test/java/uk/org/taverna/configuration/AbstractConfigurableTest.java b/taverna-configuration-api/src/test/java/uk/org/taverna/configuration/AbstractConfigurableTest.java
deleted file mode 100644
index d679188..0000000
--- a/taverna-configuration-api/src/test/java/uk/org/taverna/configuration/AbstractConfigurableTest.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 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.configuration;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.UUID;
-
-import org.junit.Before;
-import org.junit.Test;
-
-public class AbstractConfigurableTest {
-
- private ConfigurationManager manager;
-
- private DummyConfigurable dummyConfigurable;
-
- @Before
- public void setup() throws Exception {
- dummyConfigurable = new DummyConfigurable(manager);
- File f = new File(System.getProperty("java.io.tmpdir"));
- File configTestsDir = new File(f,"configTests");
- if (!configTestsDir.exists()) configTestsDir.mkdir();
- final File d = new File(configTestsDir,UUID.randomUUID().toString());
- d.mkdir();
- manager = new ConfigurationManager() {
- private Map<String, Map<String, String>> store = new HashMap<String, Map<String, String>>();
- @Override
- public void store(Configurable configurable) throws Exception {
- if (configurable != null) {
- store.put(configurable.getUUID(), new HashMap<String, String>(configurable.getInternalPropertyMap()));
- }
- }
-
- @Override
- public void populate(Configurable configurable) throws Exception {
- Map<String, String> map = store.get(configurable.getUUID());
- if (map != null) {
- configurable.clear();
- for (Entry<String, String> entry : map.entrySet()) {
- configurable.setProperty(entry.getKey(), entry.getValue());
- }
- }
- }
-
- };
- dummyConfigurable.restoreDefaults();
- }
-
- @Test
- public void testName() {
- assertEquals("Wrong name","dummyName",dummyConfigurable.getDisplayName());
- }
-
- @Test
- public void testCategory() {
- assertEquals("Wrong category","test",dummyConfigurable.getCategory());
- }
-
- @Test
- public void testUUID() {
- assertEquals("Wrong uuid","cheese",dummyConfigurable.getUUID());
- }
-
- @Test
- public void testGetProperty() {
- assertEquals("Should be john","john",dummyConfigurable.getProperty("name"));
- }
-
- @Test
- public void testSetProperty() {
- assertEquals("Should be blue","blue",dummyConfigurable.getProperty("colour"));
- assertNull("Should be null",dummyConfigurable.getProperty("new"));
-
- dummyConfigurable.setProperty("colour", "red");
- dummyConfigurable.setProperty("new", "new value");
-
- assertEquals("Should be red","red",dummyConfigurable.getProperty("colour"));
- assertEquals("Should be new value","new value",dummyConfigurable.getProperty("new"));
- }
-
- @Test
- public void testDeleteValue() {
- assertEquals("Should be blue","blue",dummyConfigurable.getProperty("colour"));
- assertNull("Should be null",dummyConfigurable.getProperty("new"));
-
- dummyConfigurable.setProperty("new", "new value");
-
- assertEquals("Should be new value","new value",dummyConfigurable.getProperty("new"));
-
- dummyConfigurable.deleteProperty("new");
- dummyConfigurable.deleteProperty("colour");
-
- assertNull("Should be null",dummyConfigurable.getProperty("new"));
- assertNull("Should be null",dummyConfigurable.getProperty("colour"));
- }
-
- @Test
- public void testDeleteValueBySettingNull() {
- assertEquals("Should be blue","blue",dummyConfigurable.getProperty("colour"));
- assertNull("Should be null",dummyConfigurable.getProperty("new"));
-
- dummyConfigurable.setProperty("new", "new value");
-
- assertEquals("Should be new value","new value",dummyConfigurable.getProperty("new"));
-
- dummyConfigurable.setProperty("new",null);
- dummyConfigurable.setProperty("colour",null);
-
- assertNull("Should be null",dummyConfigurable.getProperty("new"));
- assertNull("Should be null",dummyConfigurable.getProperty("colour"));
- }
-
- @Test
- public void testRestoreDefaults() {
- assertEquals("There should be 2 values",2,dummyConfigurable.getInternalPropertyMap().size());
-
- dummyConfigurable.setProperty("colour", "red");
- dummyConfigurable.setProperty("new", "new value");
-
- assertEquals("There should be 3 values",3,dummyConfigurable.getInternalPropertyMap().size());
-
- dummyConfigurable.restoreDefaults();
-
- assertEquals("There should be 2 values",2,dummyConfigurable.getInternalPropertyMap().size());
-
- assertEquals("Should be john","john",dummyConfigurable.getProperty("name"));
- assertEquals("Should be john","blue",dummyConfigurable.getProperty("colour"));
- }
-
- @Test
- public void testList() throws Exception {
- AbstractConfigurable c = dummyConfigurable;
- c.getInternalPropertyMap().clear();
- c.setPropertyStringList("list", new ArrayList<String>());
-
- manager.store(c);
- assertTrue("Should be an instanceof a list",c.getPropertyStringList("list") instanceof List);
- assertEquals("there should be 0 items",0,c.getPropertyStringList("list").size());
- manager.populate(c);
-
- assertTrue("Should be an instanceof a list",c.getPropertyStringList("list") instanceof List);
- assertEquals("there should be 0 items",0,c.getPropertyStringList("list").size());
-
- List<String> list = new ArrayList<String>(c.getPropertyStringList("list"));
- list.add("fred");
- c.setPropertyStringList("list", list);
- assertEquals("there should be 1 item",1,c.getPropertyStringList("list").size());
-
- manager.store(c);
- assertEquals("there should be 1 item",1,c.getPropertyStringList("list").size());
- manager.populate(c);
-
- assertEquals("there should be 1 item",1,c.getPropertyStringList("list").size());
- assertEquals("item should be fred","fred",c.getPropertyStringList("list").get(0));
-
- c.getInternalPropertyMap().clear();
- c.setProperty("list", "a,b,c");
- assertEquals("There should be 3 items in the list",3,c.getPropertyStringList("list").size());
- assertEquals("Item 1 should be a","a",c.getPropertyStringList("list").get(0));
- assertEquals("Item 1 should be b","b",c.getPropertyStringList("list").get(1));
- assertEquals("Item 1 should be c","c",c.getPropertyStringList("list").get(2));
-
- }
-
- @Test
- public void testListNotThere() throws Exception {
- AbstractConfigurable c = dummyConfigurable;
- c.getInternalPropertyMap().clear();
- assertNull("the property should be null",c.getProperty("sdflhsdfhsdfjkhsdfkhsdfkhsdfjkh"));
- assertNull("the list should be null if the property doesn't exist",c.getPropertyStringList("sdflhsdfhsdfjkhsdfkhsdfkhsdfjkh"));
- }
-
- @Test
- public void testListDelimeters() throws Exception {
- AbstractConfigurable c = dummyConfigurable;
- c.getInternalPropertyMap().clear();
- c.setPropertyStringList("list", new ArrayList<String>());
-
- assertTrue("Should be an instanceof a list",c.getPropertyStringList("list") instanceof List);
- assertEquals("there should be 0 items",0,((List<String>)c.getPropertyStringList("list")).size());
-
- List<String> list = new ArrayList<String>(c.getPropertyStringList("list"));
- list.add("a,b,c");
- c.setPropertyStringList("list",list);
- assertEquals("there should be 1 items",1,((List<String>)c.getPropertyStringList("list")).size());
-
- list = new ArrayList<String>(c.getPropertyStringList("list"));
- list.add("d");
- c.setPropertyStringList("list",list);
- assertEquals("there should be 2 items",2,((List<String>)c.getPropertyStringList("list")).size());
- assertEquals("The first item should be a,b,c","a,b,c",c.getPropertyStringList("list").get(0));
- assertEquals("The second item should be d","d",c.getPropertyStringList("list").get(1));
-
- manager.store(c);
- assertEquals("there should be 2 items",2,((List<String>)c.getPropertyStringList("list")).size());
- assertEquals("The first item should be a,b,c","a,b,c",c.getPropertyStringList("list").get(0));
- assertEquals("The second item should be d","d",c.getPropertyStringList("list").get(1));
-
- manager.populate(c);
- assertEquals("there should be 2 items",2,((List<String>)c.getPropertyStringList("list")).size());
-
- assertEquals("The first item should be a,b,c","a,b,c",c.getPropertyStringList("list").get(0));
- assertEquals("The second item should be d","d",c.getPropertyStringList("list").get(1));
-
- }
-
- @Test(expected=UnsupportedOperationException.class)
- public void testUnmodifiable() throws Exception {
-
- AbstractConfigurable c = dummyConfigurable;
- c.getInternalPropertyMap().clear();
- c.setPropertyStringList("list", new ArrayList<String>());
- c.getPropertyStringList("list").add("fred");
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/2f5a0e94/taverna-configuration-api/src/test/java/uk/org/taverna/configuration/DummyConfigurable.java
----------------------------------------------------------------------
diff --git a/taverna-configuration-api/src/test/java/uk/org/taverna/configuration/DummyConfigurable.java b/taverna-configuration-api/src/test/java/uk/org/taverna/configuration/DummyConfigurable.java
deleted file mode 100644
index 1f77ca6..0000000
--- a/taverna-configuration-api/src/test/java/uk/org/taverna/configuration/DummyConfigurable.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 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.configuration;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import uk.org.taverna.configuration.AbstractConfigurable;
-import uk.org.taverna.configuration.ConfigurationManager;
-
-public class DummyConfigurable extends AbstractConfigurable {
-
- public DummyConfigurable(ConfigurationManager configurationManager) {
- super(configurationManager);
- }
-
- Map<String,String> defaults = null;
-
- public String getCategory() {
- return "test";
- }
-
- public Map<String, String> getDefaultPropertyMap() {
- if (defaults==null) {
- defaults = new HashMap<String, String>();
- defaults.put("name","john");
- defaults.put("colour","blue");
- }
- return defaults;
- }
-
- public String getUUID() {
- return "cheese";
- }
-
- public String getDisplayName() {
- return "dummyName";
- }
-
- public String getFilePrefix() {
- return "dummyPrefix";
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/2f5a0e94/taverna-configuration-impl/.project
----------------------------------------------------------------------
diff --git a/taverna-configuration-impl/.project b/taverna-configuration-impl/.project
deleted file mode 100644
index 2bd6978..0000000
--- a/taverna-configuration-impl/.project
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>taverna-configuration-impl</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.m2e.core.maven2Builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.m2e.core.maven2Nature</nature>
- </natures>
-</projectDescription>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/2f5a0e94/taverna-configuration-impl/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-configuration-impl/pom.xml b/taverna-configuration-impl/pom.xml
deleted file mode 100644
index 79143c9..0000000
--- a/taverna-configuration-impl/pom.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<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>org.apache.taverna.osgi</groupId>
- <artifactId>taverna-osgi</artifactId>
- <version>0.2.0-incubating-SNAPSHOT</version>
- </parent>
- <artifactId>taverna-configuration-impl</artifactId>
- <name>Apache Taverna Configuration implementation</name>
- <packaging>bundle</packaging>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Import-Package>
- uk.org.taverna.configuration;provide:=true,
- uk.org.taverna.configuration.proxy;provide:=true,*
- </Import-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>${project.parent.groupId}</groupId>
- <artifactId>taverna-configuration-api</artifactId>
- <version>${project.parent.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.parent.groupId}</groupId>
- <artifactId>taverna-app-configuration-api</artifactId>
- <version>${project.parent.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.parent.groupId}</groupId>
- <artifactId>taverna-osgi-schemas</artifactId>
- <version>${project.parent.version}</version>
- </dependency>
-
-<!--
- <dependency>
- <groupId>net.sf.taverna</groupId>
- <artifactId>wsdl-generic</artifactId>
- <version>${wsdl.generic.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.axis</groupId>
- <artifactId>com.springsource.org.apache.axis</artifactId>
- <version>${axis.version}</version>
- </dependency>
- -->
-
-
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>${log4j.version}</version>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>${junit.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>${project.parent.groupId}</groupId>
- <artifactId>taverna-configuration-api</artifactId>
- <version>${project.parent.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/2f5a0e94/taverna-configuration-impl/src/main/java/uk/org/taverna/configuration/impl/ConfigurationManagerImpl.java
----------------------------------------------------------------------
diff --git a/taverna-configuration-impl/src/main/java/uk/org/taverna/configuration/impl/ConfigurationManagerImpl.java b/taverna-configuration-impl/src/main/java/uk/org/taverna/configuration/impl/ConfigurationManagerImpl.java
deleted file mode 100644
index 823155c..0000000
--- a/taverna-configuration-impl/src/main/java/uk/org/taverna/configuration/impl/ConfigurationManagerImpl.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 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.configuration.impl;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.util.Map;
-import java.util.Properties;
-
-import org.apache.log4j.Logger;
-
-import uk.org.taverna.configuration.Configurable;
-import uk.org.taverna.configuration.ConfigurationManager;
-import uk.org.taverna.configuration.app.ApplicationConfiguration;
-
-/**
- * Handles the configuration for a {@link Configurable} object
- *
- * @author Ian Dunlop
- * @author Stuart Owen
- */
-public class ConfigurationManagerImpl implements ConfigurationManager {
-
- private static final Logger logger = Logger.getLogger(ConfigurationManagerImpl.class);
-
- private File baseConfigLocation;
-
- public ConfigurationManagerImpl(ApplicationConfiguration applicationConfiguration) {
- File home = applicationConfiguration.getApplicationHomeDir();
- File config = new File(home,"conf");
- if (!config.exists()) {
- config.mkdir();
- }
- setBaseConfigLocation(config);
- }
-
- /**
- * Write out the properties configuration to disk based on the UUID of the
- * {@link Configurable}
- * <br>
- * Default values are not stored within the file, but only those that have been changed or deleted.
- *
- * @param configurable
- * @throws Exception
- */
- @Override
- public void store(Configurable configurable) throws Exception {
- try {
-
- Map<String, String> propertyMap = configurable.getInternalPropertyMap();
- Properties props = new Properties();
- for (String key : propertyMap.keySet()) {
- if (!propertyMap.get(key).equals(configurable.getDefaultProperty(key))) {
- props.put(key, propertyMap.get(key));
- }
- }
- File configFile = new File(baseConfigLocation,generateFilename(configurable));
- logger.info("Storing configuration for "+configurable.getFilePrefix()+" to "+configFile.getAbsolutePath());
- props.store(new FileOutputStream(configFile), "");
- } catch (Exception e) {
- throw new Exception("Configuration storage failed: " + e);
- }
- }
-
-
-
- /**
- * Loads the configuration details from disk or from memory and populates the provided Configurable
- *
- * @param configurable
- * @return
- * @throws Exception
- * if there are no configuration details available
- */
- @Override
- public void populate(Configurable configurable)
- throws Exception {
- try {
- File configFile = new File(baseConfigLocation,generateFilename(configurable));
- if (configFile.exists()) {
- Properties props = new Properties();
- props.load(new FileInputStream(configFile));
- configurable.clear();
- for (Object key : props.keySet()) {
- configurable.setProperty(key.toString(), props.getProperty(key.toString()));
- }
- }
- else {
- logger.info("Config file for "+configurable.getFilePrefix()+" not yet created. Creating with default values.");
- configurable.restoreDefaults();
- store(configurable);
- }
-
- } catch (Exception e) {
- logger.error("There was a error reading the configuration file for "+configurable.getFilePrefix()+", using defaults",e);
- configurable.restoreDefaults();
- }
- }
-
- protected String generateFilename(Configurable configurable) {
- return configurable.getFilePrefix()+"-"+configurable.getUUID() + ".config";
- }
-
- public boolean isBaseLocationSet() {
- return baseConfigLocation!=null;
- }
-
- /**
- * Where the config files are being stored
- *
- * @return
- * @throws Exception
- */
- public File getBaseConfigLocation() throws Exception {
- if (isBaseLocationSet()) {
- return baseConfigLocation;
- } else {
- throw new Exception("Set location first");
- }
- }
-
- /**
- * Where should the config files be stored
- *
- * @return
- * @throws Exception
- */
- public void setBaseConfigLocation(File baseConfigLocation) {
- // TODO if this is a different place than before then copy all the
- // config files to this new place
- this.baseConfigLocation = baseConfigLocation;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/2f5a0e94/taverna-configuration-impl/src/main/java/uk/org/taverna/configuration/proxy/impl/HttpProxyConfigurationImpl.java
----------------------------------------------------------------------
diff --git a/taverna-configuration-impl/src/main/java/uk/org/taverna/configuration/proxy/impl/HttpProxyConfigurationImpl.java b/taverna-configuration-impl/src/main/java/uk/org/taverna/configuration/proxy/impl/HttpProxyConfigurationImpl.java
deleted file mode 100644
index ddcdf65..0000000
--- a/taverna-configuration-impl/src/main/java/uk/org/taverna/configuration/proxy/impl/HttpProxyConfigurationImpl.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 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.configuration.proxy.impl;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-//import org.apache.axis.AxisProperties;
-import org.apache.log4j.Logger;
-
-import uk.org.taverna.configuration.AbstractConfigurable;
-import uk.org.taverna.configuration.ConfigurationManager;
-import uk.org.taverna.configuration.proxy.HttpProxyConfiguration;
-
-/**
- * The HttpProxyConfiguration handles the configuration of HTTP
- * proxy when Taverna is launched.
- *
- * @author alanrw
- * @author David Withers
- */
-public class HttpProxyConfigurationImpl extends AbstractConfigurable implements
- HttpProxyConfiguration {
-
- private Map<String, String> defaultPropertyMap;
-
- /**
- * A Properties that holds the original System settings for HTTP proxy. They
- * need to be copied as they are overwritten if something other than those
- * System settings are used.
- */
- private Properties originalSystemSettings;
-
- private static Logger logger = Logger.getLogger(HttpProxyConfigurationImpl.class);
-
- /**
- * Read the original System settings. Read the configuration file and set
- * the proxy settings accordingly.
- */
- private HttpProxyConfigurationImpl(ConfigurationManager configurationManager) {
- super(configurationManager);
- changeProxySettings();
- }
-
- /**
- * Return the original System property value for the specified key. Null of
- * no such property existed.
- *
- * @param key
- * @return
- */
- public String getOriginalSystemSetting(String key) {
- if (originalSystemSettings == null) {
- originalSystemSettings = new Properties();
- originalSystemSettings.putAll(System.getProperties());
- }
- return originalSystemSettings.getProperty(key);
- }
-
- @Override
- public void changeProxySettings() {
- String option = getProperty(PROXY_USE_OPTION);
- if (option.equals(USE_SYSTEM_PROPERTIES_OPTION)) {
- changeSystemProperty(PROXY_HOST, getOriginalSystemSetting(PROXY_HOST));
- changeSystemProperty(PROXY_PORT, getOriginalSystemSetting(PROXY_PORT));
- changeSystemProperty(PROXY_USER, getOriginalSystemSetting(PROXY_USER));
- changeSystemProperty(PROXY_PASSWORD, getOriginalSystemSetting(PROXY_PASSWORD));
- changeSystemProperty(NON_PROXY_HOSTS, getOriginalSystemSetting(NON_PROXY_HOSTS));
- } else if (option.equals(USE_NO_PROXY_OPTION)) {
- changeSystemProperty(PROXY_HOST, null);
- changeSystemProperty(PROXY_PORT, null);
- changeSystemProperty(PROXY_USER, null);
- changeSystemProperty(PROXY_PASSWORD, null);
- changeSystemProperty(NON_PROXY_HOSTS, null);
- } else if (option.equals(USE_SPECIFIED_VALUES_OPTION)) {
- changeSystemProperty(PROXY_HOST, getProperty(TAVERNA_PROXY_HOST));
- changeSystemProperty(PROXY_PORT, getProperty(TAVERNA_PROXY_PORT));
- changeSystemProperty(PROXY_USER, getProperty(TAVERNA_PROXY_USER));
- changeSystemProperty(PROXY_PASSWORD, getProperty(TAVERNA_PROXY_PASSWORD));
- changeSystemProperty(NON_PROXY_HOSTS, getProperty(TAVERNA_NON_PROXY_HOSTS));
- }
- logger.info(PROXY_HOST + " is " + System.getProperty(PROXY_HOST));
- logger.info(PROXY_PORT + " is " + System.getProperty(PROXY_PORT));
- logger.info(PROXY_USER + " is " + System.getProperty(PROXY_USER));
- logger.info(NON_PROXY_HOSTS + " is " + System.getProperty(NON_PROXY_HOSTS));
- }
-
- /**
- * Change the specified System property to the given value. If the value is
- * null then the property is cleared.
- *
- * @param key
- * @param value
- */
- private void changeSystemProperty(String key, String value) {
- if ((value == null) || value.equals("")) {
- System.clearProperty(key);
- } else {
- System.setProperty(key, value);
- }
- //AxisProperties.setProperty(key, (value == null ? "" : value));
- }
-
- @Override
- public Map<String, String> getDefaultPropertyMap() {
- if (defaultPropertyMap == null) {
- defaultPropertyMap = new HashMap<String, String>();
- defaultPropertyMap.put(PROXY_USE_OPTION, USE_SYSTEM_PROPERTIES_OPTION);
- String proxyHost = getOriginalSystemSetting(PROXY_HOST);
- defaultPropertyMap.put(SYSTEM_PROXY_HOST, proxyHost == null ? "" : proxyHost);
- String proxyPort = getOriginalSystemSetting(PROXY_PORT);
- defaultPropertyMap.put(SYSTEM_PROXY_PORT, proxyPort == null ? "" : proxyPort);
- String proxyUser = getOriginalSystemSetting(PROXY_USER);
- defaultPropertyMap.put(SYSTEM_PROXY_USER, proxyUser == null ? "" : proxyUser);
- String proxyPassword = getOriginalSystemSetting(PROXY_PASSWORD);
- defaultPropertyMap.put(SYSTEM_PROXY_PASSWORD, proxyPassword == null ? "" : proxyPassword);
- String nonProxyHosts = getOriginalSystemSetting(NON_PROXY_HOSTS);
- defaultPropertyMap.put(SYSTEM_NON_PROXY_HOSTS, nonProxyHosts == null ? "" : nonProxyHosts);
- defaultPropertyMap.put(TAVERNA_PROXY_HOST, "");
- defaultPropertyMap.put(TAVERNA_PROXY_PORT, "");
- defaultPropertyMap.put(TAVERNA_PROXY_USER, "");
- defaultPropertyMap.put(TAVERNA_PROXY_PASSWORD, "");
- defaultPropertyMap.put(TAVERNA_NON_PROXY_HOSTS, "");
- }
- return defaultPropertyMap;
- }
-
- @Override
- public String getUUID() {
- return "B307A902-F292-4D2F-B8E7-00CC983982B6";
- }
-
- @Override
- public String getDisplayName() {
- return "HTTP proxy";
- }
-
- @Override
- public String getFilePrefix() {
- return "HttpProxy";
- }
-
- @Override
- public String getCategory() {
- return "general";
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/2f5a0e94/taverna-configuration-impl/src/main/resources/META-INF/spring/configuration-context-osgi.xml
----------------------------------------------------------------------
diff --git a/taverna-configuration-impl/src/main/resources/META-INF/spring/configuration-context-osgi.xml b/taverna-configuration-impl/src/main/resources/META-INF/spring/configuration-context-osgi.xml
deleted file mode 100644
index 0236d73..0000000
--- a/taverna-configuration-impl/src/main/resources/META-INF/spring/configuration-context-osgi.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans:beans xmlns="http://www.springframework.org/schema/osgi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:beans="http://www.springframework.org/schema/beans"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/osgi
- http://www.springframework.org/schema/osgi/spring-osgi.xsd">
-
- <service ref="configurationManager" interface="uk.org.taverna.configuration.ConfigurationManager" />
- <service ref="httpProxyConfiguration" interface="uk.org.taverna.configuration.proxy.HttpProxyConfiguration" />
-
- <reference id="applicationConfiguration" interface="uk.org.taverna.configuration.app.ApplicationConfiguration" />
-
-</beans:beans>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/2f5a0e94/taverna-configuration-impl/src/main/resources/META-INF/spring/configuration-context.xml
----------------------------------------------------------------------
diff --git a/taverna-configuration-impl/src/main/resources/META-INF/spring/configuration-context.xml b/taverna-configuration-impl/src/main/resources/META-INF/spring/configuration-context.xml
deleted file mode 100644
index c797a8d..0000000
--- a/taverna-configuration-impl/src/main/resources/META-INF/spring/configuration-context.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd">
-
- <bean id="configurationManager" class="uk.org.taverna.configuration.impl.ConfigurationManagerImpl" >
- <constructor-arg name="applicationConfiguration" ref="applicationConfiguration" />
- </bean>
-
- <bean id="httpProxyConfiguration" class="uk.org.taverna.configuration.proxy.impl.HttpProxyConfigurationImpl">
- <constructor-arg name="configurationManager" ref="configurationManager" />
- </bean>
-
-
-</beans>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/2f5a0e94/taverna-configuration-impl/src/test/java/uk/org/taverna/configuration/impl/ConfigurationManagerImplTest.java
----------------------------------------------------------------------
diff --git a/taverna-configuration-impl/src/test/java/uk/org/taverna/configuration/impl/ConfigurationManagerImplTest.java b/taverna-configuration-impl/src/test/java/uk/org/taverna/configuration/impl/ConfigurationManagerImplTest.java
deleted file mode 100644
index e09ffb6..0000000
--- a/taverna-configuration-impl/src/test/java/uk/org/taverna/configuration/impl/ConfigurationManagerImplTest.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 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.configuration.impl;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.util.Properties;
-import java.util.UUID;
-
-import org.junit.Before;
-import org.junit.Test;
-
-import uk.org.taverna.commons.profile.xml.jaxb.ApplicationProfile;
-import uk.org.taverna.configuration.AbstractConfigurable;
-import uk.org.taverna.configuration.Configurable;
-import uk.org.taverna.configuration.DummyConfigurable;
-import uk.org.taverna.configuration.app.ApplicationConfiguration;
-
-public class ConfigurationManagerImplTest {
-
- private File configFile;
-
- private ConfigurationManagerImpl manager;
-
- private DummyConfigurable dummyConfigurable;
-
- @Before
- public void setup() throws Exception {
- dummyConfigurable = new DummyConfigurable(manager);
- File f = new File(System.getProperty("java.io.tmpdir"));
- File configTestsDir = new File(f, "configTests");
- if (!configTestsDir.exists())
- configTestsDir.mkdir();
- final File d = new File(configTestsDir, UUID.randomUUID().toString());
- d.mkdir();
- manager = new ConfigurationManagerImpl(new ApplicationConfiguration() {
- public File getApplicationHomeDir() {
- return d;
- }
-
- public String getName() {
- return null;
- }
-
- public String getTitle() {
- return null;
- }
-
- public File getStartupDir() {
- return null;
- }
-
- public File getUserPluginDir() {
- return null;
- }
-
- public File getSystemPluginDir() {
- return null;
- }
-
- public File getLogFile() {
- return null;
- }
-
- public File getLogDir() {
- return null;
- }
-
- public Properties getProperties() {
- return null;
- }
-
- @Override
- public ApplicationProfile getApplicationProfile() {
- // TODO Auto-generated method stub
- return null;
- }
- });
- configFile = new File(d, "conf/"+manager.generateFilename(dummyConfigurable));
- dummyConfigurable.restoreDefaults();
- }
-
- @Test
- public void testStore() throws Exception {
- Configurable conf = dummyConfigurable;
- manager.store(conf);
- assertTrue(configFile.exists());
- }
-
- @Test
- public void testDefaultValues() throws Exception {
- Configurable conf = dummyConfigurable;
- assertEquals("name should equal john", "john", conf.getProperty("name"));
- manager.store(conf);
- Properties props = new Properties();
- props.load(new FileInputStream(configFile));
- assertFalse("stored properties should not contain the default value",
- props.containsKey("name"));
- manager.populate(conf);
- assertEquals("default property name should still exist after re-populating", "john",
- conf.getProperty("name"));
- }
-
- @Test
- public void testRemoveNotDefaultValue() throws Exception {
- Configurable conf = dummyConfigurable;
- conf.setProperty("hhh", "iii");
- manager.store(conf);
- Properties props = new Properties();
- props.load(new FileInputStream(configFile));
- assertEquals("The stored file should contain the new entry", "iii", props.get("hhh"));
- conf.deleteProperty("hhh");
- manager.store(conf);
- manager.populate(conf);
- assertNull("The removed value should no longer exist", conf.getProperty("hhh"));
- props.clear();
- props.load(new FileInputStream(configFile));
- assertNull("The stored file should no longer contain the deleted entry", props.get("hhh"));
- }
-
- @Test
- public void testNewValues() throws Exception {
- Configurable conf = dummyConfigurable;
- conf.setProperty("country", "france");
- assertEquals("country should equal france", "france", conf.getProperty("country"));
- manager.store(conf);
- Properties props = new Properties();
- props.load(new FileInputStream(configFile));
- assertTrue("stored properties should contain the default value",
- props.containsKey("country"));
- assertEquals("stored property country should equal france", "france",
- props.getProperty("country"));
- manager.populate(conf);
- assertEquals("default property name should still exist after re-populating", "france",
- conf.getProperty("country"));
- }
-
- @Test
- public void testDeleteDefaultProperty() throws Exception {
- AbstractConfigurable conf = dummyConfigurable;
- assertEquals("name should equal john", "john", conf.getProperty("name"));
- conf.deleteProperty("name");
- manager.store(conf);
- manager.populate(conf);
- assertNull("value for name should be null", conf.getProperty("name"));
-
- Properties props = new Properties();
- props.load(new FileInputStream(configFile));
- assertTrue("Key name should be in stored props because its a deleted default value",
- props.containsKey("name"));
- assertEquals("name should have the special value to indicate its been deleted",
- AbstractConfigurable.DELETED_VALUE_CODE, props.getProperty("name"));
- }
-
- @Test
- public void testFilename() {
- assertTrue(configFile.getAbsolutePath().endsWith("dummyPrefix-cheese.config"));
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/2f5a0e94/taverna-configuration-impl/src/test/java/uk/org/taverna/configuration/impl/DummyUIFactory1.java
----------------------------------------------------------------------
diff --git a/taverna-configuration-impl/src/test/java/uk/org/taverna/configuration/impl/DummyUIFactory1.java b/taverna-configuration-impl/src/test/java/uk/org/taverna/configuration/impl/DummyUIFactory1.java
deleted file mode 100644
index 3cbd1ae..0000000
--- a/taverna-configuration-impl/src/test/java/uk/org/taverna/configuration/impl/DummyUIFactory1.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 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.configuration.impl;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.swing.JPanel;
-
-import uk.org.taverna.configuration.Configurable;
-import uk.org.taverna.configuration.ConfigurationUIFactory;
-
-public class DummyUIFactory1 implements ConfigurationUIFactory {
-
- public boolean canHandle(String uuid) {
- return getConfigurable().getUUID().equals(uuid);
- }
-
- public Configurable getConfigurable() {
- return new DummyConfigurable1();
- }
-
- public JPanel getConfigurationPanel() {
- return new JPanel();
- }
-
- static class DummyConfigurable1 implements Configurable {
-
- public void deleteProperty(String key) {
- // TODO Auto-generated method stub
-
- }
-
- public String getCategory() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Map<String, String> getDefaultPropertyMap() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getProperty(String key) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Map<String, String> getInternalPropertyMap() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public List<String> getPropertyStringList(String key) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getUUID() {
- return "123";
- }
-
- public void restoreDefaults() {
- // TODO Auto-generated method stub
-
- }
-
- public void setProperty(String key, String value) {
- // TODO Auto-generated method stub
-
- }
-
- public void setPropertyStringList(String key, List<String> value) {
- // TODO Auto-generated method stub
-
- }
-
- public String getDefaultProperty(String key) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void clear() {
- // TODO Auto-generated method stub
-
- }
-
- public Set<String> getKeys() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getDisplayName() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getFilePrefix() {
- // TODO Auto-generated method stub
- return null;
- }
-
-
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/2f5a0e94/taverna-configuration-impl/src/test/java/uk/org/taverna/configuration/impl/DummyUIFactory2.java
----------------------------------------------------------------------
diff --git a/taverna-configuration-impl/src/test/java/uk/org/taverna/configuration/impl/DummyUIFactory2.java b/taverna-configuration-impl/src/test/java/uk/org/taverna/configuration/impl/DummyUIFactory2.java
deleted file mode 100644
index b6b3269..0000000
--- a/taverna-configuration-impl/src/test/java/uk/org/taverna/configuration/impl/DummyUIFactory2.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 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.configuration.impl;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.swing.JPanel;
-
-import uk.org.taverna.configuration.Configurable;
-import uk.org.taverna.configuration.ConfigurationUIFactory;
-
-public class DummyUIFactory2 implements ConfigurationUIFactory {
-
- public boolean canHandle(String uuid) {
- return getConfigurable().getUUID().equals(uuid);
- }
-
- public Configurable getConfigurable() {
- return new DummyConfigurable2();
- }
-
- public JPanel getConfigurationPanel() {
- // TODO Auto-generated method stub
- return null;
- }
-
- static class DummyConfigurable2 implements Configurable {
-
- public void deleteProperty(String key) {
- // TODO Auto-generated method stub
-
- }
-
- public String getCategory() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Map<String, String> getDefaultPropertyMap() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getProperty(String key) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Map<String, String> getInternalPropertyMap() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public List<String> getPropertyStringList(String key) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getUUID() {
- return "456";
- }
-
- public void restoreDefaults() {
- // TODO Auto-generated method stub
-
- }
-
- public void setProperty(String key, String value) {
- // TODO Auto-generated method stub
-
- }
-
- public void setPropertyStringList(String key, List<String> value) {
- // TODO Auto-generated method stub
-
- }
-
- public String getDefaultProperty(String key) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void clear() {
- // TODO Auto-generated method stub
-
- }
-
- public Set<String> getKeys() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getDisplayName() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getFilePrefix() {
- // TODO Auto-generated method stub
- return null;
- }
-
-
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/2f5a0e94/taverna-download-api/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-download-api/pom.xml b/taverna-download-api/pom.xml
deleted file mode 100644
index b5dbcd7..0000000
--- a/taverna-download-api/pom.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<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>org.apache.taverna.osgi</groupId>
- <artifactId>taverna-osgi</artifactId>
- <version>0.2.0-incubating-SNAPSHOT</version>
- </parent>
- <packaging>bundle</packaging>
- <artifactId>taverna-download-api</artifactId>
- <name>Apache Taverna Download API</name>
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/2f5a0e94/taverna-download-api/src/main/java/uk/org/taverna/commons/download/DownloadException.java
----------------------------------------------------------------------
diff --git a/taverna-download-api/src/main/java/uk/org/taverna/commons/download/DownloadException.java b/taverna-download-api/src/main/java/uk/org/taverna/commons/download/DownloadException.java
deleted file mode 100644
index 83c5e74..0000000
--- a/taverna-download-api/src/main/java/uk/org/taverna/commons/download/DownloadException.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2013 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.commons.download;
-
-/**
- *
- *
- * @author David Withers
- */
-public class DownloadException extends Exception {
-
- public DownloadException() {
- }
-
- public DownloadException(String message, Throwable cause) {
- super(message, cause);
- }
-
- public DownloadException(String message) {
- super(message);
- }
-
- public DownloadException(Throwable cause) {
- super(cause);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/2f5a0e94/taverna-download-api/src/main/java/uk/org/taverna/commons/download/DownloadManager.java
----------------------------------------------------------------------
diff --git a/taverna-download-api/src/main/java/uk/org/taverna/commons/download/DownloadManager.java b/taverna-download-api/src/main/java/uk/org/taverna/commons/download/DownloadManager.java
deleted file mode 100644
index a94389c..0000000
--- a/taverna-download-api/src/main/java/uk/org/taverna/commons/download/DownloadManager.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2013 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.commons.download;
-
-import java.io.File;
-import java.net.URL;
-
-/**
- * Download Manager for handling file download and checking the integrity of the download.
- *
- * @author David Withers
- */
-public interface DownloadManager {
-
- /**
- * Downloads a file from a URL.
- * <p>
- * The destination file will be created if it does not exist. If it does exist it will be
- * overwritten.
- *
- * @param source
- * the file to download
- * @param destination
- * the file to write to
- * @throws DownloadException
- * if
- * <ul>
- * <li>the source does not exist</li> <li>the source cannot be downloaded</li> <li>
- * the destination is not a file</li> <li>the destination cannot be written to</li>
- * </ul>
- */
- public void download(URL source, File destination) throws DownloadException;
-
- /**
- * Downloads a file from a URL and checks the integrity of the download by downloading and
- * verifying the a checksum using the specified algorithm.
- * <p>
- * Every implementation is required to support the following standard algorithms:
- * <ul>
- * <li>MD5</li>
- * <li>SHA-1</li>
- * <li>SHA-256</li>
- * </ul>
- * <p>
- * The checksum source will be calculated by appending the algorithm name to the source. e.g.
- * for an MD5 algorithm and a source of http://www.example.com/test.xml the checksum will be
- * downloaded from http://www.example.com/test.xml.md5
- *
- * @param source
- * the file to download
- * @param destination
- * the file to write to
- * @param digestAlgorithm
- * the digest algorithm to use
- * @throws DownloadException
- * if
- * <ul>
- * <li>the source does not exist</li> <li>the digest source does not exist</li> <li>
- * the source cannot be downloaded</li> <li>the destination cannot be written to
- * </li> <li>the destination is not a file</li> <li>the checksums do no match</li>
- * </ul>
- */
- public void download(URL source, File destination, String digestAlgorithm)
- throws DownloadException;
-
- /**
- * Downloads a file from a URL and checks the integrity of the download by downloading and
- * verifying the a checksum using the specified algorithm.
- * <p>
- * Every implementation is required to support the following standard algorithms:
- * <ul>
- * <li>MD5</li>
- * <li>SHA-1</li>
- * <li>SHA-256</li>
- * </ul>
- * <p>
- *
- * @param source
- * the file to download
- * @param destination
- * the file to write to
- * @param digestAlgorithm
- * the digest algorithm to use
- * @param digestSource
- * the digest file to check
- * @throws DownloadException
- * if
- * <ul>
- * <li>the source does not exist</li> <li>the digest source does not exist</li>
- * <li> the source cannot be downloaded</li> <li>the destination cannot be
- * written to</li> <li>the destination is not a file</li> <li>the digestSource
- * does not exist</li> <li>the checksums do no match</li>
- * </ul>
- */
- public void download(URL source, File destination, String digestAlgorithm, URL digestSource)
- throws DownloadException;
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/2f5a0e94/taverna-download-impl/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-download-impl/pom.xml b/taverna-download-impl/pom.xml
deleted file mode 100644
index c472494..0000000
--- a/taverna-download-impl/pom.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<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>org.apache.taverna.osgi</groupId>
- <artifactId>taverna-osgi</artifactId>
- <version>0.2.0-incubating-SNAPSHOT</version>
- </parent>
- <packaging>bundle</packaging>
- <artifactId>taverna-download-impl</artifactId>
- <name>Apache Taverna Download implementation</name>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Import-Package>uk.org.taverna.commons.download;provide:=true,*</Import-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>${project.parent.groupId}</groupId>
- <artifactId>taverna-download-api</artifactId>
- <version>${project.parent.version}</version>
- </dependency>
-
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>${log4j.version}</version>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <version>${commons.io.version}</version>
- </dependency>
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- <version>${commons.codec.version}</version>
- </dependency>
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/2f5a0e94/taverna-download-impl/src/main/java/uk/org/taverna/commons/download/impl/DownloadManagerImpl.java
----------------------------------------------------------------------
diff --git a/taverna-download-impl/src/main/java/uk/org/taverna/commons/download/impl/DownloadManagerImpl.java b/taverna-download-impl/src/main/java/uk/org/taverna/commons/download/impl/DownloadManagerImpl.java
deleted file mode 100644
index 5fc42d9..0000000
--- a/taverna-download-impl/src/main/java/uk/org/taverna/commons/download/impl/DownloadManagerImpl.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2013 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.commons.download.impl;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.apache.commons.codec.digest.DigestUtils;
-import org.apache.commons.io.FileUtils;
-import org.apache.log4j.Logger;
-
-import uk.org.taverna.commons.download.DownloadException;
-import uk.org.taverna.commons.download.DownloadManager;
-
-/**
- *
- *
- * @author David Withers
- */
-public class DownloadManagerImpl implements DownloadManager {
-
- private static final Logger logger = Logger.getLogger(DownloadManagerImpl.class);
-
- public void download(URL source, File destination) throws DownloadException {
- download(source, destination, null);
- }
-
- public void download(URL source, File destination, String digestAlgorithm) throws DownloadException {
- // TODO Use MessageDigest when Java 7 available
- if (digestAlgorithm != null && !digestAlgorithm.equals("MD5")) {
- throw new IllegalArgumentException("Only MD5 supported");
- }
- URL digestSource = null;
- if (digestAlgorithm != null) {
- try {
- digestSource = new URL(source.toString() + mapAlgorithmToFileExtension(digestAlgorithm));
- } catch (MalformedURLException e) {
- throw new DownloadException("Error creating digest URL", e);
- }
- }
- download(source, destination, digestAlgorithm, digestSource);
- }
-
- public void download(URL source, File destination, String digestAlgorithm, URL digestSource)
- throws DownloadException {
- // TODO Use MessageDigest when Java 7 available
- if (digestAlgorithm != null && !digestAlgorithm.equals("MD5")) {
- throw new IllegalArgumentException("Only MD5 supported");
- }
- // download the file
- File tempFile;
- try {
- tempFile = File.createTempFile("DownloadManager", "tmp");
- tempFile.deleteOnExit();
- logger.info(String.format("Downloading %1$s to %2$s", source, tempFile));
- FileUtils.copyURLToFile(source, tempFile, 30, 30);
- } catch (IOException e) {
- throw new DownloadException(String.format("Error downloading %1$s to %2$s.", source, destination), e);
- }
- if (digestSource != null) {
- // download the digest file
- File digestFile;
- try {
- digestFile = File.createTempFile("DownloadManager", "tmp");
- digestFile.deleteOnExit();
- logger.info(String.format("Downloading %1$s to %2$s", digestSource, digestFile));
- FileUtils.copyURLToFile(digestSource, digestFile, 30, 30);
- } catch (IOException e) {
- throw new DownloadException(String.format("Error checking digest for %1$s.", source), e);
- }
- // check the digest matches
- try {
- String digestString1 = DigestUtils.md5Hex(new FileInputStream(tempFile));
- String digestString2 = FileUtils.readFileToString(digestFile);
- if (!digestString1.equals(digestString2)) {
- throw new DownloadException(String.format(
- "Error downloading file: digsests not equal. (%1$s != %2$s)",
- digestString1, digestString2));
- }
- } catch (IOException e) {
- throw new DownloadException(String.format("Error checking digest for %1$s", destination),
- e);
- }
- }
- // copy file to destination
- try {
- logger.info(String.format("Copying %1$s to %2$s", tempFile, destination));
- FileUtils.copyFile(tempFile, destination);
- } catch (IOException e) {
- throw new DownloadException(String.format("Error downloading %1$s to %2$s.", source, destination), e);
- }
-
- }
-
- private String mapAlgorithmToFileExtension(String algorithm) {
- return "." + algorithm.toLowerCase().replaceAll("-", "");
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/2f5a0e94/taverna-download-impl/src/main/resources/META-INF/spring/download-context-osgi.xml
----------------------------------------------------------------------
diff --git a/taverna-download-impl/src/main/resources/META-INF/spring/download-context-osgi.xml b/taverna-download-impl/src/main/resources/META-INF/spring/download-context-osgi.xml
deleted file mode 100644
index 305de8f..0000000
--- a/taverna-download-impl/src/main/resources/META-INF/spring/download-context-osgi.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans:beans xmlns="http://www.springframework.org/schema/osgi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:beans="http://www.springframework.org/schema/beans"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/osgi
- http://www.springframework.org/schema/osgi/spring-osgi.xsd">
-
- <service ref="downloadManager" interface="uk.org.taverna.commons.download.DownloadManager" />
-
-</beans:beans>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/2f5a0e94/taverna-download-impl/src/main/resources/META-INF/spring/download-context.xml
----------------------------------------------------------------------
diff --git a/taverna-download-impl/src/main/resources/META-INF/spring/download-context.xml b/taverna-download-impl/src/main/resources/META-INF/spring/download-context.xml
deleted file mode 100644
index 8213b00..0000000
--- a/taverna-download-impl/src/main/resources/META-INF/spring/download-context.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd">
-
- <bean id="downloadManager" class="uk.org.taverna.commons.download.impl.DownloadManagerImpl" />
-
-</beans>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/2f5a0e94/taverna-maven-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-maven-plugin/pom.xml b/taverna-maven-plugin/pom.xml
deleted file mode 100644
index cf7c17c..0000000
--- a/taverna-maven-plugin/pom.xml
+++ /dev/null
@@ -1,104 +0,0 @@
-<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/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.taverna.osgi</groupId>
- <artifactId>taverna-osgi</artifactId>
- <version>0.2.0-incubating-SNAPSHOT</version>
- </parent>
- <prerequisites>
- <maven>3.2.0</maven>
- </prerequisites>
- <artifactId>taverna-maven-plugin</artifactId>
- <packaging>maven-plugin</packaging>
- <name>Apache Taverna Maven Plugin</name>
- <description>A Maven plugin for packaging and deploying Taverna plugins</description>
- <properties>
- <maven.version>3.2.3</maven.version>
- <mavenArchiverVersion>2.5</mavenArchiverVersion>
- </properties>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-plugin-plugin</artifactId>
- <version>3.3</version>
- <configuration>
- <!-- see http://jira.codehaus.org/browse/MNG-5346 -->
- <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
- </configuration>
- <executions>
- <execution>
- <id>mojo-descriptor</id>
- <goals>
- <goal>descriptor</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-plugin-api</artifactId>
- <version>${maven.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-core</artifactId>
- <version>${maven.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-aether-provider</artifactId>
- <version>${maven.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-annotations</artifactId>
- <version>3.3</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.shared</groupId>
- <artifactId>maven-osgi</artifactId>
- <version>0.2.0</version>
- </dependency>
- <dependency>
- <groupId>${project.parent.groupId}</groupId>
- <artifactId>taverna-osgi-schemas</artifactId>
- <version>${project.parent.version}</version>
- </dependency>
-
- <dependency>
- <groupId>biz.aQute</groupId>
- <artifactId>bndlib</artifactId>
- <version>2.0.0.20130123-133441</version>
- </dependency>
-
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- <version>1.7</version>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <version>2.4</version>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.4</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.plugin-testing</groupId>
- <artifactId>maven-plugin-testing-harness</artifactId>
- <version>3.2.0</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/2f5a0e94/taverna-maven-plugin/src/main/java/net/sf/taverna/t2/maven/plugins/AbstractDeployMojo.java
----------------------------------------------------------------------
diff --git a/taverna-maven-plugin/src/main/java/net/sf/taverna/t2/maven/plugins/AbstractDeployMojo.java b/taverna-maven-plugin/src/main/java/net/sf/taverna/t2/maven/plugins/AbstractDeployMojo.java
deleted file mode 100644
index d3e98cf..0000000
--- a/taverna-maven-plugin/src/main/java/net/sf/taverna/t2/maven/plugins/AbstractDeployMojo.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2013 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 net.sf.taverna.t2.maven.plugins;
-
-import java.io.File;
-
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.plugins.annotations.Component;
-import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.project.MavenProject;
-
-/**
- * Abstract Mojo for deploying artifacts.
- *
- * @author David Withers
- */
-public abstract class AbstractDeployMojo extends AbstractWagonMojo {
-
- @Component
- protected MavenProject project;
-
- /**
- * Directory containing the generated Taverna plugin.
- */
- @Parameter(defaultValue = "${project.build.directory}", required = true)
- protected File buildDirectory;
-
- @Parameter(defaultValue = "${project.build.outputDirectory}", required = true)
- protected File outputDirectory;
-
- @Parameter(defaultValue = "${project.artifact}", required = true, readonly = true)
- protected Artifact artifact;
-
- @Parameter(defaultValue = "${project.distributionManagementArtifactRepository}", required = true, readonly = true)
- protected ArtifactRepository deploymentRepository;
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/2f5a0e94/taverna-maven-plugin/src/main/java/net/sf/taverna/t2/maven/plugins/AbstractWagonMojo.java
----------------------------------------------------------------------
diff --git a/taverna-maven-plugin/src/main/java/net/sf/taverna/t2/maven/plugins/AbstractWagonMojo.java b/taverna-maven-plugin/src/main/java/net/sf/taverna/t2/maven/plugins/AbstractWagonMojo.java
deleted file mode 100644
index a74166a..0000000
--- a/taverna-maven-plugin/src/main/java/net/sf/taverna/t2/maven/plugins/AbstractWagonMojo.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2013 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 net.sf.taverna.t2.maven.plugins;
-
-import org.apache.maven.artifact.manager.WagonManager;
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugins.annotations.Component;
-import org.apache.maven.wagon.ConnectionException;
-import org.apache.maven.wagon.Wagon;
-import org.apache.maven.wagon.observers.Debug;
-
-/**
- * Abstract Mojo for using the wagon.
- *
- * @author David Withers
- */
-public abstract class AbstractWagonMojo extends AbstractMojo {
-
- @Component
- protected WagonManager wagonManager;
-
- /**
- * Disconnect the wagon.
- *
- * @param wagon
- * the wagon to disconnect
- * @param debug
- */
- protected void disconnectWagon(Wagon wagon, Debug debug) {
- if (getLog().isDebugEnabled()) {
- wagon.removeTransferListener(debug);
- wagon.removeSessionListener(debug);
- }
- try {
- wagon.disconnect();
- } catch (ConnectionException e) {
- getLog().error("Error disconnecting wagon - ignored", e);
- }
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-osgi/blob/2f5a0e94/taverna-maven-plugin/src/main/java/net/sf/taverna/t2/maven/plugins/BundleArtifact.java
----------------------------------------------------------------------
diff --git a/taverna-maven-plugin/src/main/java/net/sf/taverna/t2/maven/plugins/BundleArtifact.java b/taverna-maven-plugin/src/main/java/net/sf/taverna/t2/maven/plugins/BundleArtifact.java
deleted file mode 100644
index 0226a07..0000000
--- a/taverna-maven-plugin/src/main/java/net/sf/taverna/t2/maven/plugins/BundleArtifact.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2013 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 net.sf.taverna.t2.maven.plugins;
-
-import org.apache.maven.artifact.Artifact;
-
-/**
- *
- *
- * @author David Withers
- */
-public class BundleArtifact {
-
- private Artifact artifact;
- private String symbolicName;
- private String version;
-
- public BundleArtifact(Artifact artifact, String symbolicName, String version) {
- this.artifact = artifact;
- this.symbolicName = symbolicName;
- this.version = version;
- }
-
- public Artifact getArtifact() {
- return artifact;
- }
-
- public void setArtifact(Artifact artifact) {
- this.artifact = artifact;
- }
-
- public String getSymbolicName() {
- return symbolicName;
- }
-
- public void setSymbolicName(String symbolicName) {
- this.symbolicName = symbolicName;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
-}