public interface IProcessExtension
The Process Extension Model (PEM) is called before and after most of the Subversion operations. It is also in charge to display GUI to the user before and after SVN operations.
The PEM can be changed by another module with ICmsServices.setHook(IProcessExtension)
.
It allow other modules to redefine the Subversion behavior to some extents.
The PEM may also be enriched by contributions implementing ICmsContributor
, registered with addContributor(ICmsContributor)
.
Only one hook can be set at a time, and the dialog boxes before and after SVN operations are displayed by the predefined PEM.
It is advised to instantiate instead a ICmsContributor
and register it with addContributor(ICmsContributor)
.
Modifier and Type | Method and Description |
---|---|
void |
addContributor(ICmsContributor contrib)
Add a contributor to the process model.
|
IProcessExtensionGui |
getGui() |
ICmsContributorHolder |
getPemContributorHolder()
Get the service that manages the Process Extension Model contributors.
|
void |
onModelChangeKeeperError(ModelChangesLoadingFailedException e)
Called when the model change keeper couldn't be loaded.
|
void |
postAdd(IAddResult result)
Called after a successful add to version is finished.
|
void |
postAddFailed(IAddCommand command,
java.lang.Exception cause)
Called after the command failed.
|
void |
postCommit(ICommitResult result)
Called after a commit is definitively finished and validated.
|
void |
postCommitFailed(ICommitCommand command,
java.lang.Exception cause)
Called after a commit command failed.
|
void |
postGetLock(IGetLockResult result)
Called after a locking operation is finished.
|
void |
postGetLockFailed(IGetLockCommand command,
java.lang.Exception cause)
Called after the command failed.
|
void |
postMerge(IMergeCommand command,
IUpdateDetails result)
Called after a successful merge is finished
|
void |
postMergeFailed(IMergeCommand command,
java.lang.Exception cause)
Called after the command failed.
|
void |
postRemove(IRemoveConfig result)
Called after a successful remove from version is finished.
|
void |
postRemoveFailed(IRemoveCommand command,
java.lang.Exception cause)
Called after the command failed partially or totally.
|
void |
postRevert(IRevertResult result)
Called after a revert operation.
|
void |
postRevertFailed(IRevertCommand command,
java.lang.Exception cause)
Called after the command failed.
|
void |
postUpdate(IUpdateDetails result)
Called after a successful update is finished
|
void |
postUpdateFailed(IUpdateCommand command,
java.lang.Exception cause)
Called after the command failed.
|
boolean |
preAdd(org.modelio.vbasic.progress.IModelioProgress monitor,
IAddCommand command)
Ask for the parameters and the confirmation of the addition of the given command elements.
|
boolean |
preCommit(org.modelio.vbasic.progress.IModelioProgress monitor,
ICommitCommand command)
Called before a commit operation is executed.
|
boolean |
preGetLock(org.modelio.vbasic.progress.IModelioProgress monitor,
IGetLockCommand command)
Ask for the parameters and the confirmation of the locking of the given elements.
|
boolean |
preMerge(org.modelio.vbasic.progress.IModelioProgress monitor,
IMergeCommand command)
Ask for the parameters and the confirmation of the merge operation.
|
boolean |
preRemove(org.modelio.vbasic.progress.IModelioProgress monitor,
IRemoveCommand command)
Ask for the parameters and the confirmation of the removal of the given command elements.
|
boolean |
preRevert(org.modelio.vbasic.progress.IModelioProgress monitor,
IRevertCommand command)
Called before a revert operation is executed.
|
boolean |
preUpdate(org.modelio.vbasic.progress.IModelioProgress monitor,
IUpdateCommand command)
Ask for the parameters and the confirmation of the update of the given elements.
|
void |
removeContributor(ICmsContributor contrib)
Remove a contributor to the process model.
|
void addContributor(ICmsContributor contrib)
This is a shortcut for getPemContributorHolder()
.addContributor()
contrib
- a contributor to addvoid onModelChangeKeeperError(ModelChangesLoadingFailedException e)
e
- the errorvoid postAdd(IAddResult result)
It is not called if the command fails. In this case postAddFailed(IAddCommand, Exception)
is called instead.
result
- the result of the add to version.void postAddFailed(IAddCommand command, java.lang.Exception cause)
command
- the failed commandcause
- the failure cause. Usually a CmsException
or a RuntimeException
.void postCommit(ICommitResult result)
It is not called if the commit fails. In this case postCommitFailed(ICommitCommand, Exception)
is called instead.
result
- the detail of committed elements.void postCommitFailed(ICommitCommand command, java.lang.Exception cause)
command
- the failed commandcause
- the failure cause. Usually a CmsException
or a RuntimeException
.void postGetLock(IGetLockResult result)
result
- result of the locking.void postGetLockFailed(IGetLockCommand command, java.lang.Exception cause)
command
- the failed commandcause
- the failure cause. Usually a CmsException
or a RuntimeException
.void postRemove(IRemoveConfig result)
result
- the remove from version operation.void postRemoveFailed(IRemoveCommand command, java.lang.Exception cause)
command
- the failed commandcause
- the failure cause. Usually a CmsException
or a RuntimeException
.void postRevert(IRevertResult result)
result
- the result of the revert operation.void postRevertFailed(IRevertCommand command, java.lang.Exception cause)
command
- the failed commandcause
- the failure cause. Usually a CmsException
or a RuntimeException
.void postUpdate(IUpdateDetails result)
result
- result of the update.void postUpdateFailed(IUpdateCommand command, java.lang.Exception cause)
command
- the failed commandcause
- the failure cause. Usually a CmsException
or a RuntimeException
.boolean preAdd(org.modelio.vbasic.progress.IModelioProgress monitor, IAddCommand command)
The PEM may show a dialog box to ask the user for confirmation. The method may return false if the addition is cancelled.
monitor
- the progress monitor to use for reporting progress to the user. done()
on the given monitor. command
- the command containing the elements on which the update will be run.true
in case of confirmation, false
if the update is canceled.boolean preCommit(org.modelio.vbasic.progress.IModelioProgress monitor, ICommitCommand command)
The PEM may show a dialog box to ask the user for confirmation. The PEM may confirm or cancel the commit operation, and partly modify the commit parameters.
monitor
- the progress monitor to use for reporting progress to the user. done()
on the given monitor. command
- The commit configuration. It may be modified by calling the appropriate methods on the ICommitConfigfalse
to cancel the commit configurationboolean preGetLock(org.modelio.vbasic.progress.IModelioProgress monitor, IGetLockCommand command)
The PEM may show a dialog box to ask the user for confirmation. The method must return the checkout parameters or null if the checkout is cancelled.
monitor
- the progress monitor to use for reporting progress to the user. done()
on the given monitor. command
- the elements to checkout.true
to allow the command to run, false
to cancel it.boolean preRemove(org.modelio.vbasic.progress.IModelioProgress monitor, IRemoveCommand command)
The PEM may show a dialog box to ask the user for confirmation. The method may return false if the operation is cancelled.
monitor
- the progress monitor to use for reporting progress to the user. done()
on the given monitor. command
- the command containing the elements on which the update will be run.true
in case of confirmation, false
if the operation is canceled.boolean preRevert(org.modelio.vbasic.progress.IModelioProgress monitor, IRevertCommand command)
The PEM may show a dialog box to ask the user for confirmation. The PEM may confirm or cancel the revert operation, and partly modify the revert parameters.
monitor
- the progress monitor to use for reporting progress to the user. done()
on the given monitor. command
- The revert configuration. It may be modified by calling the appropriate methods on the
IRevertCommand
boolean preUpdate(org.modelio.vbasic.progress.IModelioProgress monitor, IUpdateCommand command)
The PEM may show a dialog box to ask the user for confirmation. The method may return false if the update is cancelled.
monitor
- the progress monitor to use for reporting progress to the user. done()
on the given monitor. command
- the command containing the elements on which the update will be run.true
in case of confirmation, false
if the update is canceled.void removeContributor(ICmsContributor contrib)
contrib
- the contributor to removevoid postMerge(IMergeCommand command, IUpdateDetails result)
command
- the merge commandresult
- result of the merge.void postMergeFailed(IMergeCommand command, java.lang.Exception cause)
command
- the failed commandcause
- the failure cause. Usually a CmsException
or a RuntimeException
.boolean preMerge(org.modelio.vbasic.progress.IModelioProgress monitor, IMergeCommand command)
The PEM may show a dialog box to ask the user for confirmation. The method may return false if the update is cancelled.
monitor
- the progress monitor to use for reporting progress to the user. done()
on the given monitor. command
- the merge command that will be run.true
in case of confirmation, false
if the merge is canceled.ICmsContributorHolder getPemContributorHolder()
IProcessExtensionGui getGui()