|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.emf.emfstore.internal.client.model.impl.ResourcePersister
public class ResourcePersister
Saves any registered resources upon certain types of triggers like, for instance, update and commit.
| Constructor Summary | |
|---|---|
ResourcePersister(ESLocalProject localProject)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addDirtyStateChangeLister(IDEObjectCollectionDirtyStateListener listener)
Add a dirty state change listener. |
void |
collectionDeleted(IdEObjectCollection collection)
If the IdEObjectCollection is deleted. |
void |
commandCompleted(org.eclipse.emf.common.command.Command command)
Called to notify listener about the successful completion of the given command. |
void |
commandFailed(org.eclipse.emf.common.command.Command command,
Exception exception)
Called to notify listener about the failure of the given command. |
void |
commandStarted(org.eclipse.emf.common.command.Command command)
Called to notify listener about the start of the given command. |
void |
commitCompleted(ESLocalProject project,
ESPrimaryVersionSpec newRevision,
org.eclipse.core.runtime.IProgressMonitor monitor)
Called after the commit is completed. |
void |
dispose()
Marker method for classes that need to perform clean-up tasks. |
boolean |
inspectChanges(ESLocalProject project,
ESChangePackage changePackage,
org.eclipse.core.runtime.IProgressMonitor monitor)
Called before the commit proceeds. |
boolean |
inspectChanges(ESLocalProject project,
List<ESChangePackage> changePackages,
org.eclipse.core.runtime.IProgressMonitor monitor)
Called to notify the observer about the changes that will be merged into the project space. |
boolean |
isDirty()
Determine if there is resources that still need to be saved. |
void |
modelElementAdded(IdEObjectCollection collection,
org.eclipse.emf.ecore.EObject modelElement)
Called when the eObject has been added to the collection. |
void |
modelElementRemoved(IdEObjectCollection collection,
org.eclipse.emf.ecore.EObject modelElement)
Called when the eObject and its siblings have been removed from
the collection. |
void |
notify(org.eclipse.emf.common.notify.Notification notification,
IdEObjectCollection collection,
org.eclipse.emf.ecore.EObject modelElement)
A notification on a model element of the collection occurred. |
void |
removeDirtyStateChangeLister(IDEObjectCollectionDirtyStateListener listener)
Remove a dirty state change listener. |
void |
saveDirtyResources(boolean force)
Save all dirty resources to disk now if auto-save is active. |
void |
updateCompleted(ESLocalProject project,
org.eclipse.core.runtime.IProgressMonitor monitor)
Called after the changes have been applied to the project and the update is completed. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResourcePersister(ESLocalProject localProject)
localProject - the ESLocalProject that will be associated with this persister| Method Detail |
|---|
public void commandStarted(org.eclipse.emf.common.command.Command command)
commandStarted in interface ESCommandObservercommand - the commandESCommandObserver.commandStarted(org.eclipse.emf.common.command.Command)public void commandCompleted(org.eclipse.emf.common.command.Command command)
commandCompleted in interface ESCommandObservercommand - the commandESCommandObserver.commandCompleted(org.eclipse.emf.common.command.Command)
public void commandFailed(org.eclipse.emf.common.command.Command command,
Exception exception)
commandFailed in interface ESCommandObservercommand - the commandexception - the exception that occurredESCommandObserver.commandFailed(org.eclipse.emf.common.command.Command,
java.lang.Exception)public void saveDirtyResources(boolean force)
force parameter
to true.
force - whether to force the saving of resourcespublic boolean isDirty()
public void addDirtyStateChangeLister(IDEObjectCollectionDirtyStateListener listener)
listener - the listenerpublic void removeDirtyStateChangeLister(IDEObjectCollectionDirtyStateListener listener)
listener - the listener
public void notify(org.eclipse.emf.common.notify.Notification notification,
IdEObjectCollection collection,
org.eclipse.emf.ecore.EObject modelElement)
Notification documentation for details on the notifications.
This method will be called even if the given notification results from an add
or remove of a model element of the project.
notify in interface IdEObjectCollectionChangeObservernotification - the notificationcollection - the collection holding the modelElementmodelElement - the model element the notification originates fromIdEObjectCollectionChangeObserver.notify(org.eclipse.emf.common.notify.Notification,
org.eclipse.emf.emfstore.internal.common.model.IdEObjectCollection, org.eclipse.emf.ecore.EObject)
public void modelElementAdded(IdEObjectCollection collection,
org.eclipse.emf.ecore.EObject modelElement)
eObject has been added to the collection.
modelElementAdded in interface IdEObjectCollectionChangeObservercollection - the IdEObjectCollection to which the eObject was addedmodelElement - the EObject that has been added to the collectionIdEObjectCollectionChangeObserver.modelElementAdded(org.eclipse.emf.emfstore.internal.common.model.IdEObjectCollection,
org.eclipse.emf.ecore.EObject)
public void modelElementRemoved(IdEObjectCollection collection,
org.eclipse.emf.ecore.EObject modelElement)
eObject and its siblings have been removed from
the collection.
NOTE: Note that you will NOT receive a separate notification for each
sibling.
modelElementRemoved in interface IdEObjectCollectionChangeObservercollection - the IdEObjectCollection to which the eObject was addedmodelElement - the EObject that has been added to the collectionIdEObjectCollectionChangeObserver.modelElementRemoved(org.eclipse.emf.emfstore.internal.common.model.IdEObjectCollection,
org.eclipse.emf.ecore.EObject)public void collectionDeleted(IdEObjectCollection collection)
IdEObjectCollection is deleted.
collectionDeleted in interface IdEObjectCollectionChangeObservercollection - the IdEObjectCollection that has been deletedIdEObjectCollectionChangeObserver.collectionDeleted(org.eclipse.emf.emfstore.internal.common.model.IdEObjectCollection)
public boolean inspectChanges(ESLocalProject project,
List<ESChangePackage> changePackages,
org.eclipse.core.runtime.IProgressMonitor monitor)
inspectChanges in interface ESUpdateObserverproject - the ESLocalProject that should be updatedchangePackages - a list of ESChangePackages containing the update changesmonitor - an IProgressMonitor instance that may be used by clients to inform
about progress
false if the observer wants to cancel the update, true otherwiseESUpdateObserver.inspectChanges(org.eclipse.emf.emfstore.client.ESLocalProject,
java.util.List, org.eclipse.core.runtime.IProgressMonitor)
public void updateCompleted(ESLocalProject project,
org.eclipse.core.runtime.IProgressMonitor monitor)
updateCompleted in interface ESUpdateObserverproject - the ESLocalProject whose update has been completedmonitor - an IProgressMonitor instance that may be used by clients to inform
about progress
public boolean inspectChanges(ESLocalProject project,
ESChangePackage changePackage,
org.eclipse.core.runtime.IProgressMonitor monitor)
inspectChanges in interface ESCommitObserverproject - the project the commit occurs onchangePackage - the ESChangePackagemonitor - an IProgressMonitor instance that may be used by clients to inform
about progress
ESCommitObserver.inspectChanges(org.eclipse.emf.emfstore.client.ESLocalProject,
org.eclipse.emf.emfstore.server.model.ESChangePackage, org.eclipse.core.runtime.IProgressMonitor)
public void commitCompleted(ESLocalProject project,
ESPrimaryVersionSpec newRevision,
org.eclipse.core.runtime.IProgressMonitor monitor)
commitCompleted in interface ESCommitObserverproject - the project on which the commit has completednewRevision - the new revision that was created by the commitmonitor - an IProgressMonitor instance that may be used by clients to inform
about progressESCommitObserver.commitCompleted(org.eclipse.emf.emfstore.client.ESLocalProject,
org.eclipse.emf.emfstore.server.model.versionspec.ESPrimaryVersionSpec,
org.eclipse.core.runtime.IProgressMonitor)public void dispose()
dispose in interface ESDisposableESDisposable.dispose()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||