org.knime.core.node.workflow
Class NodeContainerMetaPersistorVersion1xx

java.lang.Object
  extended by org.knime.core.node.workflow.NodeContainerMetaPersistorVersion1xx
All Implemented Interfaces:
NodeContainerMetaPersistor
Direct Known Subclasses:
NodeContainerMetaPersistorVersion200

 class NodeContainerMetaPersistorVersion1xx
extends Object
implements NodeContainerMetaPersistor

Author:
wiswedel, University of Konstanz

Field Summary
 
Fields inherited from interface org.knime.core.node.workflow.NodeContainerMetaPersistor
KEY_CUSTOM_DESCRIPTION, KEY_CUSTOM_NAME
 
Constructor Summary
NodeContainerMetaPersistorVersion1xx(ReferencedFile baseDir)
           
 
Method Summary
 String getCustomDescription()
          
 String getCustomName()
          
 NodeExecutionJobManager getExecutionJobManager()
          
 NodeSettingsRO getExecutionJobSettings()
          
protected  NodeLogger getLogger()
           
 ReferencedFile getNodeContainerDirectory()
          
 int getNodeIDSuffix()
          
 NodeMessage getNodeMessage()
          
 NodeContainer.State getState()
          
 UIInformation getUIInfo()
          
 boolean isDeletable()
          
 boolean isDirtyAfterLoad()
          
 boolean load(NodeSettingsRO settings, NodeSettingsRO parentSettings, WorkflowPersistor.LoadResult loadResult)
          Load content, gets both the current settings (first argument) and the "parent settings", which are only used in 1.3.x flows and will be ignored in any version after that.
protected  String loadCustomDescription(NodeSettingsRO settings, NodeSettingsRO parentSettings)
          Read the custom description.
protected  String loadCustomName(NodeSettingsRO settings, NodeSettingsRO parentSettings)
          Read the custom name.
protected  boolean loadIsDeletable(NodeSettingsRO settings)
           
protected  ReferencedFile loadJobManagerInternalsDirectory(ReferencedFile parentDir, NodeSettingsRO settings)
          Load the directory name that is used to persist internals of the associated job manager.
protected  NodeExecutionJobManager loadNodeExecutionJobManager(NodeSettingsRO settings)
          Load the execution manager responsible for this node.
protected  NodeSettingsRO loadNodeExecutionJobSettings(NodeSettingsRO settings)
          Load the settings representing the pending execution of this node.
protected  NodeMessage loadNodeMessage(NodeSettingsRO settings)
           
protected  NodeContainer.State loadState(NodeSettingsRO settings, NodeSettingsRO parentSettings)
          Load the state of the node.
protected  void setDirtyAfterLoad()
          Mark node as dirty.
 void setNodeIDSuffix(int nodeIDSuffix)
          
 void setUIInfo(UIInformation uiInfo)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeContainerMetaPersistorVersion1xx

NodeContainerMetaPersistorVersion1xx(ReferencedFile baseDir)
Parameters:
baseDir - The node container directory
Method Detail

getLogger

protected NodeLogger getLogger()

getCustomDescription

public String getCustomDescription()

Specified by:
getCustomDescription in interface NodeContainerMetaPersistor

getCustomName

public String getCustomName()

Specified by:
getCustomName in interface NodeContainerMetaPersistor

getUIInfo

public UIInformation getUIInfo()

Specified by:
getUIInfo in interface NodeContainerMetaPersistor

setUIInfo

public void setUIInfo(UIInformation uiInfo)

Specified by:
setUIInfo in interface NodeContainerMetaPersistor

getNodeIDSuffix

public int getNodeIDSuffix()

Specified by:
getNodeIDSuffix in interface NodeContainerMetaPersistor

setNodeIDSuffix

public void setNodeIDSuffix(int nodeIDSuffix)

Specified by:
setNodeIDSuffix in interface NodeContainerMetaPersistor

getExecutionJobManager

public NodeExecutionJobManager getExecutionJobManager()

Specified by:
getExecutionJobManager in interface NodeContainerMetaPersistor

getExecutionJobSettings

public NodeSettingsRO getExecutionJobSettings()

Specified by:
getExecutionJobSettings in interface NodeContainerMetaPersistor

getState

public NodeContainer.State getState()

Specified by:
getState in interface NodeContainerMetaPersistor

getNodeMessage

public NodeMessage getNodeMessage()

Specified by:
getNodeMessage in interface NodeContainerMetaPersistor

isDeletable

public boolean isDeletable()

Specified by:
isDeletable in interface NodeContainerMetaPersistor

isDirtyAfterLoad

public boolean isDirtyAfterLoad()

Specified by:
isDirtyAfterLoad in interface NodeContainerMetaPersistor

setDirtyAfterLoad

protected void setDirtyAfterLoad()
Mark node as dirty.


getNodeContainerDirectory

public ReferencedFile getNodeContainerDirectory()

Specified by:
getNodeContainerDirectory in interface NodeContainerMetaPersistor

load

public boolean load(NodeSettingsRO settings,
                    NodeSettingsRO parentSettings,
                    WorkflowPersistor.LoadResult loadResult)
Load content, gets both the current settings (first argument) and the "parent settings", which are only used in 1.3.x flows and will be ignored in any version after that.

Specified by:
load in interface NodeContainerMetaPersistor
Parameters:
settings - The settings object that is usually read from
parentSettings - The parent settings, mostly ignored.
loadResult - Where to add errors and warnings to.
Returns:
Whether errors occured that require a reset of the node.

loadCustomName

protected String loadCustomName(NodeSettingsRO settings,
                                NodeSettingsRO parentSettings)
                         throws InvalidSettingsException
Read the custom name.

Parameters:
settings - The settings associated with the node (used in 2.0+)
parentSettings - The parent settings (workflow.knime, used in 1.3x)
Returns:
The custom name or null
Throws:
InvalidSettingsException - In case of errors reading the argument

loadCustomDescription

protected String loadCustomDescription(NodeSettingsRO settings,
                                       NodeSettingsRO parentSettings)
                                throws InvalidSettingsException
Read the custom description.

Parameters:
settings - The settings associated with the node (used in 2.0+)
parentSettings - The parent settings (workflow.knime, used in 1.3x)
Returns:
The custom name or null
Throws:
InvalidSettingsException - In case of errors reading the argument

loadNodeExecutionJobManager

protected NodeExecutionJobManager loadNodeExecutionJobManager(NodeSettingsRO settings)
                                                       throws InvalidSettingsException
Load the execution manager responsible for this node. This methods is overwritten in the persistor reading the 2.0+ workflows.

Parameters:
settings - To load from.
Returns:
null (only this implementation).
Throws:
InvalidSettingsException - If that fails.

loadNodeExecutionJobSettings

protected NodeSettingsRO loadNodeExecutionJobSettings(NodeSettingsRO settings)
                                               throws InvalidSettingsException
Load the settings representing the pending execution of this node. Returns null if this node was not saved as being executing.

Parameters:
settings - To load from.
Returns:
The execution job.
Throws:
InvalidSettingsException - If that fails.

loadJobManagerInternalsDirectory

protected ReferencedFile loadJobManagerInternalsDirectory(ReferencedFile parentDir,
                                                          NodeSettingsRO settings)
                                                   throws InvalidSettingsException
Load the directory name that is used to persist internals of the associated job manager. The default (local) job manager typically does not save any internals, but others (e.g. the grid executor) save the logs of their remote jobs.

Parameters:
parentDir - The parent directory (the node dir).
settings - To load from.
Returns:
The file location containing the internals or null.
Throws:
InvalidSettingsException - If errors occur.

loadState

protected NodeContainer.State loadState(NodeSettingsRO settings,
                                        NodeSettingsRO parentSettings)
                                 throws InvalidSettingsException
Load the state of the node.

Parameters:
settings - The settings associated with the node (used in 2.0+)
parentSettings - The parent settings (workflow.knime, used in 1.3x)
Returns:
The state
Throws:
InvalidSettingsException - In case of errors reading the argument

loadNodeMessage

protected NodeMessage loadNodeMessage(NodeSettingsRO settings)
                               throws InvalidSettingsException
Throws:
InvalidSettingsException

loadIsDeletable

protected boolean loadIsDeletable(NodeSettingsRO settings)


Copyright, 2003 - 2010. 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.