public class BlotterItem
extends java.lang.Object
BlotterItem is the data type representing a single item on the blotter. It is identified by the uniqueId passed into the constructor. It provides methods for setting its fields.
BlotterItems are passed into the BlotterChannel.sendBlotterItem(BlotterItem)
and BlotterChannel.sendBlotterItems(java.util.List)
methods on the
BlotterChannel
received on BlotterApplicationListener
callbacks.
The uniqueId replaces the '%i' in the itemNamespace passed into the BlotterConfiguration
to create the record subject for this item.
BlotterItems can be reused in different BlotterChannel
s as they are completely separate from them.
Constructor and Description |
---|
BlotterItem(java.lang.String uniqueId) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getField(java.lang.String name) |
java.util.Map<java.lang.String,java.lang.String> |
getFields() |
java.lang.String |
getHexEncodedUniqueId() |
BlotterItem |
getParent() |
java.lang.String |
getUniqueId() |
void |
setField(java.lang.String name,
java.lang.String value) |
void |
setFields(java.util.Map<java.lang.String,java.lang.String> fieldMap) |
void |
setParent(BlotterItem parentBlotterItem) |
void |
setParentItem(BlotterItem parentItem) |
RecordItem |
toRecordItem(BlotterConfiguration configuration,
java.lang.String username,
java.lang.String parameters) |
java.lang.String |
toString() |
public BlotterItem(java.lang.String uniqueId)
uniqueId
- Unique identifier for this blotter item. This id is used when removing items from the BlotterChannel
and in the callback in BlotterChannelListener
.public java.lang.String getUniqueId()
public void setParent(BlotterItem parentBlotterItem)
parentBlotterItem
- The parent of this BlotterItem. To change the parent of the BlotterItem, the item must be removed and resent.public BlotterItem getParent()
public void setParentItem(BlotterItem parentItem)
public java.lang.String getField(java.lang.String name)
name
- Key associated with a valuepublic void setField(java.lang.String name, java.lang.String value)
name
- Field name associate with a value. These must be present in the fields.conf used to configure the DataSource.value
- Value to send associated with this field namepublic java.util.Map<java.lang.String,java.lang.String> getFields()
public void setFields(java.util.Map<java.lang.String,java.lang.String> fieldMap)
fieldMap
- Map of fields and values for this BlotterItem. The field names must be present in the fields.conf used to configure the DataSource.public java.lang.String toString()
toString
in class java.lang.Object
public RecordItem toRecordItem(BlotterConfiguration configuration, java.lang.String username, java.lang.String parameters)
public java.lang.String getHexEncodedUniqueId()
Please send bug reports and comments to Caplin support