to.etc.domui.util.bugs
Class BugItem

java.lang.Object
  extended by to.etc.domui.util.bugs.BugItem

public final class BugItem
extends java.lang.Object

A single message reported through the bugs thing.

Author:
Frits Jalvingh Created on Jun 18, 2010

Constructor Summary
BugItem(java.util.List<NodeBase> msg)
          Create a bug item with a set of UI Nodes to show as the message.
BugItem(java.lang.String message)
          Create a bug item with a simple String message.
BugItem(java.lang.String message, java.lang.Throwable exception)
          Create a bug item from text and exception.
 
Method Summary
 java.lang.Throwable getException()
          Return the exception if the bug has one.
 java.util.List<NodeBase> getFormattedMsg()
          If the bug was created with a set of nodes to render this returns those nodes.
 java.lang.Exception getLocation()
          Return an exception which marks the location of the bug.
 java.lang.String getMessage()
          Return the error as a string.
 int getNumber()
          Return the #of the bug in this set.
 java.util.Date getTimestamp()
          Return the timestamp the bug occured on.
 void setNumber(int number)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BugItem

public BugItem(@Nonnull
               java.lang.String message)
Create a bug item with a simple String message.

Parameters:
message -

BugItem

public BugItem(java.util.List<NodeBase> msg)
Create a bug item with a set of UI Nodes to show as the message.

Parameters:
msg -

BugItem

public BugItem(@Nonnull
               java.lang.String message,
               @Nullable
               java.lang.Throwable exception)
Create a bug item from text and exception.

Parameters:
message -
exception -
Method Detail

getTimestamp

@Nonnull
public java.util.Date getTimestamp()
Return the timestamp the bug occured on.

Returns:

getMessage

@Nonnull
public java.lang.String getMessage()
Return the error as a string.

Returns:

getException

@Nullable
public java.lang.Throwable getException()
Return the exception if the bug has one.

Returns:

getLocation

@Nonnull
public java.lang.Exception getLocation()
Return an exception which marks the location of the bug. FIXME This should return StackTraceElements, not an exception.

Returns:

getNumber

public int getNumber()
Return the #of the bug in this set.

Returns:

setNumber

public void setNumber(int number)

getFormattedMsg

@Nullable
public java.util.List<NodeBase> getFormattedMsg()
If the bug was created with a set of nodes to render this returns those nodes.

Returns:

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object