BriefcaseTxns Class

Manages local changes to a BriefcaseConnection via Txns.

see BriefcaseConnection.txns.

see TxnManager for the backend counterpart.

Extends

Implements

  • TxnNotifications

Methods

Name Description
getRedoString(): Promise<string> Get a description of the operation that would be reinstated by calling BriefcaseTxns.reinstateTxn.  
getUndoString(allowCrossSessions?: false | true): Promise<string> Get the description of the operation that would be reversed by calling BriefcaseTxns.reverseTxns(1).  
hasPendingTxns(): Promise<boolean> Query if the briefcase has any pending Txns waiting to be pushed.  
isRedoPossible(): Promise<boolean> Determine if any reinstatable (redoable) changes exist.  
isUndoPossible(): Promise<boolean> Determine if any reversible (undoable) changes exist.  
reinstateTxn(): Promise<IModelStatus> Reinstate (redo) the most recently reversed transaction.  
reverseAll(): Promise<IModelStatus> Reverse (undo) all changes back to the beginning of the session.  
reverseSingleTxn(): Promise<IModelStatus> Reverse (undo) the most recent operation.  
reverseTxns(numOperations: number, allowCrossSessions?: false | true): Promise<IModelStatus> Reverse (undo) the most recent operation(s) to the briefcase.  

Inherited methods

Name Inherited from Description
registerImpl(): RemoveFunction NotificationHandler  
register(): RemoveFunction Static NotificationHandler Register this class as the handler for notifications on its channel.

Properties

Name Type Description
onAfterUndoRedo BeEvent<(isUndo: boolean) => void> Event raised after an undo/redo operation is performed.  
onBeforeUndoRedo BeEvent<(isUndo: boolean) => void> Event raised before an undo/redo operation is performed.  
onChangesApplied BeEvent<() => void> Event raised after a changeset has been applied to the briefcase.  
onChangesPulled BeEvent<(parentChangeSetId: string) => void> Event raised after changes are pulled and merged into the briefcase.  
onChangesPushed BeEvent<(parentChangeSetId: string) => void> Event raised after the briefcase's local changes are pushed.  
onCommit BeEvent<() => void> Event raised before a commit operation is performed.  
onCommitted BeEvent<(hasPendingTxns: boolean, time: number) => void> Event raised after a commit operation is performed.  
onElementsChanged BeEvent<(changes: Readonly<ChangedEntities>) => void> Event raised after Txn validation or changeset application to indicate the set of changed elements.  
onModelGeometryChanged BeEvent<(changes: ReadonlyArray<ModelIdAndGeometryGuid>) => void> Event raised after the geometry within one or more GeometricModelStates is modified by applying a changeset or validation of a transaction.  
onModelsChanged BeEvent<(changes: Readonly<ChangedEntities>) => void> Event raised after Txn validation or changeset application to indicate the set of changed models.  

Inherited properties

Name Type Inherited from Description
channelName Accessor ReadOnly string BriefcaseNotificationHandler  

Defined in

Last Updated: 16 April, 2021