test_class.declarator: configuration
test_class.modifier: private
test_class.original_string: private ObjectNode configuration;
test_class.type: ObjectNode
test_class.var_name: configuration
test_class.file: taverna-beanshell-activity/src/test/java/org/apache/taverna/activities/beanshell/BeanshellActivityTest.java
test_class.identifier: BeanshellActivityTest
test_case.body: @Test
  	public void simpleScript() throws Exception {
  		BeanshellActivity activity = new BeanshellActivity(null);
  		Edits edits = new EditsImpl();
  		edits.getAddActivityInputPortEdit(activity, new ActivityInputPortImpl("input", 0, false, null, String.class)).doEdit();
  		edits.getAddActivityOutputPortEdit(activity, new ActivityOutputPortImpl("output", 0, 0)).doEdit();
  
  		configuration.put("script", "String output = input + \"_returned\";");
  
  		activity.configure(configuration);
  		assertEquals("There should be 1 input port",1,activity.getInputPorts().size());
  		assertEquals("There should be 1 output port",1,activity.getOutputPorts().size());
  
  		assertEquals("The input should be called input", "input",((AbstractPort)activity.getInputPorts().toArray()[0]).getName());
  		assertEquals("The output should be called output", "output",((AbstractPort)activity.getOutputPorts().toArray()[0]).getName());
  
  		Map<String,Object> inputs = new HashMap<String, Object>();
  		inputs.put("input", "aString");
  		Map<String, Class<?>> expectedOutputs = new HashMap<String, Class<?>>();
  		expectedOutputs.put("output", String.class);
  
  		Map<String,Object> outputs = ActivityInvoker.invokeAsyncActivity(activity, inputs, expectedOutputs);
  		assertTrue("there should be an output named output",outputs.containsKey("output"));
  		assertEquals("output should have the value aString_returned","aString_returned",outputs.get("output"));
  	}
test_case.class_method_signature: BeanshellActivityTest.simpleScript()
test_case.full_signature: @Test public void simpleScript()
test_case.identifier: simpleScript
test_case.invocations: doEdit getAddActivityInputPortEdit doEdit getAddActivityOutputPortEdit put configure assertEquals size getInputPorts assertEquals size getOutputPorts assertEquals getName toArray getInputPorts assertEquals getName toArray getOutputPorts put put invokeAsyncActivity assertTrue containsKey assertEquals get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void simpleScript()
focal_class.declarator: URI = "http://ns.taverna.org.uk/2010/activity/beanshell"
focal_class.modifier: public static final
focal_class.original_string: public static final String URI = "http://ns.taverna.org.uk/2010/activity/beanshell";
focal_class.type: String
focal_class.var_name: URI
focal_class.declarator: logger = Logger.getLogger(BeanshellActivity.class)
focal_class.modifier: private static
focal_class.original_string: private static Logger logger = Logger.getLogger(BeanshellActivity.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: interpreter
focal_class.modifier: private
focal_class.original_string: private Interpreter interpreter;
focal_class.type: Interpreter
focal_class.var_name: interpreter
focal_class.declarator: CLEAR_COMMAND = "clear();"
focal_class.modifier: private static
focal_class.original_string: private static String CLEAR_COMMAND = "clear();";
focal_class.type: String
focal_class.var_name: CLEAR_COMMAND
focal_class.declarator: json
focal_class.modifier: private
focal_class.original_string: private JsonNode json;
focal_class.type: JsonNode
focal_class.var_name: json
focal_class.file: taverna-beanshell-activity/src/main/java/org/apache/taverna/activities/beanshell/BeanshellActivity.java
focal_class.identifier: BeanshellActivity
focal_class.class_method_signature: BeanshellActivity.BeanshellActivity(ApplicationConfiguration applicationConfiguration)
focal_class.full_signature: public  BeanshellActivity(ApplicationConfiguration applicationConfiguration)
focal_class.identifier: BeanshellActivity
focal_class.modifiers: public
focal_class.parameters: (ApplicationConfiguration applicationConfiguration)
focal_class.signature:  BeanshellActivity(ApplicationConfiguration applicationConfiguration)
focal_class.class_method_signature: BeanshellActivity.getConfiguration()
focal_class.full_signature: @Override public JsonNode getConfiguration()
focal_class.identifier: getConfiguration
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: JsonNode
focal_class.signature: JsonNode getConfiguration()
focal_class.class_method_signature: BeanshellActivity.configure(JsonNode json)
focal_class.full_signature: @Override public void configure(JsonNode json)
focal_class.identifier: configure
focal_class.modifiers: @Override public
focal_class.parameters: (JsonNode json)
focal_class.return: void
focal_class.signature: void configure(JsonNode json)
focal_class.class_method_signature: BeanshellActivity.createInterpreter()
focal_class.full_signature: private void createInterpreter()
focal_class.identifier: createInterpreter
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void createInterpreter()
focal_class.class_method_signature: BeanshellActivity.checkGranularDepths()
focal_class.full_signature: protected void checkGranularDepths()
focal_class.identifier: checkGranularDepths
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void checkGranularDepths()
focal_class.class_method_signature: BeanshellActivity.getInputPort(String name)
focal_class.full_signature: public ActivityInputPort getInputPort(String name)
focal_class.identifier: getInputPort
focal_class.modifiers: public
focal_class.parameters: (String name)
focal_class.return: ActivityInputPort
focal_class.signature: ActivityInputPort getInputPort(String name)
focal_class.class_method_signature: BeanshellActivity.clearInterpreter()
focal_class.full_signature: private void clearInterpreter()
focal_class.identifier: clearInterpreter
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void clearInterpreter()
focal_class.class_method_signature: BeanshellActivity.executeAsynch(final Map<String, T2Reference> data,
  			final AsynchronousActivityCallback callback)
focal_class.full_signature: @Override public void executeAsynch(final Map<String, T2Reference> data,
  			final AsynchronousActivityCallback callback)
focal_class.identifier: executeAsynch
focal_class.modifiers: @Override public
focal_class.parameters: (final Map<String, T2Reference> data,
  			final AsynchronousActivityCallback callback)
focal_class.return: void
focal_class.signature: void executeAsynch(final Map<String, T2Reference> data,
  			final AsynchronousActivityCallback callback)
focal_class.class_method_signature: BeanshellActivity.determineMessage(Throwable e)
focal_class.full_signature: private static String determineMessage(Throwable e)
focal_class.identifier: determineMessage
focal_class.modifiers: private static
focal_class.parameters: (Throwable e)
focal_class.return: String
focal_class.signature: String determineMessage(Throwable e)
focal_class.superclass: extends AbstractAsynchronousDependencyActivity
focal_method.body: @Override
  	public void configure(JsonNode json) {
  		this.json = json;
  		checkGranularDepths();
  	}
focal_method.class_method_signature: BeanshellActivity.configure(JsonNode json)
focal_method.full_signature: @Override public void configure(JsonNode json)
focal_method.identifier: configure
focal_method.invocations: checkGranularDepths
focal_method.modifiers: @Override public
focal_method.parameters: (JsonNode json)
focal_method.return: void
focal_method.signature: void configure(JsonNode json)