public class SourceControlFactory extends Object
SourceControlManagement helpers for SCM operations on module's sources.| Constructor and Description |
|---|
SourceControlFactory() |
| Modifier and Type | Method and Description |
|---|---|
SourceControlManagement |
checkoutRepository(File workingDir,
String scmURI,
String branchOrTag,
boolean initRepository)
Performs checkout of the remote SCM content into the provided working directory.
|
List<String> |
getIgnoredFiles() |
Map<String,String> |
getSourceControlExecutables()
Returns a registry of executables (paths to the SCM executables) by SCM type.
|
SourceControlManagement |
getSourceControlManagement(File workingDir)
Returns an instance of the
SourceControlManagement helper for the specified working directory. |
Set<String> |
getSupportedSourceControls()
Returns a set of supported SCM types.
|
Map<String,String> |
listBranches(String scmURI)
List all available branches on distant repository
|
Map<String,String> |
listTags(String scmURI)
List all available tags on distant repository
|
void |
setIgnoredFiles(List<String> ignoredFiles) |
void |
setSourceControlExecutables(Map<String,String> sourceControlExecutables)
Sets the executables for various SCM providers.
|
public SourceControlManagement checkoutRepository(File workingDir, String scmURI, String branchOrTag, boolean initRepository) throws IOException
workingDir - working directory to perform checkout intoscmURI - the remote SCM repository URLbranchOrTag - the name of the remote branch or tag if anySourceControlManagement helper for the checked out contentIOException - in case of communication errorspublic Map<String,String> listTags(String scmURI) throws IOException
scmURI - the remote SCM repository URI (of the trunk for SVN)IOExceptionpublic Map<String,String> listBranches(String scmURI) throws IOException
scmURI - the remote SCM repository URI (of the trunk for SVN)IOExceptionpublic Map<String,String> getSourceControlExecutables()
public SourceControlManagement getSourceControlManagement(File workingDir) throws IOException
SourceControlManagement helper for the specified working directory.workingDir - the working directory to get SCM helper forSourceControlManagement helper for the specified working directoryIOException - in case of I/O errorspublic Set<String> getSupportedSourceControls()
Copyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.