org.knime.core.node.workflow
Class NodeMessage

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

public final class NodeMessage
extends Object

Author:
Fabian Dill, University of Konstanz

Nested Class Summary
static class NodeMessage.Type
          Enum for the possible types of messages, sorted by severity.
 
Field Summary
static NodeMessage NONE
          Convenience member to signal that there is no message.
 
Constructor Summary
NodeMessage(NodeMessage.Type messageType, String message)
          Creates a message with the type and the message.
 
Method Summary
 boolean equals(Object obj)
          
 String getMessage()
           
 NodeMessage.Type getMessageType()
           
 int hashCode()
          
static NodeMessage merge(NodeMessage m1, NodeMessage m2)
          Merges two messages.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NONE

public static final NodeMessage NONE
Convenience member to signal that there is no message.

Constructor Detail

NodeMessage

public NodeMessage(NodeMessage.Type messageType,
                   String message)
Creates a message with the type and the message.

Parameters:
messageType - the message type (error or warning)
message - the message
Method Detail

getMessage

public String getMessage()
Returns:
the message

getMessageType

public NodeMessage.Type getMessageType()
Returns:
the type

toString

public String toString()

Overrides:
toString in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

merge

public static final NodeMessage merge(NodeMessage m1,
                                      NodeMessage m2)
Merges two messages. The result message will have the most severe type (e.g. if m1 is WARNING and m2 is ERROR the output is ERROR) and a concatenated message string, delimited by a line break.

Parameters:
m1 - Message 1
m2 - Message 2
Returns:
A merged message


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.