public class FXCachedBlotterMessage extends Object implements SendableBlotterMessage
Instances of this class should be created using FXCachedBlotterMessageFactory.createBlotterMessage(String)
or FXCachedBlotterMessageFactory.createBlotterMessage(com.caplin.motif.fx.blotter.subject.FXBlotterSubjectInfo)
Modifier and Type | Field and Description |
---|---|
protected FXBlotter |
blotter |
protected Map<String,ContainerAction> |
containerActions |
protected boolean |
isImage |
protected String |
subject |
protected String |
username |
Constructor and Description |
---|
FXCachedBlotterMessage(FXBlotter blotter,
FXBlotterItemMessageFactory itemFactory,
String username)
Deprecated.
You should not need to create instances
of this object. Instead use
FXCachedBlotterMessageFactory.createBlotterMessage(String)
or FXCachedBlotterMessageFactory.createBlotterMessage(com.caplin.motif.fx.blotter.subject.FXBlotterSubjectInfo) |
FXCachedBlotterMessage(FXBlotter blotter,
FXBlotterItemMessageFactory itemFactory,
String username,
String subject)
Deprecated.
You should not need to create instances
of this object. Instead use
FXCachedBlotterMessageFactory.createBlotterMessage(String)
or FXCachedBlotterMessageFactory.createBlotterMessage(com.caplin.motif.fx.blotter.subject.FXBlotterSubjectInfo) |
Modifier and Type | Method and Description |
---|---|
void |
addItem(FXBlotterItemMessage message)
Use
newItemBuilder(String) or copyOf(MessageFactory) to create the FXBlotterItemMessage
to be passed into this method. |
FXCachedBlotterMessage |
copyOf(com.caplin.datasource.messaging.MessageFactory factory)
Creates a new Object with the same state as the this object.
|
FXBlotter |
getBlotter()
Returns the
FXBlotter object that this object was instantiated with. |
List<ContainerAction> |
getContainerActions()
A List of actions represented by
ContainerAction to be performed on the Container. |
List<FXBlotterItemMessage> |
getMessages()
Returns a list of
FXBlotterItemMessage which represent the Record
Messages added to this Message. |
String |
getSubject()
The subject for this Container
|
String |
getUsername()
The username for which this Container belongs to.
|
boolean |
isImage()
Returns the value of the image flag
|
<T extends FXBaseBlotterItemMessage.Builder> |
newItemBuilder(String itemId)
Returns the builder for the
FXBlotterItemMessage , which represents the Record Item. |
void |
removeItem(FXBlotterItemMessage message)
Removes the item from the Blotter.
|
void |
removeItem(String itemId)
Removes the item with the given ID from the Blotter.
|
void |
setImage(boolean isImage)
Sets the image flag for this Container message.
|
String |
toString() |
protected final FXBlotter blotter
protected final String username
protected String subject
protected boolean isImage
protected final Map<String,ContainerAction> containerActions
@Deprecated public FXCachedBlotterMessage(FXBlotter blotter, FXBlotterItemMessageFactory itemFactory, String username)
FXCachedBlotterMessageFactory.createBlotterMessage(String)
or FXCachedBlotterMessageFactory.createBlotterMessage(com.caplin.motif.fx.blotter.subject.FXBlotterSubjectInfo)
blotter
- The blotter that the message relates to.itemFactory
- The factory that creates the blotter items.username
- The username of the user that the blotter belongs to.@Deprecated public FXCachedBlotterMessage(FXBlotter blotter, FXBlotterItemMessageFactory itemFactory, String username, String subject)
FXCachedBlotterMessageFactory.createBlotterMessage(String)
or FXCachedBlotterMessageFactory.createBlotterMessage(com.caplin.motif.fx.blotter.subject.FXBlotterSubjectInfo)
blotter
- The blotter that the message relates to.itemFactory
- The factory that creates the blotter items.username
- The username of the user that the blotter belongs to.subject
- The subject of the blotter message.public List<ContainerAction> getContainerActions()
SendableBlotterMessage
ContainerAction
to be performed on the Container.getContainerActions
in interface SendableBlotterMessage
ContainerAction
to be performed on the Container.public String getSubject()
getSubject
in interface SendableBlotterMessage
public String getUsername()
SendableBlotterMessage
getUsername
in interface SendableBlotterMessage
public FXBlotter getBlotter()
FXBlotter
object that this object was instantiated with.public boolean isImage()
SendableBlotterMessage
isImage
in interface SendableBlotterMessage
public void setImage(boolean isImage)
SendableBlotterMessage
setImage
in interface SendableBlotterMessage
isImage
- True if this message should be treated as an image, or false if it represents an update.public List<FXBlotterItemMessage> getMessages()
FXBlotterItemMessage
which represent the Record
Messages added to this Message.FXBlotterItemMessage
that are part of this cached blotter messagepublic void addItem(FXBlotterItemMessage message)
Use newItemBuilder(String)
or copyOf(MessageFactory)
to create the FXBlotterItemMessage
to be passed into this method.
This method adds the specified item to the Container, at the top of the Container. If the item has already been added, then nothing will happen, it will stay in its current position.
An already added item must be first removed using removeItem(FXBlotterItemMessage)
, and then added
in order to move to the top of the container.
Note that if the item was created with a username other than the one this object was created with, then the username will be changed to match this objects username instead.
message
- The object representing the Record Item, to be added to this Blotter Message.public void removeItem(FXBlotterItemMessage message)
message
- The object representing the Record Item to be removed from the Blotter.public void removeItem(String itemId)
itemId
- The id of the Record item to be removed from the Blotter.public <T extends FXBaseBlotterItemMessage.Builder> T newItemBuilder(String itemId)
Returns the builder for the FXBlotterItemMessage
, which represents the Record Item.
Specifies type T, where T extends the FXBaseBlotterItemMessage.Builder
.
Some examples are HistoricItemMessage.Builder
, ExecutionItemMessage.Builder
,
ActivityItemMessage.Builder
, OrderItemMessage.Builder
.
itemId
- The id of the Record ItemFXBlotterItemMessage
public FXCachedBlotterMessage copyOf(com.caplin.datasource.messaging.MessageFactory factory)
factory
- To be used in creating the copyCopyright © 2015 Caplin Systems.