hudson.plugins.clearcase
Class ClearCaseUcmSCM

java.lang.Object
  extended by hudson.scm.SCM
      extended by hudson.plugins.clearcase.AbstractClearCaseScm
          extended by hudson.plugins.clearcase.ClearCaseUcmSCM
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.scm.SCM>

public class ClearCaseUcmSCM
extends AbstractClearCaseScm

SCM for ClearCaseUCM. This SCM will create a UCM view from a stream and apply a list of load rules to it.


Nested Class Summary
static class ClearCaseUcmSCM.ClearCaseUcmScmDescriptor
          ClearCase UCM SCM descriptor
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class hudson.plugins.clearcase.AbstractClearCaseScm
CLEARCASE_VIEWNAME_ENVSTR, CLEARCASE_VIEWPATH_ENVSTR, CLEARCASE_VIEWTAG_ENVSTR
 
Fields inherited from class hudson.scm.SCM
PERMISSIONS, TAG
 
Constructor Summary
ClearCaseUcmSCM(java.lang.String stream, java.lang.String loadrules, java.lang.String viewTag, boolean usedynamicview, java.lang.String viewdrive, java.lang.String mkviewoptionalparam, boolean filterOutDestroySubBranchEvent, boolean useUpdate, boolean rmviewonrename)
          Deprecated. 
ClearCaseUcmSCM(java.lang.String stream, java.lang.String loadrules, java.lang.String viewTag, boolean usedynamicview, java.lang.String viewdrive, java.lang.String mkviewoptionalparam, boolean filterOutDestroySubBranchEvent, boolean useUpdate, boolean rmviewonrename, java.lang.String excludedRegions, java.lang.String multiSitePollBuffer, java.lang.String overrideBranchName, boolean createDynView, java.lang.String winDynStorageDir, java.lang.String unixDynStorageDir, boolean freezeCode, boolean recreateView, boolean allocateViewName, java.lang.String viewPath, boolean useManualLoadRules)
           
 
Method Summary
 hudson.scm.SCMRevisionState calcRevisionsFromBuild(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.TaskListener taskListener)
           
 hudson.scm.SCMRevisionState calcRevisionsFromPoll(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.TaskListener taskListener)
           
 hudson.scm.ChangeLogParser createChangeLogParser()
           
protected  CheckOutAction createCheckOutAction(hudson.util.VariableResolver<java.lang.String> variableResolver, ClearToolLauncher launcher, hudson.model.AbstractBuild<?,?> build)
          Create a CheckOutAction that will be used by the checkout method.
 ClearTool createClearTool(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher)
           
 ClearTool createClearTool(hudson.util.VariableResolver<java.lang.String> variableResolver, ClearToolLauncher launcher)
           
protected  HistoryAction createHistoryAction(hudson.util.VariableResolver<java.lang.String> variableResolver, ClearToolLauncher launcher, hudson.model.AbstractBuild<?,?> build)
          Create a HistoryAction that will be used by the pollChanges() and checkout() method.
protected  SaveChangeLogAction createSaveChangeLogAction(ClearToolLauncher launcher)
          Create a SaveChangeLog action that is used to save a change log
 java.lang.String generateNormalizedViewName(hudson.util.VariableResolver<java.lang.String> variableResolver, java.lang.String modViewName)
           Returns a normalized view name that will be used in cleartool commands.
 java.lang.String[] getBranchNames(hudson.util.VariableResolver<java.lang.String> variableResolver)
          Return string array containing the branch names that should be used when polling for changes.
 ClearCaseUcmSCM.ClearCaseUcmScmDescriptor getDescriptor()
           
 java.lang.String getOverrideBranchName()
          Return the branch type used for changelog and polling.
 java.lang.String getStream()
          Return the stream that is used to create the UCM view.
 java.lang.String getStream(hudson.util.VariableResolver<java.lang.String> variableResolver)
           
 java.lang.String[] getViewPaths(hudson.util.VariableResolver<java.lang.String> variableResolver, hudson.model.AbstractBuild build, hudson.Launcher launcher)
          Return string array containing the paths in the view that should be used when polling for changes.
 boolean isAllocateViewName()
           
protected  boolean isFirstBuild(hudson.scm.SCMRevisionState baseline)
           
 boolean isUseManualLoadRules()
           
 void setAllocateViewName(boolean allocateViewName)
           
 
Methods inherited from class hudson.plugins.clearcase.AbstractClearCaseScm
buildEnvVars, checkout, compareRemoteRevisionWith, configureFilters, createClearToolLauncher, generateNormalizedViewName, generateNormalizedViewName, getBranchNames, getBuildComputer, getBuildTime, getCurrentComputer, getExcludedRegions, getExcludedRegionsNormalized, getLoadRules, getMkviewOptionalParam, getModuleRoot, getModuleRoot, getMultiSitePollBuffer, getNormalizedUnixDynStorageDir, getNormalizedViewName, getNormalizedViewPath, getNormalizedWinDynStorageDir, getUnixDynStorageDir, getViewDrive, getViewName, getViewName, getViewPath, getViewPath, getViewPathsRegexp, getWinDynStorageDir, isCreateDynView, isFilteringOutDestroySubBranchEvent, isFreezeCode, isRecreateView, isRemoveViewOnRename, isUseDynamicView, isUseUpdate, processWorkspaceBeforeDeletion, requiresWorkspaceForPolling, setNormalizedViewName, setNormalizedViewPath, supportsPolling
 
Methods inherited from class hudson.scm.SCM
_calcRevisionsFromBuild, _for, all, createEmptyChangeLog, getApi, getBrowser, getEffectiveBrowser, getModuleRoots, getType, nullify, poll, pollChanges
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClearCaseUcmSCM

@DataBoundConstructor
public ClearCaseUcmSCM(java.lang.String stream,
                                            java.lang.String loadrules,
                                            java.lang.String viewTag,
                                            boolean usedynamicview,
                                            java.lang.String viewdrive,
                                            java.lang.String mkviewoptionalparam,
                                            boolean filterOutDestroySubBranchEvent,
                                            boolean useUpdate,
                                            boolean rmviewonrename,
                                            java.lang.String excludedRegions,
                                            java.lang.String multiSitePollBuffer,
                                            java.lang.String overrideBranchName,
                                            boolean createDynView,
                                            java.lang.String winDynStorageDir,
                                            java.lang.String unixDynStorageDir,
                                            boolean freezeCode,
                                            boolean recreateView,
                                            boolean allocateViewName,
                                            java.lang.String viewPath,
                                            boolean useManualLoadRules)

ClearCaseUcmSCM

@Deprecated
public ClearCaseUcmSCM(java.lang.String stream,
                                  java.lang.String loadrules,
                                  java.lang.String viewTag,
                                  boolean usedynamicview,
                                  java.lang.String viewdrive,
                                  java.lang.String mkviewoptionalparam,
                                  boolean filterOutDestroySubBranchEvent,
                                  boolean useUpdate,
                                  boolean rmviewonrename)
Deprecated. 

Method Detail

getStream

public java.lang.String getStream()
Return the stream that is used to create the UCM view.

Returns:
string containing the stream selector.

getStream

public java.lang.String getStream(hudson.util.VariableResolver<java.lang.String> variableResolver)

isAllocateViewName

public boolean isAllocateViewName()

setAllocateViewName

public void setAllocateViewName(boolean allocateViewName)

getOverrideBranchName

public java.lang.String getOverrideBranchName()
Return the branch type used for changelog and polling. By default this will be the empty string, and the stream will be split to get the branch.

Returns:
string containing the branch type.

getDescriptor

public ClearCaseUcmSCM.ClearCaseUcmScmDescriptor getDescriptor()
Specified by:
getDescriptor in interface hudson.model.Describable<hudson.scm.SCM>
Overrides:
getDescriptor in class hudson.scm.SCM

createChangeLogParser

public hudson.scm.ChangeLogParser createChangeLogParser()
Specified by:
createChangeLogParser in class hudson.scm.SCM

isUseManualLoadRules

public boolean isUseManualLoadRules()

getBranchNames

public java.lang.String[] getBranchNames(hudson.util.VariableResolver<java.lang.String> variableResolver)
Description copied from class: AbstractClearCaseScm
Return string array containing the branch names that should be used when polling for changes.

Specified by:
getBranchNames in class AbstractClearCaseScm
Returns:
a string array, can not be empty

calcRevisionsFromBuild

public hudson.scm.SCMRevisionState calcRevisionsFromBuild(hudson.model.AbstractBuild<?,?> build,
                                                          hudson.Launcher launcher,
                                                          hudson.model.TaskListener taskListener)
                                                   throws java.io.IOException,
                                                          java.lang.InterruptedException
Specified by:
calcRevisionsFromBuild in class hudson.scm.SCM
Throws:
java.io.IOException
java.lang.InterruptedException

calcRevisionsFromPoll

public hudson.scm.SCMRevisionState calcRevisionsFromPoll(hudson.model.AbstractBuild<?,?> build,
                                                         hudson.Launcher launcher,
                                                         hudson.model.TaskListener taskListener)
                                                  throws java.io.IOException,
                                                         java.lang.InterruptedException
Specified by:
calcRevisionsFromPoll in class AbstractClearCaseScm
Throws:
java.io.IOException
java.lang.InterruptedException

isFirstBuild

protected boolean isFirstBuild(hudson.scm.SCMRevisionState baseline)
Specified by:
isFirstBuild in class AbstractClearCaseScm

generateNormalizedViewName

public java.lang.String generateNormalizedViewName(hudson.util.VariableResolver<java.lang.String> variableResolver,
                                                   java.lang.String modViewName)
Description copied from class: AbstractClearCaseScm

Returns a normalized view name that will be used in cleartool commands.

It will replace : This way it will be easier to add new jobs without trying to find an unique view name. It will also replace invalid chars from a view name.

Overrides:
generateNormalizedViewName in class AbstractClearCaseScm
Returns:
a string containing no invalid chars.

createCheckOutAction

protected CheckOutAction createCheckOutAction(hudson.util.VariableResolver<java.lang.String> variableResolver,
                                              ClearToolLauncher launcher,
                                              hudson.model.AbstractBuild<?,?> build)
                                       throws java.io.IOException,
                                              java.lang.InterruptedException
Description copied from class: AbstractClearCaseScm
Create a CheckOutAction that will be used by the checkout method.

Specified by:
createCheckOutAction in class AbstractClearCaseScm
launcher - the command line launcher
Returns:
an action that can check out code from a ClearCase repository.
Throws:
java.io.IOException
java.lang.InterruptedException

createHistoryAction

protected HistoryAction createHistoryAction(hudson.util.VariableResolver<java.lang.String> variableResolver,
                                            ClearToolLauncher launcher,
                                            hudson.model.AbstractBuild<?,?> build)
                                     throws java.io.IOException,
                                            java.lang.InterruptedException
Description copied from class: AbstractClearCaseScm
Create a HistoryAction that will be used by the pollChanges() and checkout() method.

Specified by:
createHistoryAction in class AbstractClearCaseScm
launcher - the command line launcher
Returns:
an action that can poll if there are any changes a ClearCase repository.
Throws:
java.io.IOException
java.lang.InterruptedException

getViewPaths

public java.lang.String[] getViewPaths(hudson.util.VariableResolver<java.lang.String> variableResolver,
                                       hudson.model.AbstractBuild build,
                                       hudson.Launcher launcher)
                                throws java.io.IOException,
                                       java.lang.InterruptedException
Description copied from class: AbstractClearCaseScm
Return string array containing the paths in the view that should be used when polling for changes.

Overrides:
getViewPaths in class AbstractClearCaseScm
Parameters:
variableResolver - TODO
build - TODO
launcher - TODO
Returns:
string array that will be used by the lshistory command and for constructing the config spec, etc.
Throws:
java.io.IOException
java.lang.InterruptedException

createSaveChangeLogAction

protected SaveChangeLogAction createSaveChangeLogAction(ClearToolLauncher launcher)
Description copied from class: AbstractClearCaseScm
Create a SaveChangeLog action that is used to save a change log

Specified by:
createSaveChangeLogAction in class AbstractClearCaseScm
Parameters:
launcher - the command line launcher
Returns:
an action that can save a change log to the Hudson changlog file

createClearTool

public ClearTool createClearTool(hudson.util.VariableResolver<java.lang.String> variableResolver,
                                 ClearToolLauncher launcher)
Overrides:
createClearTool in class AbstractClearCaseScm

createClearTool

public ClearTool createClearTool(hudson.model.AbstractBuild<?,?> build,
                                 hudson.Launcher launcher)


Copyright © 2011. All Rights Reserved.