|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.ecore.change.util.ListDifferenceAnalyzer org.eclipse.emf.ecore.change.util.BasicChangeRecorder org.eclipse.emf.ecore.change.util.ChangeRecorder org.eclipse.emf.transaction.impl.TransactionChangeRecorder
public class TransactionChangeRecorder
The change recorder for a TransactionalEditingDomain
,
used by transactions to record rollback information and to detect changes that
violate the transaction protocol. It also forwards notifications to the
domain's currently active transaction.
InternalTransactionalEditingDomain.getChangeRecorder()
,
TransactionValidator
,
InternalTransaction.add(Notification)
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter |
---|
Adapter.Internal |
Field Summary |
---|
Fields inherited from class org.eclipse.emf.ecore.change.util.ChangeRecorder |
---|
loadingTargets, originalTargetObjects, resolveProxies, targetObjects |
Fields inherited from class org.eclipse.emf.ecore.change.util.BasicChangeRecorder |
---|
changeDescription, recording |
Constructor Summary | |
---|---|
TransactionChangeRecorder(InternalTransactionalEditingDomain domain,
ResourceSet rset)
Initializes me with the editing domain that I assist and the resource set in which I will record changes. |
Method Summary | |
---|---|
protected void |
appendNotification(Notification notification)
Appends the specified notification to the batch for the active transaction, to be distributed when it commits. |
protected void |
assertWriting()
Implements the read/write transaction protocol check. |
void |
beginRecording()
Starts recording changes in my editing domain. |
void |
dispose()
Extends the inherited implementation to remove myself from all adapters that I can find in my editing domain. |
ChangeDescription |
endRecording()
Extends the inherited implementation to clear the reference to the change description returned. |
InternalTransactionalEditingDomain |
getEditingDomain()
Obtains the editing domain that I assist. |
ValidateEditSupport |
getValidateEditSupport()
|
boolean |
isPaused()
Queries whether I am currently paused in my recording. |
void |
notifyChanged(Notification notification)
Detects whether the change indicated by the specified notification violates the transaction protocol and/or how it changes the load state of a resource (if it all), in addition to recording the change (if I am currently recording) and passing it along to the domain's current transaction (if any). |
void |
pause()
Temporarily pauses the recording of the current change description. |
protected void |
processObjectNotification(Notification notification)
Analyzes an object notification for violations of the transaction protocol before passing it to the active transaction (if any). |
protected void |
processResourceNotification(Notification notification)
Analyzes a resource notification for changes in its load state and violations of the transaction protocol before passing it to the active transaction (if any). |
protected void |
processResourceSetNotification(Notification notification)
Analyzes a resource set notification for changes in the load state of resources and violations of the transaction protocol before passing it to the active transaction (if any). |
void |
resume()
Resumes the paused recording of the current change description. |
void |
setTarget(Notifier target)
Overrides the superclass method to ignore the "originalTargetObjects" since we never resume recording a paused change description ignore the "targetObjects" because we will never find, upon upon consolidating changes, that any target object is unexpectedly orphaned (as we always listen to everything in the resource set, so will always get the appropriate removal notifications). |
void |
setValidateEditSupport(ValidateEditSupport validateEdit)
Sets my validate-edit support, if applicable, for the duration of a root transaction. |
Methods inherited from class org.eclipse.emf.ecore.change.util.ChangeRecorder |
---|
addAdapter, beginRecording, beginRecording, consolidateChanges, getTarget, handleFeature, handleResource, isAdapterForType, isOrphan, isResolveProxies, prepareChangeDescriptionForResume, removeAdapter, setResolveProxies, shouldRecord, unsetTarget |
Methods inherited from class org.eclipse.emf.ecore.change.util.BasicChangeRecorder |
---|
createChangeDescription, createFeatureChange, createResourceChange, eliminateEmptyChanges, finalizeChange, finalizeChange, getChangeDescription, getFeatureChange, getFeatureChanges, getResourceChange, getResourceChanges, isRecording, setChangeDescription, setRecording, shouldRecord, summarize |
Methods inherited from class org.eclipse.emf.ecore.change.util.ListDifferenceAnalyzer |
---|
analyzeLists, analyzeLists, createAddListChange, createListChange, createListChanges, createMoveListChange, createRemoveListChange |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TransactionChangeRecorder(InternalTransactionalEditingDomain domain, ResourceSet rset)
domain
- my editing domainrset
- my resource setMethod Detail |
---|
public final InternalTransactionalEditingDomain getEditingDomain()
public void beginRecording()
IllegalStateException
- if I have been disposed
public ChangeDescription endRecording()
endRecording
in class BasicChangeRecorder
IllegalStateException
- if I have been disposed
public void setTarget(Notifier target)
setTarget
in interface Adapter
setTarget
in class ChangeRecorder
public void notifyChanged(Notification notification)
notifyChanged
in interface Adapter
notifyChanged
in class ChangeRecorder
protected void processResourceSetNotification(Notification notification)
notification
- a notification from the resource setprotected void processResourceNotification(Notification notification)
notification
- a notification from a resourceprotected void processObjectNotification(Notification notification)
notification
- a notification from a model elementprotected void appendNotification(Notification notification)
notification
- the notification to append
IllegalStateException
- if the notification is not a result of
reading the resource set and no transaction is active or the
active transaction is read-onlyprotected void assertWriting()
IllegalStateException
- if no transaction is active or the
active transaction is read-onlypublic void pause()
IllegalStateException
- if I am not currently recordingBasicChangeRecorder.isRecording()
,
isPaused()
,
resume()
public boolean isPaused()
BasicChangeRecorder.isRecording()
,
pause()
,
resume()
public void resume()
IllegalStateException
- if I am not currently pausedBasicChangeRecorder.isRecording()
,
pause()
,
isPaused()
public void dispose()
dispose
in class ChangeRecorder
public ValidateEditSupport getValidateEditSupport()
public void setValidateEditSupport(ValidateEditSupport validateEdit)
validateEdit
- my validate-edit support, or null
|
Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |