|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.util.AbstractXmlObject
com.waveset.object.ResultTable
com.waveset.object.ResultRecord
Structures information about the result of an individual operation performed as part of a larger bulk operation. Stored as the value of a ResultItem in a WavesetResult object.
These will be found in ResultItem objects whose type is "record"
( ResultItem.RECORD
).
Organizes "audit-trail" information in a WavesetResult.
Collects the following features of an individual operation:
The ResultItem
that contains this ResultRecord
already stores the error level of the individual operation.
// *
// * The ResultItem
that contains this ResultRecord
// * already stores the source of the result record. Note, this "source" is
// * the "target" of the overall operation.
// * @see ResultItem#getSource()
Field Summary | |
static java.lang.String |
code_id
|
static java.util.List |
DEFAULT_COLUMNS
By default, this class displays the following columns: SEQUENCE TIMESTAMP LABEL STATUS MESSAGES INPUT OUTPUT To suppress a column, call setColumns()
or removeColumn() . |
static java.lang.String |
EL_INPUT_DATA
Our XML child element name. |
static java.lang.String |
EL_OUTPUT_DATA
Our XML child element name. |
static java.lang.String |
INPUT
|
static java.lang.String |
LABEL
A label describing the target of this individual operation. |
static java.lang.String |
MESSAGES
|
static java.lang.String |
OUTPUT
|
static java.lang.String |
SEQUENCE
The sequence number of this individual operation within the larger bulk operation. |
static java.lang.String |
STATUS
|
static java.lang.String |
TIMESTAMP
The time (in milliseconds) this individual operation occurred. |
Fields inherited from class com.waveset.object.ResultTable |
ATT_NAME, EL_COLUMNS, EL_ROWS, EL_TITLE, ELEMENT, ITEM_TYPE |
Fields inherited from class com.waveset.util.AbstractXmlObject |
_trace |
Constructor Summary | |
ResultRecord()
Build an empty result record to be filled in later. |
|
ResultRecord(org.w3c.dom.Element e)
Build an error object by parsing its DOM representation. |
Method Summary | |
void |
addMessage(Message msg)
Adds a message to the current list. |
void |
addMessage(java.lang.String msg)
|
void |
addMessages(java.util.List msgs)
Adds message objects to the current list. |
void |
clear()
Reset any row values in this result record. |
java.lang.Object |
get(java.lang.String name)
|
java.lang.String |
getInputData()
|
java.lang.String |
getLabel()
|
java.util.List |
getMessages()
|
java.lang.String |
getOutputData()
|
java.lang.Integer |
getSequence()
|
ResultItem.Status |
getStatus()
|
java.lang.Long |
getTimestamp()
|
boolean |
isEmpty()
|
static void |
main(java.lang.String[] args)
|
protected void |
parseXml(org.w3c.dom.Element e)
|
void |
set(java.lang.String name,
java.lang.Object value)
Store a value associated with the specified name. |
void |
setInputData(java.lang.String s)
Store string input data to this individual operation. |
void |
setLabel(java.lang.String label)
Store a name identifying (or label describing) the target of this individual operation. |
void |
setMessages(java.util.List msgs)
Replaces the current list of message objects. |
void |
setOutputData(java.lang.String s)
Store string output data from this individual operation. |
void |
setSequence(int sequence)
Set the sequence of this individual operation within the larger bulk operation. |
void |
setStatus(ResultItem.Status status)
Stores a ResultItem.Status indicating whether
the individual operation succeeded, had errors, or failed. |
void |
setStatus(Severity severity)
Stores a ResultItem.Status indicating whether
the individual operation succeeded, had errors, or failed. |
void |
setTimestamp(long timestamp)
Set the time (in milliseconds) this individual operation occurred. |
void |
toXml(java.lang.StringBuffer b,
int indent)
Serialize into a buffer with optional indentation. |
Methods inherited from class com.waveset.object.ResultTable |
addColumn, addRow, getColumn, getColumn, getColumns, getElementName, getName, getNameMsg, getRow, getRows, removeColumn, setColumns, setName, setNameMsg, setRows |
Methods inherited from class com.waveset.util.AbstractXmlObject |
addXmlHeader, cloneObject, dump, dumpFile, getReference, println, setTrace, toIdentityString, toVerboseString, toVerboseString, toXml, toXml, toXml |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String code_id
public static final java.lang.String EL_INPUT_DATA
public static final java.lang.String EL_OUTPUT_DATA
public static final java.lang.String SEQUENCE
public static final java.lang.String TIMESTAMP
public static final java.lang.String LABEL
public static final java.lang.String STATUS
public static final java.lang.String MESSAGES
public static final java.lang.String INPUT
public static final java.lang.String OUTPUT
public static final java.util.List DEFAULT_COLUMNS
setColumns()
or removeColumn()
.
To add a column or change the order of columns,
call setColumns()
.
Constructor Detail |
public ResultRecord()
public ResultRecord(org.w3c.dom.Element e) throws WavesetException
Method Detail |
public java.lang.Integer getSequence()
public void setSequence(int sequence)
Values are expected to be unique and ordinal.
public java.lang.Long getTimestamp()
public void setTimestamp(long timestamp)
It is not important whether this is the time the operation began or the time the operation ended. It is more important that the timestamp values are consistent, so that comparison is meaningful. As much as possible, timestamp values should reflect a common time source. For example, if accounts are being created on several resources, it would be best if the timestamp were that of the server, rather than that of the resource.
public java.lang.String getLabel()
public void setLabel(java.lang.String label)
public java.lang.String getInputData()
public void setInputData(java.lang.String s)
public java.lang.String getOutputData()
public void setOutputData(java.lang.String s)
public ResultItem.Status getStatus()
ResultItem.Status
indicating whether
the individual operation succeeded, had errors, or failed.public void setStatus(ResultItem.Status status)
ResultItem.Status
indicating whether
the individual operation succeeded, had errors, or failed.
public void setStatus(Severity severity)
ResultItem.Status
indicating whether
the individual operation succeeded, had errors, or failed.
severity
- - error message severity mapped to a status.public java.util.List getMessages()
public void addMessage(Message msg)
public void setMessages(java.util.List msgs)
public void addMessages(java.util.List msgs)
public void addMessage(java.lang.String msg)
public java.lang.Object get(java.lang.String name) throws InvalidArgument
name
- - may not match any name in DEFAULT_COLUMNS
.
Use this to retrieve values for any custom (i.e., non-default) column.
InvalidArgument
public void set(java.lang.String name, java.lang.Object value) throws InvalidArgument
name
- - may not match any name in DEFAULT_COLUMNS
.
Use this to store values for any custom (i.e., non-default) column.
InvalidArgument
public void clear()
public boolean isEmpty()
public void toXml(java.lang.StringBuffer b, int indent)
AbstractXmlObject
toXml
in interface XmlObject
toXml
in class ResultTable
protected void parseXml(org.w3c.dom.Element e) throws WavesetException
parseXml
in class ResultTable
WavesetException
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |