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/03/06 17:23:56 UTC
[48/50] incubator-taverna-common-activities git commit: Configuration
beans not relevant in Taverna 3
Configuration beans not relevant in Taverna 3
Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/commit/d00b4c16
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/tree/d00b4c16
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/diff/d00b4c16
Branch: refs/heads/master
Commit: d00b4c16e88289c2db3e5b1e4416dc567fb2d9cf
Parents: 31ee601
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Fri Mar 6 16:20:23 2015 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Fri Mar 6 16:20:23 2015 +0000
----------------------------------------------------------------------
.../activities/beanshell/BeanshellActivity.java | 2 -
.../BeanshellActivityConfigurationBean.java | 86 -------------
.../DependencyActivityConfigurationBean.java | 123 -------------------
3 files changed, 211 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/d00b4c16/taverna-beanshell-activity/src/main/java/net/sf/taverna/t2/activities/beanshell/BeanshellActivity.java
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity/src/main/java/net/sf/taverna/t2/activities/beanshell/BeanshellActivity.java b/taverna-beanshell-activity/src/main/java/net/sf/taverna/t2/activities/beanshell/BeanshellActivity.java
index 134d3fe..9f0f938 100644
--- a/taverna-beanshell-activity/src/main/java/net/sf/taverna/t2/activities/beanshell/BeanshellActivity.java
+++ b/taverna-beanshell-activity/src/main/java/net/sf/taverna/t2/activities/beanshell/BeanshellActivity.java
@@ -53,8 +53,6 @@ public class BeanshellActivity extends AbstractAsynchronousDependencyActivity {
public static final String URI = "http://ns.taverna.org.uk/2010/activity/beanshell";
- protected BeanshellActivityConfigurationBean configurationBean;
-
private static Logger logger = Logger.getLogger(BeanshellActivity.class);
private Interpreter interpreter;
http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/d00b4c16/taverna-beanshell-activity/src/main/java/net/sf/taverna/t2/activities/beanshell/BeanshellActivityConfigurationBean.java
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity/src/main/java/net/sf/taverna/t2/activities/beanshell/BeanshellActivityConfigurationBean.java b/taverna-beanshell-activity/src/main/java/net/sf/taverna/t2/activities/beanshell/BeanshellActivityConfigurationBean.java
deleted file mode 100644
index 8a5f06f..0000000
--- a/taverna-beanshell-activity/src/main/java/net/sf/taverna/t2/activities/beanshell/BeanshellActivityConfigurationBean.java
+++ /dev/null
@@ -1,86 +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 net.sf.taverna.t2.activities.beanshell;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import net.sf.taverna.t2.activities.dependencyactivity.DependencyActivityConfigurationBean;
-import net.sf.taverna.t2.workflowmodel.processor.config.ConfigurationBean;
-import net.sf.taverna.t2.workflowmodel.processor.config.ConfigurationProperty;
-
-/**
- * A configuration bean specific to a Beanshell activity; provides details
- * about the Beanshell script and its local and artifact dependencies.
- *
- * @author Stuart Owen
- * @author David Withers
- * @author Alex Nenadic
- */
-@ConfigurationBean(uri = BeanshellActivity.URI + "#Config")
-public class BeanshellActivityConfigurationBean extends DependencyActivityConfigurationBean {
-
- private String script;
-
- public BeanshellActivityConfigurationBean() {
- super();
- this.script = "";
- }
-
- /**
- * @return the Beanshell script
- */
- public String getScript() {
- return script;
- }
-
- /**
- * @param script the Beanshell script
- */
- @ConfigurationProperty(name = "script", label = "Beanshell Script", description = "The beanshell script to be executed")
- public void setScript(String script) {
- this.script = script;
- }
-
- ///////////// From old code //////////
- @Deprecated
- private List<String> dependencies = new ArrayList<String>();
-
- /**
- * Returns the dependencies.
- *
- * @return the dependencies
- */
- public List<String> getDependencies() {
- return dependencies;
- }
-
- /**
- * Sets the dependencies.
- *
- * @param dependencies the new dependencies
- */
- public void setDependencies(List<String> dependencies) {
- this.dependencies = dependencies;
- }
- ///////////// From old code //////////
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/d00b4c16/taverna-beanshell-activity/src/main/java/net/sf/taverna/t2/activities/dependencyactivity/DependencyActivityConfigurationBean.java
----------------------------------------------------------------------
diff --git a/taverna-beanshell-activity/src/main/java/net/sf/taverna/t2/activities/dependencyactivity/DependencyActivityConfigurationBean.java b/taverna-beanshell-activity/src/main/java/net/sf/taverna/t2/activities/dependencyactivity/DependencyActivityConfigurationBean.java
deleted file mode 100644
index afe75e2..0000000
--- a/taverna-beanshell-activity/src/main/java/net/sf/taverna/t2/activities/dependencyactivity/DependencyActivityConfigurationBean.java
+++ /dev/null
@@ -1,123 +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 net.sf.taverna.t2.activities.dependencyactivity;
-
-import java.util.LinkedHashSet;
-
-import net.sf.taverna.t2.activities.dependencyactivity.AbstractAsynchronousDependencyActivity.ClassLoaderSharing;
-import net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityPortsDefinitionBean;
-import net.sf.taverna.t2.workflowmodel.processor.config.ConfigurationBean;
-import net.sf.taverna.t2.workflowmodel.processor.config.ConfigurationProperty;
-
-/**
- * Parent configuration bean for activities that have local JAR,
- * such as API Consumer and Beanshell activity.
- *
- * @author Alex Nenadic
- * @author David Withers
- */
-@ConfigurationBean(uri = "http://ns.taverna.org.uk/2010/activity/dependency#Config")
-public class DependencyActivityConfigurationBean extends
- ActivityPortsDefinitionBean {
-
- /**
- * Activity's classloader sharing policy.
- */
- private ClassLoaderSharing classLoaderSharing ;// = ClassLoaderSharing.workflow;
-
- /**
- * Local dependencies, i.e. filenames of JARs the activity depends on.
- * The files should be present in {@link AbstractAsynchronousActivityWithDependencies#libDir},
- * and the paths should be relative.
- */
- private LinkedHashSet<String> localDependencies ;//= new LinkedHashSet<String>();
-
- /**
- * Constructor.
- */
- public DependencyActivityConfigurationBean(){
- classLoaderSharing = ClassLoaderSharing.DEFAULT;
- localDependencies = new LinkedHashSet<String>();
- }
-
- /**
- * As XStream is not calling the default constructor during deserialization,
- * we have to set the default values here. This method will be called by XStream
- * after instantiating this bean.
- */
- private Object readResolve(){
- if (classLoaderSharing == null)
- classLoaderSharing = ClassLoaderSharing.DEFAULT;
-
- if (localDependencies == null)
- localDependencies = new LinkedHashSet<String>();
-
- return this;
- }
-
- /**
- * @param classLoaderSharing the classLoaderSharing to set
- */
- @ConfigurationProperty(name = "classLoaderSharing", label = "ClassLoader Sharing Policy", required = false)
- public void setClassLoaderSharing(ClassLoaderSharing classLoaderSharing) {
- this.classLoaderSharing = classLoaderSharing;
- }
-
- /**
- * @return the classLoaderSharing
- */
- public ClassLoaderSharing getClassLoaderSharing() {
- return classLoaderSharing;
- }
-
- /**
- * @param localDependencies the localDependencies to set
- */
- @ConfigurationProperty(name = "localDependency", label = "Local Dependencies", required = false)
- public void setLocalDependencies(LinkedHashSet<String> localDependencies) {
- this.localDependencies = localDependencies;
- }
-
- /**
- * @return the localDependencies
- */
- public LinkedHashSet<String> getLocalDependencies() {
- return localDependencies;
- }
-
- /**
- * Adds a dependency to the list of local dependencies.
- * @param dep
- */
- public void addLocalDependency(String dep){
- localDependencies.add(dep);
- }
-
- /**
- * Removes a dependency from the list of local dependencies.
- * @param dep
- */
- public void removeLocalDependency(String dep){
- localDependencies.remove(dep);
- }
-
-}
-