hudson.plugins.clearcase
Class ClearCaseSCM

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

public class ClearCaseSCM
extends AbstractClearCaseScm

Base ClearCase SCM. This SCM is for base ClearCase repositories.

Author:
Erik Ramfelt

Nested Class Summary
static class ClearCaseSCM.ClearCaseScmDescriptor
          ClearCase SCM descriptor
 
Field Summary
 
Fields inherited from class hudson.plugins.clearcase.AbstractClearCaseScm
CLEARCASE_VIEWNAME_ENVSTR, CLEARCASE_VIEWPATH_ENVSTR, normalizedViewName
 
Fields inherited from class hudson.scm.SCM
PERMISSIONS, TAG
 
Constructor Summary
ClearCaseSCM(java.lang.String branch, java.lang.String configspec, java.lang.String viewname, boolean useupdate, java.lang.String vobpaths, boolean usedynamicview, java.lang.String viewdrive, java.lang.String mkviewoptionalparam, boolean filterOutDestroySubBranchEvent)
           
 
Method Summary
 void buildEnvVars(hudson.model.AbstractBuild build, java.util.Map<java.lang.String,java.lang.String> env)
          Adds the env variable for the ClearCase SCMs.
protected  BaseChangeLogAction createChangeLogAction(ClearToolLauncher launcher, hudson.model.AbstractBuild<?,?> build, int logMergeTimeWindow, hudson.Launcher baseLauncher)
           
protected  BaseChangeLogAction createChangeLogAction(ClearToolLauncher launcher, hudson.model.AbstractBuild<?,?> build, hudson.Launcher baseLauncher)
          Create a ChangeLogAction that will be used to get the change logs for a CC repository
 hudson.scm.ChangeLogParser createChangeLogParser()
           
protected  CheckOutAction createCheckOutAction(ClearToolLauncher launcher)
          Create a CheckOutAction that will be used by the checkout method.
protected  ClearTool createClearTool(ClearToolLauncher launcher)
           
protected  PollAction createPollAction(ClearToolLauncher launcher)
          Create a PollAction that will be used by the pollChanges() method.
protected  SaveChangeLogAction createSaveChangeLogAction(ClearToolLauncher launcher)
          Create a SaveChangeLog action that is used to save a change log
 java.lang.String getBranch()
           
 java.lang.String[] getBranchNames()
          Split the branch names into a string array.
 java.lang.String getConfigSpec()
           
 ClearCaseSCM.ClearCaseScmDescriptor getDescriptor()
           
 java.lang.String getViewDrive()
           
 java.lang.String[] getViewPaths(hudson.FilePath viewPath)
          Return the view paths that will be used when getting changes for a view.
 java.lang.Object getVobPaths()
           
 boolean isUseDynamicView()
           
 boolean isUseUpdate()
           
 
Methods inherited from class hudson.plugins.clearcase.AbstractClearCaseScm
checkout, createAndRegisterListener, createClearToolLauncher, getMkviewOptionalParam, getModuleRoot, getNormalizedViewName, getViewName, isFilteringOutDestroySubBranchEvent, pollChanges, requiresWorkspaceForPolling, supportsPolling
 
Methods inherited from class hudson.scm.SCM
createEmptyChangeLog, getBrowser, getEffectiveBrowser, getModuleRoots, nullify, processWorkspaceBeforeDeletion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClearCaseSCM

@DataBoundConstructor
public ClearCaseSCM(java.lang.String branch,
                                         java.lang.String configspec,
                                         java.lang.String viewname,
                                         boolean useupdate,
                                         java.lang.String vobpaths,
                                         boolean usedynamicview,
                                         java.lang.String viewdrive,
                                         java.lang.String mkviewoptionalparam,
                                         boolean filterOutDestroySubBranchEvent)
Method Detail

getBranch

public java.lang.String getBranch()

getConfigSpec

public java.lang.String getConfigSpec()

isUseUpdate

public boolean isUseUpdate()

isUseDynamicView

public boolean isUseDynamicView()

getViewDrive

public java.lang.String getViewDrive()

getVobPaths

public java.lang.Object getVobPaths()

getViewPaths

public java.lang.String[] getViewPaths(hudson.FilePath viewPath)
                                throws java.io.IOException,
                                       java.lang.InterruptedException
Return the view paths that will be used when getting changes for a view. If the user configured vob paths field is empty, then the folder within the view will be used as view paths.

Specified by:
getViewPaths in class AbstractClearCaseScm
Parameters:
viewPath - the file path for the view
Returns:
the view paths that will be used when getting changes for a view.
Throws:
java.io.IOException
java.lang.InterruptedException

getDescriptor

public ClearCaseSCM.ClearCaseScmDescriptor 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

buildEnvVars

public void buildEnvVars(hudson.model.AbstractBuild build,
                         java.util.Map<java.lang.String,java.lang.String> env)
Description copied from class: AbstractClearCaseScm
Adds the env variable for the ClearCase SCMs. CLEARCASE_VIEWNAME - The name of the clearcase view. CLEARCASE_VIEWPATH - The absolute path to the clearcase view.

Overrides:
buildEnvVars in class AbstractClearCaseScm

createCheckOutAction

protected CheckOutAction createCheckOutAction(ClearToolLauncher launcher)
Description copied from class: AbstractClearCaseScm
Create a CheckOutAction that will be used by the checkout method.

Specified by:
createCheckOutAction in class AbstractClearCaseScm
Parameters:
launcher - the command line launcher
Returns:
an action that can check out code from a ClearCase repository.

createPollAction

protected PollAction createPollAction(ClearToolLauncher launcher)
Description copied from class: AbstractClearCaseScm
Create a PollAction that will be used by the pollChanges() method.

Specified by:
createPollAction in class AbstractClearCaseScm
Parameters:
launcher - the command line launcher
Returns:
an action that can poll if there are any changes a ClearCase repository.

createChangeLogAction

protected BaseChangeLogAction createChangeLogAction(ClearToolLauncher launcher,
                                                    hudson.model.AbstractBuild<?,?> build,
                                                    hudson.Launcher baseLauncher)
Description copied from class: AbstractClearCaseScm
Create a ChangeLogAction that will be used to get the change logs for a CC repository

Specified by:
createChangeLogAction in class AbstractClearCaseScm
Parameters:
launcher - the command line launcher
build - the current build
Returns:
an action that returns the change logs for a CC repository

createChangeLogAction

protected BaseChangeLogAction createChangeLogAction(ClearToolLauncher launcher,
                                                    hudson.model.AbstractBuild<?,?> build,
                                                    int logMergeTimeWindow,
                                                    hudson.Launcher baseLauncher)

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

getBranchNames

public java.lang.String[] getBranchNames()
Split the branch names into a string array.

Specified by:
getBranchNames in class AbstractClearCaseScm
Parameters:
branchString - string containing none or several branches
Returns:
a string array (never empty)

createClearTool

protected ClearTool createClearTool(ClearToolLauncher launcher)
Overrides:
createClearTool in class AbstractClearCaseScm


Copyright © 2008. All Rights Reserved.