The SCMProviderHandler is responsible for dispatching SCM provider requests to the correctSCM provider factory.
Modifiers | Name | Description |
---|---|---|
private static java.lang.String |
SCM_PROVIDER_FILE_EXTENSION |
Constructor and description |
---|
SCMProviderHandler
() |
Type Params | Return Type | Name and description |
---|---|---|
|
private static java.util.List<java.lang.Class> |
findClasses(java.io.File directory, java.lang.String packageName) Return a collection of all classes in a directory and specified package by recursively searching. |
|
private static java.lang.Class |
findScmProvider(java.lang.String providerType, java.util.List<java.lang.Class> classes) Return a SCMProvider with the specified provider type. |
|
private static java.lang.String |
getPackageName(java.lang.String pathName) Utility method which converts file path name to a package name. |
|
static SCMProvider |
getScmProvider(java.lang.String scmProviderId, java.lang.Object variableBindings) Return an implementation of SCM provider for the provided unique SCM provider id. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Return a collection of all classes in a directory and specified package by recursively searching.
directory
- - directory to recursively search for class files.packageName
- - Java package name to search.Return a SCMProvider with the specified provider type. Returns null if the SCM provider is not found. This method assumes there is only one implementation of the SCM type.
providerName
- - SCM provider type.Utility method which converts file path name to a package name. e.g. pluggable/scm/helpers to pluggable.scm.helpers.
pathName
- - pathName to convert to package name.Return an implementation of SCM provider for the provided unique SCM provider id. The method uses the SCM Provider data store to infer the SCM providers configuration.
scmProviderId
- - the unique id of the SCM provider.variableBindings
- - map to inject environment variables/SCM provider library configuration