|
org.eclipse.emf.transaction
Interface TransactionChangeDescription
-
All Superinterfaces:
-
ChangeDescription,
EObject,
Notifier
-
All Known Implementing Classes:
-
CommandChangeDescription,
CompositeChangeDescription,
OperationChangeDescription
-
public interface TransactionChangeDescription
- extends
ChangeDescription
A specialized change description that may not be able to apply itself,
especially in the case where it includes non-EMF changes that are not
reversible.
When a transaction rolls back, the assumption is that all changes that it
performed can be undone, even any non-EMF changes that are captured in its
TransactionChangeDescription . This assumption is necessary because
the semantics of rollback guarantee that rollback cannot fail: rollback
must restore the system to the state it was in before the
transaction started. Thus, any change description (possibly nested in a
composite) that cannot be applied will be ignored and a best effort made to
apply all other changes.
However, the same should not hold for undo/redo of the changes performed
by a transaction after it has committed. If the transaction's change
description is stored on some kind of "command stack" as an encapsulation of
an undoable change, then the possibility that a change description cannot
be applied should be respected by disabling undo/redo.
Method Summary
|
boolean
|
canApply
()
Queries whether I can
apply my changes. |
boolean
|
isEmpty
()
Queries whether I have no changes. |
Methods inherited from interface org.eclipse.emf.ecore.
EObject
|
eAllContents,
eClass,
eContainer,
eContainingFeature,
eContainmentFeature,
eContents,
eCrossReferences,
eGet,
eGet,
eIsProxy,
eIsSet,
eResource,
eSet,
eUnset
|
canApply
boolean canApply()
- Queries whether I can
apply my changes.
If I can, then it is assumed that I could
reverse them also.
-
-
-
Returns:
-
true if my changes can be applied;
false otherwise (i.e., they are not invertible)
isEmpty
boolean isEmpty()
- Queries whether I have no changes.
-
-
-
Returns:
-
true if I have no changes (applying me would have
no effect on anything); false , otherwise
|
|