org.knime.core.node.workflow
Class WorkflowLoadHelper

java.lang.Object
  extended by org.knime.core.node.workflow.WorkflowLoadHelper

public class WorkflowLoadHelper
extends Object

Callback class that is used during loading of a workflow to read user credentials and other information.

Author:
Bernd Wiswedel, KNIME.com, Zurich, Switzerland

Nested Class Summary
static class WorkflowLoadHelper.UnknownKNIMEVersionLoadPolicy
          How to proceed when a workflow written with a future KNIME version is loaded.
 
Field Summary
static WorkflowLoadHelper INSTANCE
          Default (pessimistic) default load helper.
 
Constructor Summary
WorkflowLoadHelper()
          Default instance.
WorkflowLoadHelper(boolean isTemplate)
           
 
Method Summary
 String getDotKNIMEFileName()
          Get the name of the *.knime file.
 WorkflowLoadHelper.UnknownKNIMEVersionLoadPolicy getUnknownKNIMEVersionLoadPolicy(String workflowVersionString)
          Callback if an unknown version string is encountered in the KNIME workflow.
 boolean isTemplateFlow()
          Returns true if the workflow is a template flow, i.e.
 List<Credentials> loadCredentials(List<Credentials> credentials)
          Caller method invoked when credentials are needed during loading of a workflow.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final WorkflowLoadHelper INSTANCE
Default (pessimistic) default load helper.

Constructor Detail

WorkflowLoadHelper

public WorkflowLoadHelper()
Default instance.


WorkflowLoadHelper

public WorkflowLoadHelper(boolean isTemplate)
Parameters:
isTemplate - whether this is a template loader
Method Detail

loadCredentials

public List<Credentials> loadCredentials(List<Credentials> credentials)
Caller method invoked when credentials are needed during loading of a workflow.

Parameters:
credentials - to be initialized
Returns:
a list of new Credentials (this implementation the argument)

getUnknownKNIMEVersionLoadPolicy

public WorkflowLoadHelper.UnknownKNIMEVersionLoadPolicy getUnknownKNIMEVersionLoadPolicy(String workflowVersionString)
Callback if an unknown version string is encountered in the KNIME workflow.

Parameters:
workflowVersionString - The version string as in the workflow file (possibly null or otherwise meaningless).
Returns:
A non-null policy (this implementation return "Abort").

isTemplateFlow

public boolean isTemplateFlow()
Returns true if the workflow is a template flow, i.e. it will be disconnected from the location where it is loaded from and data will not be imported.

Returns:
If flow is a template flow (defaults to false).

getDotKNIMEFileName

public String getDotKNIMEFileName()
Get the name of the *.knime file. This is "template.knime" for templates (isTemplateFlow() and "workflow.knime" for workflows. The loader for templates in the node repository (e.g. X-Val Loop) will overwrite this.

Returns:
the name of the .knime file.


Copyright, 2003 - 2012. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.