public class TransactionDescriptor
extends java.lang.Object
TransactionDescriptor
is a client-provided description
used when committing a SourceTransaction
. It provides a
human-readable (and translated) edit name that describes the transaction.
This edit name will be used for "Edit->Undo Clients can optionally also provide a client-opaque object that provides additional details as to contents or purpose of the transaction. Because this descriptor will be held in the undo stack for the associated document(s), and may be pinned in memory for a long time, clients should avoid specifying large objects for the client-specified object.
This client specified object may be made available in the upcoming Java source model notification API to provide additional details to clients as to what constitutes a source model change (when available).
Constructor and Description |
---|
TransactionDescriptor(java.lang.String editName)
Construct a new
TransactionDescriptor with the edit name,
but no client object. |
TransactionDescriptor(java.lang.String editName,
java.lang.Object clientObject)
Construct a new
TransactionDescriptor with the edit name
and client specified object. |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getClientObject()
Fetch the client-specified object.
|
java.lang.String |
getEditName()
Fetch the human-readable edit name for this transaction.
|
public TransactionDescriptor(java.lang.String editName)
TransactionDescriptor
with the edit name,
but no client object.editName
- the human-readable edit namepublic TransactionDescriptor(java.lang.String editName, java.lang.Object clientObject)
TransactionDescriptor
with the edit name
and client specified object.editName
- the human-readable edit nameclientObject
- the client-specified objectpublic java.lang.String getEditName()
public java.lang.Object getClientObject()