Package com.caplin.datasource.blotter
Class BlotterItem
java.lang.Object
com.caplin.datasource.blotter.BlotterItem
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 BlotterChannels as they are completely separate from them.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidsetOptListSubject(String optListSubject) Sets the subject required for List objects.voidsetParent(BlotterItem parentBlotterItem) Deprecated.voidsetParentItem(BlotterItem parentItem) com.caplin.container.RecordItemtoRecordItem(BlotterConfiguration configuration, String username, String parameters) toString()
-
Constructor Details
-
BlotterItem
- Parameters:
uniqueId- Unique identifier for this blotter item. This id is used when removing items from theBlotterChanneland in the callback inBlotterChannelListener.
-
-
Method Details
-
getUniqueId
- Returns:
- uniqueId The uniqueId this BlotterItem was instantiated with.
-
setParent
Deprecated.- Parameters:
parentBlotterItem- The parent of this BlotterItem. To change the parent of the BlotterItem, the item must be removed and resent.
-
getParent
- Returns:
- uniqueId The parent of this BlotterItem.
-
setParentItem
- Parameters:
parentItem- The parent of this BlotterItem. To change the parent of the BlotterItem, the item must be removed and resent.
-
getField
- Parameters:
name- Key associated with a value- Returns:
- Value of this field
-
setField
- Parameters:
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 name
-
getFields
- Returns:
- A map containing all fields present on this BlotterItem.
-
setFields
- Parameters:
fieldMap- Map of fields and values for this BlotterItem. The field names must be present in the fields.conf used to configure the DataSource.
-
toString
-
toRecordItem
public com.caplin.container.RecordItem toRecordItem(BlotterConfiguration configuration, String username, String parameters) -
getHexEncodedUniqueId
- Returns:
- Unique identifier for this blotter item encoded in hex.
-
setOptListSubject
Sets the subject required for List objects. Not required when using containers and records.
-
setParentItem(com.caplin.datasource.blotter.BlotterItem)