com.wm.app.tn.doc
Class BizDocErrorSet

java.lang.Object
  extended by com.wm.app.tn.doc.BizDocErrorSet
All Implemented Interfaces:
com.wm.data.IData

public class BizDocErrorSet
extends java.lang.Object
implements com.wm.data.IData

This organizes a collection of activity log events attached to a BizDoc. This is a workaround -- you can't persist events on a document that itself hasn't been persisted, so we keep them here.


Constructor Summary
BizDocErrorSet()
          Create an empty set of errors
 
Method Summary
 void addError(ActivityLogEntry err)
          Add an error to this set of errors
 void addError(java.lang.String cls, java.lang.String brief, java.lang.String full, java.lang.Throwable exc)
          Build and add an error to this set of errors
static com.wm.data.IData create()
           
 com.wm.data.IDataCursor getCursor()
          For internal use only
 int getEntryCount()
           
 int getErrorCount()
           
 ActivityLogEntry[] getErrors(java.lang.String cls)
          Get a collection of errors from this set
 com.wm.data.IDataHashCursor getHashCursor()
          For internal use only
 com.wm.data.IDataIndexCursor getIndexCursor()
          For internal use only
 com.wm.data.IDataSharedCursor getSharedCursor()
          For internal use only
 com.wm.data.IDataTreeCursor getTreeCursor()
          For internal use only
 boolean hasErrors()
           
 void setErrors(java.lang.String key, ActivityLogEntry[] err_list)
          Set the specified set of errors
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BizDocErrorSet

public BizDocErrorSet()
Create an empty set of errors

Method Detail

create

public static com.wm.data.IData create()

getCursor

public com.wm.data.IDataCursor getCursor()
For internal use only

Specified by:
getCursor in interface com.wm.data.IData

getSharedCursor

public com.wm.data.IDataSharedCursor getSharedCursor()
For internal use only

Specified by:
getSharedCursor in interface com.wm.data.IData

getIndexCursor

public com.wm.data.IDataIndexCursor getIndexCursor()
For internal use only

Specified by:
getIndexCursor in interface com.wm.data.IData

getTreeCursor

public com.wm.data.IDataTreeCursor getTreeCursor()
For internal use only

Specified by:
getTreeCursor in interface com.wm.data.IData

getHashCursor

public com.wm.data.IDataHashCursor getHashCursor()
For internal use only

Specified by:
getHashCursor in interface com.wm.data.IData

setErrors

public final void setErrors(java.lang.String key,
                            ActivityLogEntry[] err_list)
Set the specified set of errors

Parameters:
key - a key by which to refer to these errors
err_list - the errors in question

addError

public void addError(ActivityLogEntry err)
Add an error to this set of errors

Parameters:
err - the error in question

addError

public void addError(java.lang.String cls,
                     java.lang.String brief,
                     java.lang.String full,
                     java.lang.Throwable exc)
Build and add an error to this set of errors

Parameters:
cls - the class of this error entry
brf_msg - a short message describing the error (non-null)
fll_msg - a longer message (may be null)
exc - the precipitating exception (may be null)

getErrors

public final ActivityLogEntry[] getErrors(java.lang.String cls)
Get a collection of errors from this set

Parameters:
cls - which errors to get
Returns:
an array of the entries with the supplied class (null if there are none)

hasErrors

public final boolean hasErrors()
Returns:
does this set have any errors in it?

getErrorCount

public final int getErrorCount()
Returns:
how many errors does this set have?

getEntryCount

public final int getEntryCount()
Returns:
how many entries does this set have? (the answer may be different than the error count because of message entries