public interface ScmPlugin extends ModulePlugin
| Modifier and Type | Interface and Description |
|---|---|
static class |
ScmPlugin.BaseVersion |
static class |
ScmPlugin.Commit |
static class |
ScmPlugin.CommitPaging |
static class |
ScmPlugin.GetListCommitFlag |
static class |
ScmPlugin.IsSyncFlag
Flags that can be passed to isSync.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
COMMIT_ATTR_EQUIVALENT_STATIC_VERSION
Commit attribute to store the equivalent static
Version associated with
a commit. |
static String |
COMMIT_ATTR_REFERENCE_VERSION_CHANGE
Commit attribute indicating that the commit changes the
Version or
ArtifactVersion of a reference in the Module. |
static String |
COMMIT_ATTR_VERSION_CHANGE
Commit attribute indicating that the commit changes the
ArtifactVersion
of the Module. |
static String |
VERSION_ATTR_PROJECT_CODE
Version attribute specifying the project code associated with a
Version. |
| Modifier and Type | Method and Description |
|---|---|
void |
checkout(Version version,
Path pathModuleWorkspace) |
Path |
checkoutSystem(Version version) |
void |
commit(Path pathModuleWorkspace,
String message,
Map<String,String> mapCommitAttr) |
void |
createTempDynamicVersion(Path pathModuleWorkspace)
Creates a temporary dynamic
Version. |
void |
createVersion(Path pathModuleWorkspace,
Version versionTarget,
Map<String,String> mapVersionAttr,
boolean indSwitch) |
ScmPlugin.BaseVersion |
getBaseVersion(Version version) |
Version |
getDefaultVersion() |
List<ScmPlugin.Commit> |
getListCommit(Version version,
ScmPlugin.CommitPaging commitPaging,
EnumSet<ScmPlugin.GetListCommitFlag> enumSetGetListCommitFlag)
Gets the list of Commits for a
Version. |
List<ScmPlugin.Commit> |
getListCommitDiverge(Version versionSrc,
Version versionDest,
ScmPlugin.CommitPaging commitPaging,
EnumSet<ScmPlugin.GetListCommitFlag> enumSetGetListCommitFlag)
Gets the list of
ScmPlugin.Commit's reachable from some Version but not
from some other Version. |
List<Version> |
getListVersionStatic() |
Map<String,String> |
getMapVersionAttr(Version version) |
String |
getScmType() |
String |
getScmUrl(Path pathModuleWorkspace) |
Version |
getVersion(Path pathModuleWorkspace) |
boolean |
isModuleExists() |
boolean |
isSync(Path pathModuleWorkspace,
EnumSet<ScmPlugin.IsSyncFlag> enumSetIsSyncFlag) |
boolean |
isTempDynamicVersion(Version versionBase)
Verifies if there is a temporary dynamic Version with the specified Version as
its base.
|
boolean |
isVersionExists(Version version) |
boolean |
merge(Path pathModuleWorkspace,
Version versionSrc,
List<ScmPlugin.Commit> listCommitExclude,
String message) |
boolean |
merge(Path pathModuleWorkspace,
Version versionSrc,
String message) |
void |
releaseTempDynamicVersion(Path pathModuleWorkspace) |
void |
switchVersion(Path pathModuleWorkspace,
Version version) |
boolean |
update(Path pathModuleWorkspace) |
getModulegetNodestatic final String COMMIT_ATTR_EQUIVALENT_STATIC_VERSION
Version associated with
a commit. Generally used on commits that revert the adjustment to the
ArtifactVersion after the new static version was created.
This is often not directly used by ScmPlugin implementations, but this is still the most logical place to declare this constant.
static final String COMMIT_ATTR_VERSION_CHANGE
ArtifactVersion
of the Module. The possible values are true and false, although if a
commit does not change the ArtifactVersion this attribute will generally not be
included.
This is often not directly used by ScmPlugin implementations, but this is still the most logical place to declare this constant.
static final String COMMIT_ATTR_REFERENCE_VERSION_CHANGE
Version or
ArtifactVersion of a reference in the Module. The possible
values are true and false, although if a commit does not change the Version
or ArtifactVersion of a reference this attribute will generally not be
included.
This is often not directly used by ScmPlugin implementations, but this is still the most logical place to declare this constant.
static final String VERSION_ATTR_PROJECT_CODE
Version attribute specifying the project code associated with a
Version.
See RootModuleVersionJobAbstractImpl#RUNTIME_PROPERTY_PROJECT_CODE from dragom-core.
boolean isModuleExists()
Version getDefaultVersion()
boolean isVersionExists(Version version)
boolean isSync(Path pathModuleWorkspace, EnumSet<ScmPlugin.IsSyncFlag> enumSetIsSyncFlag)
boolean update(Path pathModuleWorkspace)
List<ScmPlugin.Commit> getListCommit(Version version, ScmPlugin.CommitPaging commitPaging, EnumSet<ScmPlugin.GetListCommitFlag> enumSetGetListCommitFlag)
Version.
Enumeration stops at the first commit after creation of the Version.
If Version is static, the commits enumerated are those of the dynamic Version from which the static version was created, up to the first commit after the creation of that base Version.
version - Version.commitPaging - CommitPaging information passed and returned. Can be null
in which case all Commit are returned.enumSetGetListCommitFlag - EnumSet of GetListCommitFlag. Can be null.List<ScmPlugin.Commit> getListCommitDiverge(Version versionSrc, Version versionDest, ScmPlugin.CommitPaging commitPaging, EnumSet<ScmPlugin.GetListCommitFlag> enumSetGetListCommitFlag)
ScmPlugin.Commit's reachable from some Version but not
from some other Version.versionSrc - Version for which the Commit's must be returned.versionDest - Version whose Commit's must be excluded.commitPaging - ScmPlugin.CommitPaging information passed and returned. Can
be null in which case all Commit are returned.enumSetGetListCommitFlag - EnumSet of GetListCommitFlag. Can be null.ScmPlugin.BaseVersion getBaseVersion(Version version)
List<Version> getListVersionStatic()
void createVersion(Path pathModuleWorkspace, Version versionTarget, Map<String,String> mapVersionAttr, boolean indSwitch)
void createTempDynamicVersion(Path pathModuleWorkspace)
Version.
The actual Version is not provided to the caller, but the Module is
switched to that Version.
When a temporary dynamic Version is created, the Module workspace becomes in a
special state which changes the behavior of some methods. This should be
considered temporary and the caller should release it as soon as possible. At
the very least it should be released before the tool completes.
releaseTempDynamicVersion(java.nio.file.Path) and createVersion(java.nio.file.Path, org.azyva.dragom.model.Version, java.util.Map<java.lang.String, java.lang.String>, boolean) can be used for
that purpose.
While a temporary dynamic Version is created, the caller should restrict itself to:
Whether or not temporary dynamic Versions are visible in the remote repository is not specified.
Temporary dynamic Versions must be regarded as a feature related to making changes to a Module, not as the creation of a Version in itself. When the new temporary dynamic Version is created, the workspace directory need not be synchronized. In particular, there can be local changes intended to be committed in the temporary dynamic Version once created.
The concept of temporary dynamic Version provides an abstraction for the facility in some SCM such as Git to work locally on some changes before committing them as a real Version. This is useful when performing a release where adjustments are required on a {ModuleVersion} before creating the release Version, but these changes must not be visible on the main dynamic Version from which the release is performed.
For SCM which do not support such concepts, it is up to the implementation to provide an equivalent behavior using, for exemple, regular branches, or to simply not support the operations related to temporary dynamic Versions, preventing the use of these features in tools.
pathModuleWorkspace - Path to the module within the workspaace.boolean isTempDynamicVersion(Version versionBase)
This can be used by callers to be aware of the existence of a temporary dynamic
Version and adapt their behavior accordingly. However, callers that are not in
the know and do not have a hold on the path to the module in workspace will not
be able to obtain it as checkoutSystem(org.azyva.dragom.model.Version) cannot be used in that case.
versionBase - Base Version.void releaseTempDynamicVersion(Path pathModuleWorkspace)
boolean merge(Path pathModuleWorkspace, Version versionSrc, List<ScmPlugin.Commit> listCommitExclude, String message)
String getScmType()
Copyright © 2015–2016 AZYVA INC.. All rights reserved.