org.knime.core.node.workflow
Class CopyNodeContainerMetaPersistor

java.lang.Object
  extended by org.knime.core.node.workflow.CopyNodeContainerMetaPersistor
All Implemented Interfaces:
NodeContainerMetaPersistor

final class CopyNodeContainerMetaPersistor
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
CopyNodeContainerMetaPersistor(NodeContainer original, boolean preserveDeletableFlag, boolean isUndoableDeleteCommand)
          Create copy persistor.
 
Method Summary
 String getCustomDescription()
          
 NodeExecutionJobManager getExecutionJobManager()
          
 NodeSettingsRO getExecutionJobSettings()
          
 WorkflowLoadHelper getLoadHelper()
          
 NodeAnnotationData getNodeAnnotationData()
          
 ReferencedFile getNodeContainerDirectory()
          File reference to the node container directory.
 int getNodeIDSuffix()
          
 NodeMessage getNodeMessage()
          
 NodeContainer.State getState()
          
 NodeUIInformation 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.
 void setNodeIDSuffix(int nodeIDSuffix)
          
 void setUIInfo(NodeUIInformation uiInfo)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CopyNodeContainerMetaPersistor

CopyNodeContainerMetaPersistor(NodeContainer original,
                               boolean preserveDeletableFlag,
                               boolean isUndoableDeleteCommand)
Create copy persistor.

Parameters:
original - To copy from
preserveDeletableFlag - Whether to keep the "is-deletable" flags in the target.
isUndoableDeleteCommand - If to keep the location of the node directories (important for undo of delete commands, see WorkflowManager.copy(boolean, WorkflowCopyContent) for details.)
Method Detail

getLoadHelper

public WorkflowLoadHelper getLoadHelper()

Specified by:
getLoadHelper in interface NodeContainerMetaPersistor
Returns:
the load helper as set during load (not part of the workflow being loaded but a setting during load).

getNodeAnnotationData

public NodeAnnotationData getNodeAnnotationData()

Specified by:
getNodeAnnotationData in interface NodeContainerMetaPersistor

getCustomDescription

public String getCustomDescription()

Specified by:
getCustomDescription in interface NodeContainerMetaPersistor

getNodeContainerDirectory

public ReferencedFile getNodeContainerDirectory()
File reference to the node container directory. Something like <workflow_space>/File Reader (#xy). This value is non-null when (i) loading from disk or (ii) if pasted into a workflow as part of an undo of a delete command. It's null if node is copied&pasted. If the value is non-null the referenced file will be removed from the list of obsolete node directories (must not clear directories as they may contain a "drop" folder).

Specified by:
getNodeContainerDirectory in interface NodeContainerMetaPersistor
Returns:
The node container dir or null

getNodeIDSuffix

public int getNodeIDSuffix()

Specified by:
getNodeIDSuffix 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

getUIInfo

public NodeUIInformation getUIInfo()

Specified by:
getUIInfo in interface NodeContainerMetaPersistor

isDeletable

public boolean isDeletable()

Specified by:
isDeletable 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 occurred that require a reset of the node.

isDirtyAfterLoad

public boolean isDirtyAfterLoad()

Specified by:
isDirtyAfterLoad in interface NodeContainerMetaPersistor

setNodeIDSuffix

public void setNodeIDSuffix(int nodeIDSuffix)

Specified by:
setNodeIDSuffix in interface NodeContainerMetaPersistor

setUIInfo

public void setUIInfo(NodeUIInformation uiInfo)

Specified by:
setUIInfo in interface NodeContainerMetaPersistor


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.