public interface ICommitCommand
A Process Extension Module can parameterize the commit command.
Modifier and Type | Method and Description |
---|---|
void |
addElements(java.util.Collection<MObject> elementsToAdd,
org.modelio.vbasic.progress.IModelioProgress monitor)
Add elements to be committed.
|
void |
addFilesToAdd(java.util.Collection<java.io.File> f)
Add files to add to version.
|
void |
addFilesToAdd(java.util.Collection<java.io.File> f,
java.util.Map<java.lang.String,java.lang.String> cmsProps)
Add files to add to version.
|
boolean |
callPemPreCommit(org.modelio.vbasic.progress.IModelioProgress monitor)
Calls
IProcessExtension.preCommit(IModelioProgress, ICommitCommand) on the Process Extension Model (PEM)
and unloads the model change keeper in case failure or exception. |
ICommitResult |
execute(org.modelio.vbasic.progress.IModelioProgress iMonitor)
Execute the commit the elements in subversion
and put the CMS lock on them so that they cannot be modified again.
|
ICommitDetail |
getCommitAnalysis()
Get the list of elements to commit after dependency analysis.
|
ICommitConfig |
getConfiguration() |
boolean |
getKeepLocks()
Tells whether locks must be kept or released.
|
java.lang.String |
getMessage()
Get the commit comment
|
java.util.Collection<MObject> |
getSelection()
Get the elements on which the commit was initially run.
|
boolean |
isBatchMode() |
boolean |
isRecursive()
Get whether the commit must be recursive.
|
void |
setBatch(boolean batchMode)
Set whether the command must be run in batch mode.
|
void |
setKeepLocks(boolean keepLocks)
Set whether locks must be kept or released.
|
void |
setMessage(java.lang.String comment)
Set the commit comment.
|
void |
setRecursive(boolean isRecursive,
org.modelio.vbasic.progress.IModelioProgress monitor)
Set whether the commit must be recursive.
|
void |
setUseProcessExtension(boolean val)
Set whether the the
process model extension (PEM) will be called. |
boolean |
useProcessExtension()
Tells whether the the
process model extensions will be called. |
void addElements(java.util.Collection<MObject> elementsToAdd, org.modelio.vbasic.progress.IModelioProgress monitor) throws ReverseFailedException, InvalidCmsStateException
Calling this method reruns dependency analysis and invalidates the
ICommitDetail
returned by getCommitAnalysis()
. getCommitDetails()
must then be called
again to get the new commit details.
elementsToAdd
- The elements to be added to the commit operation.monitor
- the progress monitor to use for reporting progress to the user. null
, indicating that no progress should be reported and that the operation cannot be
cancelled.ReverseFailedException
- if the code reverse fails on an element.InvalidCmsStateException
- if the model CMS state is not consistentvoid addFilesToAdd(java.util.Collection<java.io.File> f)
Add files to add to version.
f
- the files to addvoid addFilesToAdd(java.util.Collection<java.io.File> f, java.util.Map<java.lang.String,java.lang.String> cmsProps)
Add files to add to version.
f
- the files to addcmsProps
- SVN properties to put on the files. null
to apply default properties.boolean callPemPreCommit(org.modelio.vbasic.progress.IModelioProgress monitor)
IProcessExtension.preCommit(IModelioProgress, ICommitCommand)
on the Process Extension Model (PEM)
and unloads the model change keeper in case failure or exception.
Please call this method instead of accessing directly the PEM to maintain the model consistency.
monitor
- the progress monitor to use for reporting progress to the user. null
, indicating that no progress should be reported and that the operation cannot be
cancelled.ICommitResult execute(org.modelio.vbasic.progress.IModelioProgress iMonitor) throws CmsException, OutdatedElementsException
iMonitor
- the progress monitor to use for reporting progress to the user. null
, indicating that no progress should be reported and that the operation cannot be
cancelled.null
if nothing was committed.CmsException
- if the commit failed.OutdatedElementsException
- if some of the elements to commit are out of date.ICommitDetail getCommitAnalysis()
ICommitConfig getConfiguration()
boolean getKeepLocks()
true
to keep the locks, false
to release them.java.lang.String getMessage()
java.util.Collection<MObject> getSelection()
addElements(...) has no effect on this method.
boolean isBatchMode()
boolean isRecursive()
void setBatch(boolean batchMode)
batchMode
- true for batch mode. false to allow GUI.void setKeepLocks(boolean keepLocks)
keepLocks
- true
to keep the locks, false
to release them.void setMessage(java.lang.String comment)
comment
- the comment to setvoid setRecursive(boolean isRecursive, org.modelio.vbasic.progress.IModelioProgress monitor) throws ReverseFailedException, InvalidCmsStateException
Changing this value reruns dependency analysis and invalidates the
ICommitDetail
returned by getCommitAnalysis()
. getCommitDetails()
must then be called
again to get the new commit details.
isRecursive
- whether the commit must be recursive.monitor
- the progress monitor to use for reporting progress to the user. ReverseFailedException
- if the code reverse fails on an element.InvalidCmsStateException
- if the model CMS state is not consistentvoid setUseProcessExtension(boolean val)
process model extension (PEM)
will be called.
If disabling the PEM to handle it manually, call callPemPreCommit(IModelioProgress)
instead of IProcessExtension.preCommit(IModelioProgress, ICommitCommand)
to
maintain the model consistency on failures.
val
- true to use the process model extensions
will be called.boolean useProcessExtension()
process model extensions
will be called.process model extensions
will be called.