Class ClearCaseScmProviderRepository
- java.lang.Object
-
- org.apache.maven.scm.provider.ScmProviderRepository
-
- org.apache.maven.scm.provider.clearcase.repository.ClearCaseScmProviderRepository
-
public class ClearCaseScmProviderRepository extends ScmProviderRepository
Provider Repository for ClearCase (standard, LT, UCM) Url format for ClearCase and ClearCaseLT :
[view_name]:[configspec] or [view_name]|[configspec] Url format for ClearCaseUCM :
[view_name]|[configspec]|[vob_name]|[stream_name] or [view_name]:[configspec]:[vob_name]:[stream_name] [configspec] can be used in two different ways:- Path to a config spec file that is used when creating the snapshot view, e.g. "\\myserver\clearcase\configspecs\my_module.txt", or:
- A load rule that is used to automatically create a config spec, e.g. "load /MY_VOB/my/project/dir"
- Version:
- $Id: ClearCaseScmProviderRepository.java 483105 2006-12-06 15:07:54Z evenisse $
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCLEARCASE_DEFAULTDefine the default value from the clearcase-settings.xml when using ClearCasestatic java.lang.StringCLEARCASE_LTDefine the flag used in the clearcase-settings.xml when using ClearCaseLTstatic java.lang.StringCLEARCASE_UCMDefine the flag used in the clearcase-settings.xml when using ClearCaseUCMprivate java.io.FileconfigSpecThe user-specified config spec; may be null.private java.lang.StringelementNameDescribe the Element Nameprivate java.lang.StringloadDirectoryThe directory to be loaded, when auto-generating the config spec.private ScmLoggerloggerprivate SettingssettingsProvider configuration settingsprivate java.lang.StringstreamNameDescribe the stream linked to the view.private java.lang.StringviewNameprivate booleanviewNameGivenByUserprivate java.lang.StringvobNameDescribe the vob containing the stream.
-
Constructor Summary
Constructors Constructor Description ClearCaseScmProviderRepository(ScmLogger logger, java.lang.String url, Settings settings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcheckUnexpectedParameter(java.util.StringTokenizer tokenizer, int tokenNumber, int maxTokenNumber)private java.lang.StringcheckViewName(java.util.StringTokenizer tokenizer)private java.io.FilecreateConfigSpecFile(java.lang.String spec)private java.lang.StringfillDefaultProperties(java.util.StringTokenizer tokenizer)private voidfillInProperties(java.util.StringTokenizer tokenizer)private java.lang.StringfillUCMProperties(java.util.StringTokenizer tokenizer)java.io.FilegetConfigSpec()Returns the user-supplied config spec ornullin case it should be automatically generatedprivate java.lang.StringgetDefaultViewName()Default: ${hostname}-{user.name}-mavenjava.lang.StringgetElementName()private java.lang.StringgetHostName()java.lang.StringgetLoadDirectory()Returns the VOB directory to be loaded when auto-generating the config spec.java.lang.StringgetStreamName()java.lang.StringgetViewName(java.lang.String uniqueId)Returns the name of the view.java.lang.StringgetVobName()booleanhasElements()booleanisAutoConfigSpec()Returns true when the config spec has not been supplied by the user, but instead should automatically be generated by the pluginprivate voidparseUrl(java.lang.String url)-
Methods inherited from class org.apache.maven.scm.provider.ScmProviderRepository
getParent, getPassword, getRelativePath, getUser, getWorkItem, isPersistCheckout, isPushChanges, setPassword, setPersistCheckout, setPushChanges, setUser, setWorkItem
-
-
-
-
Field Detail
-
logger
private ScmLogger logger
-
viewNameGivenByUser
private boolean viewNameGivenByUser
-
viewName
private java.lang.String viewName
-
configSpec
private java.io.File configSpec
The user-specified config spec; may be null.
-
loadDirectory
private java.lang.String loadDirectory
The directory to be loaded, when auto-generating the config spec.
-
streamName
private java.lang.String streamName
Describe the stream linked to the view. Only used with ClearCaseUCM
-
vobName
private java.lang.String vobName
Describe the vob containing the stream. Only used with ClearCaseUCM
-
settings
private Settings settings
Provider configuration settings
-
elementName
private java.lang.String elementName
Describe the Element Name
-
CLEARCASE_LT
public static final java.lang.String CLEARCASE_LT
Define the flag used in the clearcase-settings.xml when using ClearCaseLT- See Also:
- Constant Field Values
-
CLEARCASE_UCM
public static final java.lang.String CLEARCASE_UCM
Define the flag used in the clearcase-settings.xml when using ClearCaseUCM- See Also:
- Constant Field Values
-
CLEARCASE_DEFAULT
public static final java.lang.String CLEARCASE_DEFAULT
Define the default value from the clearcase-settings.xml when using ClearCase
-
-
Constructor Detail
-
ClearCaseScmProviderRepository
public ClearCaseScmProviderRepository(ScmLogger logger, java.lang.String url, Settings settings) throws ScmRepositoryException
- Throws:
ScmRepositoryException
-
-
Method Detail
-
parseUrl
private void parseUrl(java.lang.String url) throws java.net.MalformedURLException, java.net.URISyntaxException, java.net.UnknownHostException- Throws:
java.net.MalformedURLExceptionjava.net.URISyntaxExceptionjava.net.UnknownHostException
-
fillInProperties
private void fillInProperties(java.util.StringTokenizer tokenizer) throws java.net.UnknownHostException, java.net.URISyntaxException, java.net.MalformedURLException- Throws:
java.net.UnknownHostExceptionjava.net.URISyntaxExceptionjava.net.MalformedURLException
-
fillDefaultProperties
private java.lang.String fillDefaultProperties(java.util.StringTokenizer tokenizer) throws java.net.UnknownHostException- Throws:
java.net.UnknownHostException
-
fillUCMProperties
private java.lang.String fillUCMProperties(java.util.StringTokenizer tokenizer) throws java.net.UnknownHostException, java.net.MalformedURLException- Throws:
java.net.UnknownHostExceptionjava.net.MalformedURLException
-
checkViewName
private java.lang.String checkViewName(java.util.StringTokenizer tokenizer) throws java.net.UnknownHostException- Throws:
java.net.UnknownHostException
-
checkUnexpectedParameter
private void checkUnexpectedParameter(java.util.StringTokenizer tokenizer, int tokenNumber, int maxTokenNumber)
-
createConfigSpecFile
private java.io.File createConfigSpecFile(java.lang.String spec) throws java.net.URISyntaxException, java.net.MalformedURLException- Throws:
java.net.URISyntaxExceptionjava.net.MalformedURLException
-
getDefaultViewName
private java.lang.String getDefaultViewName() throws java.net.UnknownHostExceptionDefault: ${hostname}-{user.name}-maven- Returns:
- the default view name
- Throws:
java.net.UnknownHostException
-
getHostName
private java.lang.String getHostName() throws java.net.UnknownHostException- Throws:
java.net.UnknownHostException
-
getViewName
public java.lang.String getViewName(java.lang.String uniqueId)
Returns the name of the view. If it is defined in the scm url, then it is returned as defined there. If it is the default name, then the uniqueId is added- Parameters:
uniqueId-- Returns:
- the name of the view
-
getConfigSpec
public java.io.File getConfigSpec()
Returns the user-supplied config spec ornullin case it should be automatically generated- Returns:
- File or
null - See Also:
isAutoConfigSpec()
-
isAutoConfigSpec
public boolean isAutoConfigSpec()
Returns true when the config spec has not been supplied by the user, but instead should automatically be generated by the plugin- Returns:
- true if auto config spec
-
getLoadDirectory
public java.lang.String getLoadDirectory()
Returns the VOB directory to be loaded when auto-generating the config spec.- Returns:
nullwhen isAutoConfigSpec() returns false; otherwise the VOB directory
-
getStreamName
public java.lang.String getStreamName()
-
getVobName
public java.lang.String getVobName()
-
getElementName
public java.lang.String getElementName()
-
hasElements
public boolean hasElements()
-
-