public interface SourceControlProfile extends BrowseableProfile
SourceControlProfile is non-versioned.
VersionControlProfile| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PLUGIN_NAME
The message key to localize the plugin name.
|
TYPE_FILE, TYPE_PROJECT, TYPE_RETRIEVE| Modifier and Type | Method and Description |
|---|---|
void |
addFile(java.lang.String filePath,
java.io.File fileToAdd,
java.lang.String comment)
Adds a single file to the source control system.
|
void |
addFiles(java.lang.String filePath,
java.io.File dirToAdd,
java.lang.String comment,
boolean recursive)
Adds multiple files to the source control system.
|
void |
cleanupWorkingDirectory(java.lang.String path,
java.io.File workdir)
Some SourceControl Systems don't remove a file in the WorkingDirectory if it's removed on the server.
|
void |
createWorkingDirectory(java.lang.String path,
java.io.File workdir)
Creates the local working directory and retrieves all files from the source control system within the specified path.
Note: Some source control systems store information in the locally checked out projects. |
void |
get(java.lang.String filePath,
java.lang.String targetPath,
boolean recursive)
Gets the latest version of a file or files in a path.
|
java.lang.String |
getLastName(java.lang.String scpPath)
Retrieves the last element of a source control system path.
|
java.lang.String |
getName()
The name of the SourceControl system.
|
java.lang.String |
getParent(java.lang.String scpPath)
Retrieves the parent directory of the given path name from the source control system.
|
PropertyProvider |
getPropertyProvider() |
SourceCodeControlInfo |
getSourceCodeControlInfo() |
StringResolver |
getStringResolver()
To provide a localized profile name, the property
PLUGIN_NAME is resolved from the returned resolver. |
void |
removeWorkingDirectory(java.io.File workdir)
Removes the locally checked out project.
|
void |
updateRepository(java.lang.String pathToAdd,
java.io.File sessionDir,
boolean recursive,
java.lang.String comment)
Update the files locally stored in sessionDir to the source control profile.
|
default void |
validateProfileSettings()
Per default the system tries to list the content of the root folder with the provided settings.
|
addDirectory, buildPath, getRootPath, getSeparator, isValidProjectName, liststatic final java.lang.String PLUGIN_NAME
void get(java.lang.String filePath,
java.lang.String targetPath,
boolean recursive)
throws SourceControlException
filePath - file or path to get from the source control profiletargetPath - local path where the files will be storedrecursive - retrieve only the top-level folder files (false), or retrieve files recursively (true)SourceControlExceptioncreateWorkingDirectory(String, java.io.File)void addFile(java.lang.String filePath,
java.io.File fileToAdd,
java.lang.String comment)
throws SourceControlException
filePath - the path (project) in the source control system to which the file should be addedfileToAdd - the file to add to the source control system.comment - a comment. A comment is only stored if the target source control system supports comments.
Some source control systems require a comment, so it is mandatory to always specify a comment.SourceControlExceptionvoid addFiles(java.lang.String filePath,
java.io.File dirToAdd,
java.lang.String comment,
boolean recursive)
throws SourceControlException
filePath - the path (project) in the source control system to which the files should be addeddirToAdd - the local directory from which the files should be added to the source control system.
All files of this directory will be added.comment - a comment. A comment is only stored if the target source control system supports comments.
Some source control systems require a comment, so it is mandatory to always specify a comment.recursive - add only the top-level folder files (false), or add files recursively (true)SourceControlExceptionjava.lang.String getParent(java.lang.String scpPath)
scpPath - the path (project) in the source control systemscpPath) in the source control systemjava.lang.String getLastName(java.lang.String scpPath)
Example:
getLastName("http://SVNServer/svn/regressions/trunk/doFoo/Performance/doFoo_Benchmark/doFoo_Benchmark_FileGet.csv");
Returns: doFoo_Benchmark_FileGet.csv
scpPath - the path (project) in the source control system for which the last element shall be retrievedvoid createWorkingDirectory(java.lang.String path,
java.io.File workdir)
throws SourceControlException
path - the path (project) in the source control system from which the files should be retrievedworkdir - the local working directory to which the retrieved files should be storedSourceControlExceptionremoveWorkingDirectory(java.io.File)void removeWorkingDirectory(java.io.File workdir)
throws SourceControlException
workdir - the local working directory to deleteSourceControlExceptioncreateWorkingDirectory(String, java.io.File)PropertyProvider getPropertyProvider()
StringResolver getStringResolver()
PLUGIN_NAME is resolved from the returned resolver.getPropertyProvider()java.lang.String getName()
void updateRepository(java.lang.String pathToAdd,
java.io.File sessionDir,
boolean recursive,
java.lang.String comment)
throws SourceControlException
addFiles is, that some files in sessionDir already exist
in the source control system.pathToAdd - sessionDir - recursive - comment - SourceControlExceptionSourceCodeControlInfo getSourceCodeControlInfo()
void cleanupWorkingDirectory(java.lang.String path,
java.io.File workdir)
throws SourceControlException
path - workdir - SourceControlExceptiondefault void validateProfileSettings()
throws SourceControlException
SourceControlException - if the provided settings are not correctCopyright © Micro Focus 2004-2019. All rights reserved.