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 2016/04/28 20:35:25 UTC
[1/6] incubator-taverna-common-activities git commit: ASF headers
Repository: incubator-taverna-common-activities
Updated Branches:
refs/heads/master 0fec6f045 -> 335831a12
ASF headers
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/8ed9113f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/tree/8ed9113f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/diff/8ed9113f
Branch: refs/heads/master
Commit: 8ed9113fa42750f290b06f6d665fd5bd0fed72bd
Parents: 0fec6f0
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Apr 28 16:46:43 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Apr 28 16:46:43 2016 +0100
----------------------------------------------------------------------
.../src/main/resources/xml-splitter.schema.json | 2 ++
.../XMLSplitterConfigurationBeanBuilderTest.java | 18 ++++++++++++++++++
2 files changed, 20 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/8ed9113f/taverna-wsdl-activity/src/main/resources/xml-splitter.schema.json
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity/src/main/resources/xml-splitter.schema.json b/taverna-wsdl-activity/src/main/resources/xml-splitter.schema.json
index 471defc..7207999 100644
--- a/taverna-wsdl-activity/src/main/resources/xml-splitter.schema.json
+++ b/taverna-wsdl-activity/src/main/resources/xml-splitter.schema.json
@@ -1,4 +1,6 @@
{
+ "http://purl.org/dc/terms/rights": "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.",
+ "http://purl.org/dc/terms/license": {"@id": "http://www.apache.org/licenses/LICENSE-2.0"},
"$schema": "http://json-schema.org/draft-03/schema#",
"id": "http://ns.taverna.org.uk/2010/activity/xml-splitter.schema.json",
"title": "XML splitter activity configuration",
http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/8ed9113f/taverna-wsdl-activity/src/test/java/org/apache/taverna/activities/wsdl/xmlsplitter/XMLSplitterConfigurationBeanBuilderTest.java
----------------------------------------------------------------------
diff --git a/taverna-wsdl-activity/src/test/java/org/apache/taverna/activities/wsdl/xmlsplitter/XMLSplitterConfigurationBeanBuilderTest.java b/taverna-wsdl-activity/src/test/java/org/apache/taverna/activities/wsdl/xmlsplitter/XMLSplitterConfigurationBeanBuilderTest.java
index 0f47e7c..18b5f18 100644
--- a/taverna-wsdl-activity/src/test/java/org/apache/taverna/activities/wsdl/xmlsplitter/XMLSplitterConfigurationBeanBuilderTest.java
+++ b/taverna-wsdl-activity/src/test/java/org/apache/taverna/activities/wsdl/xmlsplitter/XMLSplitterConfigurationBeanBuilderTest.java
@@ -1,3 +1,21 @@
+/*
+* 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.activities.wsdl.xmlsplitter;
import static org.junit.Assert.assertEquals;
[5/6] incubator-taverna-common-activities git commit: ASF headers
Posted by st...@apache.org.
ASF headers
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/aff32dbb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/tree/aff32dbb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/diff/aff32dbb
Branch: refs/heads/master
Commit: aff32dbb955dbe005a052169ec15d2e23dab3023
Parents: bb25b36
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Apr 28 16:57:41 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Apr 28 16:57:41 2016 +0100
----------------------------------------------------------------------
.../main/resources/abdera/adapter/feed.properties | 14 ++++++++++++++
.../src/main/resources/index | 14 ++++++++++++++
.../src/main/resources/interaction.css | 16 ++++++++++++++++
3 files changed, 44 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/aff32dbb/taverna-interaction-activity/src/main/resources/abdera/adapter/feed.properties
----------------------------------------------------------------------
diff --git a/taverna-interaction-activity/src/main/resources/abdera/adapter/feed.properties b/taverna-interaction-activity/src/main/resources/abdera/adapter/feed.properties
index 3371f38..b031968 100644
--- a/taverna-interaction-activity/src/main/resources/abdera/adapter/feed.properties
+++ b/taverna-interaction-activity/src/main/resources/abdera/adapter/feed.properties
@@ -1,3 +1,17 @@
+## 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.
subUri=feed
adapterClassName=net.sf.taverna.t2.activities.interaction.jetty.HackedFilesystemAdapter
title=Taverna interaction
http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/aff32dbb/taverna-interaction-activity/src/main/resources/index
----------------------------------------------------------------------
diff --git a/taverna-interaction-activity/src/main/resources/index b/taverna-interaction-activity/src/main/resources/index
index 8d3d1bc..6aecd49 100644
--- a/taverna-interaction-activity/src/main/resources/index
+++ b/taverna-interaction-activity/src/main/resources/index
@@ -1,3 +1,17 @@
+## 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.
ask
choose
notify
http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/aff32dbb/taverna-interaction-activity/src/main/resources/interaction.css
----------------------------------------------------------------------
diff --git a/taverna-interaction-activity/src/main/resources/interaction.css b/taverna-interaction-activity/src/main/resources/interaction.css
index a6e3301..3c64d17 100644
--- a/taverna-interaction-activity/src/main/resources/interaction.css
+++ b/taverna-interaction-activity/src/main/resources/interaction.css
@@ -1,3 +1,19 @@
+/*
+ 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.
+*/
html, body { height: 100%; width: 100%; margin: 0; border:0; }
#presentationFrame, #presentationDiv { height: 90%; width: 95%; margin: 0; border:0; frameborder:0; }
#acknowledgment { width: 95%; margin: 0; border:0; frameborder:0; background-color: #eeeb99; color: #555555; text-align:center; }
[4/6] incubator-taverna-common-activities git commit: Don't rat-check
test-resources
Posted by st...@apache.org.
Don't rat-check test-resources
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/bb25b367
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/tree/bb25b367
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/diff/bb25b367
Branch: refs/heads/master
Commit: bb25b367db2363faad77c2d95aa11be153c22a9f
Parents: 24351fd
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Apr 28 16:52:15 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Apr 28 16:52:15 2016 +0100
----------------------------------------------------------------------
pom.xml | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/bb25b367/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index b498875..ea4a527 100644
--- a/pom.xml
+++ b/pom.xml
@@ -70,6 +70,7 @@
<configuration>
<excludes combine.children="append">
<exclude>**/src/main/resources/META-INF/soap-encoding.xsd</exclude> <!-- W3C Software License (See NOTICE) -->
+ <exclude>**/src/test/resources/test-spreadsheet*</exclude> <!-- Our own test spreadsheets -->
</excludes>
</configuration>
</plugin>
[2/6] incubator-taverna-common-activities git commit: Removed *.bak
files
Posted by st...@apache.org.
Removed *.bak files
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/08c302d4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/tree/08c302d4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/diff/08c302d4
Branch: refs/heads/master
Commit: 08c302d411c85a936da25587c46a29454461a612
Parents: 8ed9113
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Apr 28 16:48:01 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Apr 28 16:48:01 2016 +0100
----------------------------------------------------------------------
.../rest/ApacheHttpClientUsageTest.java.bak | 215 -------------------
.../rest/ExampleActivityTest.java.bak | 153 -------------
2 files changed, 368 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/08c302d4/taverna-rest-activity/src/test/java/org/apache/taverna/activities/rest/ApacheHttpClientUsageTest.java.bak
----------------------------------------------------------------------
diff --git a/taverna-rest-activity/src/test/java/org/apache/taverna/activities/rest/ApacheHttpClientUsageTest.java.bak b/taverna-rest-activity/src/test/java/org/apache/taverna/activities/rest/ApacheHttpClientUsageTest.java.bak
deleted file mode 100644
index c966a57..0000000
--- a/taverna-rest-activity/src/test/java/org/apache/taverna/activities/rest/ApacheHttpClientUsageTest.java.bak
+++ /dev/null
@@ -1,215 +0,0 @@
-package org.apache.taverna.activities.rest;
-
-import java.awt.BorderLayout;
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.UnsupportedEncodingException;
-
-import javax.swing.BorderFactory;
-import javax.swing.JButton;
-import javax.swing.JComboBox;
-import javax.swing.JFrame;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JTextArea;
-import javax.swing.JTextField;
-
-import org.apache.commons.codec.binary.Base64;
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpHost;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.methods.HttpDelete;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.client.methods.HttpPut;
-import org.apache.http.client.methods.HttpRequestBase;
-import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.client.DefaultHttpClient;
-import org.apache.http.protocol.BasicHttpContext;
-import org.apache.http.protocol.ExecutionContext;
-import org.apache.http.protocol.HttpContext;
-
-/**
- *
- * @author Sergejs Aleksejevs
- */
-public class ApacheHttpClientUsageTest extends JFrame implements ActionListener
-{
- private JComboBox cbHttpMethod;
- private JTextField tfAddressBar;
- private JButton bGo;
- private JTextArea taResponse;
- private JScrollPane spResponse;
-
-
- /**
- * Constructor is solely involved in the UI initialisation.
- */
- public ApacheHttpClientUsageTest()
- {
- Container contentPane = this.getContentPane();
- contentPane.setLayout(new BorderLayout(5,5));
-
- bGo = new JButton("GO!");
- bGo.addActionListener(this);
- bGo.setDefaultCapable(true);
- this.getRootPane().setDefaultButton(bGo);
-
- tfAddressBar = new JTextField(50);
- tfAddressBar.setPreferredSize(new Dimension(0,bGo.getPreferredSize().height));
- tfAddressBar.setText("http://test.biocatalogue.org/");
-
- JPanel jpAddressBar = new JPanel();
- jpAddressBar.add(tfAddressBar);
- jpAddressBar.add(bGo);
-
- cbHttpMethod = new JComboBox(RESTActivity.HTTP_METHOD.values());
- cbHttpMethod.setBorder(BorderFactory.createCompoundBorder(
- BorderFactory.createEmptyBorder(5, 5, 5, 5),
- cbHttpMethod.getBorder()));
-
- JPanel jpAllNavigation = new JPanel(new BorderLayout());
- jpAllNavigation.add(jpAddressBar, BorderLayout.NORTH);
- jpAllNavigation.add(cbHttpMethod, BorderLayout.CENTER);
-
- contentPane.add(jpAllNavigation, BorderLayout.NORTH);
-
- taResponse = new JTextArea(20, 20);
- taResponse.setEditable(true);
-
- spResponse = new JScrollPane(taResponse);
- spResponse.setBorder(BorderFactory.createCompoundBorder(
- BorderFactory.createEmptyBorder(0, 5, 5, 5),
- BorderFactory.createEtchedBorder()));
- contentPane.add(spResponse, BorderLayout.CENTER);
-
- this.pack();
- this.setLocationRelativeTo(null); // center on screen
- }
-
-
- /**
- * Click handler for the only button there is - the "GO!" button
- */
- public void actionPerformed(ActionEvent e)
- {
- if (e.getSource().equals(bGo))
- {
- try {
- switch ((RESTActivity.HTTP_METHOD)cbHttpMethod.getSelectedItem()) {
- case GET: doGET(); break;
- case POST: doPOST(); break;
- case PUT: doPUT(); break;
- case DELETE: doDELETE(); break;
- }
- }
- catch (Exception ex) {
- taResponse.setText(ex + "\n\n" + ex.getStackTrace());
- }
- }
- }
-
-
- private void doGET() {
- HttpGet httpGet = new HttpGet(tfAddressBar.getText());
- httpGet.addHeader("Accept", "application/xml");
- performHTTPRequest(httpGet);
- }
-
-
- private void doPOST() throws UnsupportedEncodingException {
-// // POST TO MYEXPERIMENT - basic auth
-// HttpPost httpPost = new HttpPost("http://sandbox.myexperiment.org/comment.xml");
-// httpPost.addHeader("Authorization", "Basic " + new String(Base64.encodeBase64(("LOGIN" + ":" + "PASSWORD").getBytes())));
-// httpPost.addHeader("Accept", "application/xml");
-// httpPost.addHeader("Content-Type", "application/xml");
-// httpPost.setEntity(new StringEntity("<comment><subject resource=\"http://sandbox.myexperiment.org/files/226\"/><comment>1234567</comment></comment>"));
-// performHTTPRequest(httpPost);
-
- // POST TO BIOCATALOGUE - no auth
- HttpPost httpPost = new HttpPost(tfAddressBar.getText());
- httpPost.addHeader("Accept", "application/xml");
- httpPost.addHeader("Content-Type", "application/xml");
- httpPost.setEntity(new StringEntity("<searchByData><searchType>input</searchType><limit>20</limit><data>test</data></searchByData>"));
- performHTTPRequest(httpPost);
- }
-
-
- private void doPUT() throws UnsupportedEncodingException {
- HttpPut httpPut = new HttpPut("http://sandbox.myexperiment.org/comment.xml?id=251");
- httpPut.addHeader("Authorization", "Basic " + new String(Base64.encodeBase64(("LOGIN" + ":" + "PASSWORD").getBytes())));
- httpPut.addHeader("Accept", "application/xml");
- httpPut.addHeader("Content-Type", "application/xml");
- httpPut.setEntity(new StringEntity("<comment><subject resource=\"http://sandbox.myexperiment.org/files/226\"/><comment>12345678</comment></comment>"));
- performHTTPRequest(httpPut);
- }
-
-
- private void doDELETE() {
- HttpDelete httpDelete = new HttpDelete("http://sandbox.myexperiment.org/comment.xml?id=251");
- httpDelete.addHeader("Authorization", "Basic " + new String(Base64.encodeBase64(("LOGIN" + ":" + "PASSWORD").getBytes())));
- httpDelete.addHeader("Accept", "application/xml");
- performHTTPRequest(httpDelete);
- }
-
-
- private void performHTTPRequest(HttpRequestBase httpRequest) {
- try {
- StringBuilder responseStr = new StringBuilder();
- // ---------------------------------------------
-
- HttpClient httpClient = new DefaultHttpClient();
- HttpContext localContext = new BasicHttpContext();
-
- HttpResponse response = httpClient.execute(httpRequest, localContext);
- // ---
- // TRACK WHERE THE FINAL REDIRECT ENDS UP - target host + URI
- HttpHost target = (HttpHost) localContext.getAttribute(ExecutionContext.HTTP_TARGET_HOST);
- HttpUriRequest req = (HttpUriRequest) localContext.getAttribute(ExecutionContext.HTTP_REQUEST);
-
- responseStr.append("Final request URI: " + req.getMethod() + " " + target + req.getURI() + "\n");
-// System.out.println("Target host: " + target);
-// System.out.println("Final request URI: " + req.getURI());
-// System.out.println("Final request method: " + req.getMethod());
- // ---
- responseStr.append(response.getStatusLine() + "\n");
-
- HttpEntity entity = response.getEntity();
- responseStr.append(entity.getContentType() + "\n\n");
-
- if (entity != null) {
- InputStream in = entity.getContent();
- BufferedReader reader = new BufferedReader(new InputStreamReader(in));
-
- String str;
- while ((str = reader.readLine()) != null) {
- responseStr.append(str + "\n");
- }
-
- taResponse.setText(responseStr.toString());
- taResponse.setCaretPosition(0);
- }
-
- httpClient.getConnectionManager().shutdown();
- }
- catch (Exception ex) {
- taResponse.setText(ex.getMessage() + "\n\n" + ex.getStackTrace());
- }
- }
-
-
- public static void main(String[] args)
- {
- ApacheHttpClientUsageTest frame = new ApacheHttpClientUsageTest();
- frame.setVisible(true);
- frame.tfAddressBar.setCaretPosition(frame.tfAddressBar.getText().length());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/08c302d4/taverna-rest-activity/src/test/java/org/apache/taverna/activities/rest/ExampleActivityTest.java.bak
----------------------------------------------------------------------
diff --git a/taverna-rest-activity/src/test/java/org/apache/taverna/activities/rest/ExampleActivityTest.java.bak b/taverna-rest-activity/src/test/java/org/apache/taverna/activities/rest/ExampleActivityTest.java.bak
deleted file mode 100644
index 977db27..0000000
--- a/taverna-rest-activity/src/test/java/org/apache/taverna/activities/rest/ExampleActivityTest.java.bak
+++ /dev/null
@@ -1,153 +0,0 @@
-package org.apache.taverna.activities.rest;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.net.URI;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.taverna.activities.testutils.ActivityInvoker;
-import org.apache.taverna.reference.ErrorDocument;
-import org.apache.taverna.reference.ExternalReferenceSPI;
-import org.apache.taverna.workflowmodel.OutputPort;
-import org.apache.taverna.workflowmodel.processor.activity.ActivityConfigurationException;
-import org.apache.taverna.workflowmodel.processor.activity.ActivityInputPort;
-
-import org.junit.Before;
-import org.junit.Test;
-
-public class ExampleActivityTest {
-
- private RESTActivityConfigurationBean configBean;
-
- private RESTActivity activity = new RESTActivity();
-
- @Before
- public void makeConfigBean() throws Exception {
- configBean = new RESTActivityConfigurationBean();
- configBean.setExampleString("something");
- configBean
- .setExampleUri(URI.create("http://localhost:8080/myEndPoint"));
- }
-
- @Test(expected = ActivityConfigurationException.class)
- public void invalidConfiguration() throws ActivityConfigurationException {
- RESTActivityConfigurationBean invalidBean = new RESTActivityConfigurationBean();
- invalidBean.setExampleString("invalidExample");
- // Should throw ActivityConfigurationException
- activity.configure(invalidBean);
- }
-
- @Test
- public void executeAsynch() throws Exception {
- activity.configure(configBean);
-
- Map<String, Object> inputs = new HashMap<String, Object>();
- inputs.put("firstInput", "hello");
-
- Map<String, Class<?>> expectedOutputTypes = new HashMap<String, Class<?>>();
- expectedOutputTypes.put("simpleOutput", String.class);
- expectedOutputTypes.put("moreOutputs", ExternalReferenceSPI.class);
-
- Map<String, Object> outputs = ActivityInvoker.invokeAsyncActivity(
- activity, inputs, expectedOutputTypes);
-
- assertEquals("Unexpected outputs", 2, outputs.size());
- assertEquals("da39a3ee5e6b4b0d3255bfef95601890afd80709", outputs.get("simpleOutput"));
- ErrorDocument errorDoc = (ErrorDocument) outputs.get("moreOutputs");
- assertEquals("java.lang.Exception: There are no more values",
- errorDoc.getExceptionMessage());
-
- }
-
-
-
- @Test
- public void checksumOfExtraData() throws Exception {
- configBean.setExampleString("specialCase");
- activity.configure(configBean);
-
- Map<String, Object> inputs = new HashMap<String, Object>();
- inputs.put("firstInput", "hello");
- inputs.put("extraData", Arrays.asList("Test1".getBytes("utf8"),
- "Test2".getBytes("utf8")));
-
-
- Map<String, Class<?>> expectedOutputTypes = new HashMap<String, Class<?>>();
- expectedOutputTypes.put("simpleOutput", String.class);
- expectedOutputTypes.put("moreOutputs", ExternalReferenceSPI.class);
- expectedOutputTypes.put("report", String.class);
-
-
- Map<String, Object> outputs = ActivityInvoker.invokeAsyncActivity(
- activity, inputs, expectedOutputTypes);
-
- assertEquals("Unexpected outputs", 3, outputs.size());
- assertEquals("35bceb434ff8e69fb89b829e461c921a28b423b3", outputs.get("simpleOutput"));
- ErrorDocument errorDoc = (ErrorDocument) outputs.get("moreOutputs");
- assertEquals("java.lang.Exception: There are no more values",
- errorDoc.getExceptionMessage());
-
- }
-
-
-
- @Test
- public void reConfiguredActivity() throws Exception {
- assertEquals("Unexpected inputs", 0, activity.getInputPorts().size());
- assertEquals("Unexpected outputs", 0, activity.getOutputPorts().size());
-
- activity.configure(configBean);
- assertEquals("Unexpected inputs", 1, activity.getInputPorts().size());
- assertEquals("Unexpected outputs", 2, activity.getOutputPorts().size());
-
- activity.configure(configBean);
- // Should not change on reconfigure
- assertEquals("Unexpected inputs", 1, activity.getInputPorts().size());
- assertEquals("Unexpected outputs", 2, activity.getOutputPorts().size());
- }
-
- @Test
- public void reConfiguredSpecialPorts() throws Exception {
- activity.configure(configBean);
-
- RESTActivityConfigurationBean specialBean = new RESTActivityConfigurationBean();
- specialBean.setExampleString("specialCase");
- specialBean.setExampleUri(URI
- .create("http://localhost:8080/myEndPoint"));
- activity.configure(specialBean);
- // Should now have added the optional ports
- assertEquals("Unexpected inputs", 2, activity.getInputPorts().size());
- assertEquals("Unexpected outputs", 3, activity.getOutputPorts().size());
- }
-
- @Test
- public void configureActivity() throws Exception {
- Set<String> expectedInputs = new HashSet<String>();
- expectedInputs.add("firstInput");
-
- Set<String> expectedOutputs = new HashSet<String>();
- expectedOutputs.add("simpleOutput");
- expectedOutputs.add("moreOutputs");
-
- activity.configure(configBean);
-
- Set<ActivityInputPort> inputPorts = activity.getInputPorts();
- assertEquals(expectedInputs.size(), inputPorts.size());
- for (ActivityInputPort inputPort : inputPorts) {
- assertTrue("Wrong input : " + inputPort.getName(), expectedInputs
- .remove(inputPort.getName()));
- }
-
- Set<OutputPort> outputPorts = activity.getOutputPorts();
- assertEquals(expectedOutputs.size(), outputPorts.size());
- for (OutputPort outputPort : outputPorts) {
- assertTrue("Wrong output : " + outputPort.getName(),
- expectedOutputs.remove(outputPort.getName()));
- }
- }
-}
[6/6] incubator-taverna-common-activities git commit: rat-ignore
(public domain)
Posted by st...@apache.org.
rat-ignore (public domain)
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/335831a1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/tree/335831a1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/diff/335831a1
Branch: refs/heads/master
Commit: 335831a1285a68f33149ff86a826cf7c58f97fc0
Parents: aff32db
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Apr 28 16:57:49 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Apr 28 19:35:11 2016 +0100
----------------------------------------------------------------------
pom.xml | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/335831a1/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index ea4a527..a42d071 100644
--- a/pom.xml
+++ b/pom.xml
@@ -71,6 +71,7 @@
<excludes combine.children="append">
<exclude>**/src/main/resources/META-INF/soap-encoding.xsd</exclude> <!-- W3C Software License (See NOTICE) -->
<exclude>**/src/test/resources/test-spreadsheet*</exclude> <!-- Our own test spreadsheets -->
+ <exclude>**/src/main/resources/json2.js</exclude><!-- public domain -->
</excludes>
</configuration>
</plugin>
[3/6] incubator-taverna-common-activities git commit: ASF headers in
Velocity templates
Posted by st...@apache.org.
ASF headers in Velocity templates
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/24351fd6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/tree/24351fd6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/diff/24351fd6
Branch: refs/heads/master
Commit: 24351fd69a05c1f2a1c31b523ad9dd5f82603d6a
Parents: 08c302d
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Apr 28 16:52:04 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Apr 28 16:52:04 2016 +0100
----------------------------------------------------------------------
.../src/main/resources/Authorize.vm | 17 +++++++++++++++++
.../src/main/resources/MasterPassword.vm | 17 +++++++++++++++++
.../src/main/resources/TrustedCertificate.vm | 17 +++++++++++++++++
.../src/main/resources/TruststorePassword.vm | 17 +++++++++++++++++
.../src/main/resources/UsernamePassword.vm | 17 +++++++++++++++++
.../src/main/resources/ask.vm | 17 +++++++++++++++++
.../src/main/resources/choose.vm | 17 +++++++++++++++++
.../src/main/resources/interaction.vm | 17 +++++++++++++++++
.../src/main/resources/notify.vm | 17 +++++++++++++++++
.../src/main/resources/select.vm | 17 +++++++++++++++++
.../src/main/resources/tell.vm | 17 +++++++++++++++++
.../src/main/resources/warn.vm | 17 +++++++++++++++++
12 files changed, 204 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/24351fd6/taverna-interaction-activity/src/main/resources/Authorize.vm
----------------------------------------------------------------------
diff --git a/taverna-interaction-activity/src/main/resources/Authorize.vm b/taverna-interaction-activity/src/main/resources/Authorize.vm
index ac9a387..c48b9b9 100644
--- a/taverna-interaction-activity/src/main/resources/Authorize.vm
+++ b/taverna-interaction-activity/src/main/resources/Authorize.vm
@@ -1,3 +1,20 @@
+#*
+ 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.
+*#
+
#produce("answer")
<!doctype html>
<html>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/24351fd6/taverna-interaction-activity/src/main/resources/MasterPassword.vm
----------------------------------------------------------------------
diff --git a/taverna-interaction-activity/src/main/resources/MasterPassword.vm b/taverna-interaction-activity/src/main/resources/MasterPassword.vm
index 94e7859..7495357 100644
--- a/taverna-interaction-activity/src/main/resources/MasterPassword.vm
+++ b/taverna-interaction-activity/src/main/resources/MasterPassword.vm
@@ -1,3 +1,20 @@
+#*
+ 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.
+*#
+
#produce("password")
<!doctype html>
<html>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/24351fd6/taverna-interaction-activity/src/main/resources/TrustedCertificate.vm
----------------------------------------------------------------------
diff --git a/taverna-interaction-activity/src/main/resources/TrustedCertificate.vm b/taverna-interaction-activity/src/main/resources/TrustedCertificate.vm
index 44a5359..26c7ef8 100644
--- a/taverna-interaction-activity/src/main/resources/TrustedCertificate.vm
+++ b/taverna-interaction-activity/src/main/resources/TrustedCertificate.vm
@@ -1,3 +1,20 @@
+#*
+ 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.
+*#
+
#require("serviceURI")
#require("requestingPrompt")
#produce("username")
http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/24351fd6/taverna-interaction-activity/src/main/resources/TruststorePassword.vm
----------------------------------------------------------------------
diff --git a/taverna-interaction-activity/src/main/resources/TruststorePassword.vm b/taverna-interaction-activity/src/main/resources/TruststorePassword.vm
index 6106115..6f266d5 100644
--- a/taverna-interaction-activity/src/main/resources/TruststorePassword.vm
+++ b/taverna-interaction-activity/src/main/resources/TruststorePassword.vm
@@ -1,3 +1,20 @@
+#*
+ 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.
+*#
+
#produce("password")
<!doctype html>
<html>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/24351fd6/taverna-interaction-activity/src/main/resources/UsernamePassword.vm
----------------------------------------------------------------------
diff --git a/taverna-interaction-activity/src/main/resources/UsernamePassword.vm b/taverna-interaction-activity/src/main/resources/UsernamePassword.vm
index 671c3ee..5306546 100644
--- a/taverna-interaction-activity/src/main/resources/UsernamePassword.vm
+++ b/taverna-interaction-activity/src/main/resources/UsernamePassword.vm
@@ -1,3 +1,20 @@
+#*
+ 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.
+*#
+
#require("serviceURI")
#require("requestingPrompt")
#produce("username")
http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/24351fd6/taverna-interaction-activity/src/main/resources/ask.vm
----------------------------------------------------------------------
diff --git a/taverna-interaction-activity/src/main/resources/ask.vm b/taverna-interaction-activity/src/main/resources/ask.vm
index 92ce145..b07a3ec 100644
--- a/taverna-interaction-activity/src/main/resources/ask.vm
+++ b/taverna-interaction-activity/src/main/resources/ask.vm
@@ -1,3 +1,20 @@
+#*
+ 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.
+*#
+
#require("message")
#require("title")
#produce("answer")
http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/24351fd6/taverna-interaction-activity/src/main/resources/choose.vm
----------------------------------------------------------------------
diff --git a/taverna-interaction-activity/src/main/resources/choose.vm b/taverna-interaction-activity/src/main/resources/choose.vm
index f594beb..38510a8 100644
--- a/taverna-interaction-activity/src/main/resources/choose.vm
+++ b/taverna-interaction-activity/src/main/resources/choose.vm
@@ -1,3 +1,20 @@
+#*
+ 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.
+*#
+
#require("selectionValues",1)
#require("message")
#require("title")
http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/24351fd6/taverna-interaction-activity/src/main/resources/interaction.vm
----------------------------------------------------------------------
diff --git a/taverna-interaction-activity/src/main/resources/interaction.vm b/taverna-interaction-activity/src/main/resources/interaction.vm
index b2d71e1..e3e9458 100644
--- a/taverna-interaction-activity/src/main/resources/interaction.vm
+++ b/taverna-interaction-activity/src/main/resources/interaction.vm
@@ -1,3 +1,20 @@
+#*
+ 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.
+*#
+
<!doctype html>
<html>
<head>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/24351fd6/taverna-interaction-activity/src/main/resources/notify.vm
----------------------------------------------------------------------
diff --git a/taverna-interaction-activity/src/main/resources/notify.vm b/taverna-interaction-activity/src/main/resources/notify.vm
index a144ccc..6525b62 100644
--- a/taverna-interaction-activity/src/main/resources/notify.vm
+++ b/taverna-interaction-activity/src/main/resources/notify.vm
@@ -1,3 +1,20 @@
+#*
+ 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.
+*#
+
#require("message")
#require("title")
#notify
http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/24351fd6/taverna-interaction-activity/src/main/resources/select.vm
----------------------------------------------------------------------
diff --git a/taverna-interaction-activity/src/main/resources/select.vm b/taverna-interaction-activity/src/main/resources/select.vm
index 6fe5764..93be6dc 100644
--- a/taverna-interaction-activity/src/main/resources/select.vm
+++ b/taverna-interaction-activity/src/main/resources/select.vm
@@ -1,3 +1,20 @@
+#*
+ 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.
+*#
+
#require("valueList",1)
#require("message")
#require("title")
http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/24351fd6/taverna-interaction-activity/src/main/resources/tell.vm
----------------------------------------------------------------------
diff --git a/taverna-interaction-activity/src/main/resources/tell.vm b/taverna-interaction-activity/src/main/resources/tell.vm
index 948c023..7e69de4 100644
--- a/taverna-interaction-activity/src/main/resources/tell.vm
+++ b/taverna-interaction-activity/src/main/resources/tell.vm
@@ -1,3 +1,20 @@
+#*
+ 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.
+*#
+
#require("message")
#require("title")
#produce("answer")
http://git-wip-us.apache.org/repos/asf/incubator-taverna-common-activities/blob/24351fd6/taverna-interaction-activity/src/main/resources/warn.vm
----------------------------------------------------------------------
diff --git a/taverna-interaction-activity/src/main/resources/warn.vm b/taverna-interaction-activity/src/main/resources/warn.vm
index ae9f573..fae1f0a 100644
--- a/taverna-interaction-activity/src/main/resources/warn.vm
+++ b/taverna-interaction-activity/src/main/resources/warn.vm
@@ -1,3 +1,20 @@
+#*
+ 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.
+*#
+
#require("message")
#require("title")
#produce("answer")