org.eclipse.emf.emfstore.client.callbacks
Interface ESCommitCallback

All Known Implementing Classes:
UICommitProjectController, UICreateBranchController

public interface ESCommitCallback

Callback interface for implementors that are interested in influencing the actual commit behavior.

Author:
ovonwesen, emueller

Field Summary
static ESCommitCallback NOCALLBACK
           Default implementation of a callback interface for commit.
 
Method Summary
 boolean baseVersionOutOfDate(ESLocalProject project, org.eclipse.core.runtime.IProgressMonitor monitor)
           Called when the project that should be updated is out of date.
 boolean inspectChanges(ESLocalProject project, ESChangePackage changePackage, ESModelElementIdToEObjectMapping idToEObjectMapping)
           Called right before the actual commit is performed.
 void noLocalChanges(ESLocalProject project)
          Called when there are no changes on the given project space.
 

Field Detail

NOCALLBACK

static final ESCommitCallback NOCALLBACK

Default implementation of a callback interface for commit.

Does not veto against updating the project in case it is out of date and returns true for inspectChanges(ESLocalProject, ESChangePackage, ESModelElementIdToEObjectMapping), such that a commit is always performed.

Method Detail

baseVersionOutOfDate

boolean baseVersionOutOfDate(ESLocalProject project,
                             org.eclipse.core.runtime.IProgressMonitor monitor)

Called when the project that should be updated is out of date.

A caller may veto against updating the project space by returning false.

Parameters:
project - the project being out of date
monitor - the currently used IProgressMonitor
Returns:
true, if the caller is willing to update the project, false otherwise

inspectChanges

boolean inspectChanges(ESLocalProject project,
                       ESChangePackage changePackage,
                       ESModelElementIdToEObjectMapping idToEObjectMapping)

Called right before the actual commit is performed.

Implementors may veto against the commit by returning false.

Parameters:
project - the project with the local pending changes
changePackage - the actual changes that are up to be inspected
idToEObjectMapping - a mapping from IDs to EObjects and vice versa.
Contains all IDs of model elements involved in the ESChangePackages as well as those contained by the project in the ESLocalProject
Returns:
true, if the commit should continue, false otherwise

noLocalChanges

void noLocalChanges(ESLocalProject project)
Called when there are no changes on the given project space.

Parameters:
project - the project that has no local pending changes


Copyright © 2015. All Rights Reserved.