net.praqma.hudson.scm
Class CCUCMScm

java.lang.Object
  extended by hudson.scm.SCM
      extended by net.praqma.hudson.scm.CCUCMScm
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.scm.SCM>

public class CCUCMScm
extends hudson.scm.SCM

is responsible for everything regarding Hudsons connection to ClearCase pre-build. This class defines all the files required by the user. The information can be entered on the config page.


Nested Class Summary
static class CCUCMScm.CCUCMScmDescriptor
          This class is used to describe the plugin to Hudson
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
static String HLINK_DEFAULT
           
 
Fields inherited from class hudson.scm.SCM
PERMISSIONS, TAG
 
Constructor Summary
CCUCMScm()
          Default constructor, mainly used for unit tests.
CCUCMScm(String component, String loadModule, boolean newest, PollingMode mode, String stream, String treatUnstable, String nameTemplate, boolean forceDeliver, boolean recommend, boolean makeTag, boolean setDescription, String buildProject, boolean removeViewPrivateFiles, boolean trimmedChangeSet, boolean discard)
           
 
Method Summary
 void buildEnvVars(hudson.model.AbstractBuild<?,?> build, Map<String,String> env)
           
 hudson.scm.SCMRevisionState calcRevisionsFromBuild(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.TaskListener listener)
           
 boolean checkout(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.FilePath workspace, hudson.model.BuildListener listener, File changelogFile)
           
 hudson.scm.PollingResult compareRemoteRevisionWith(hudson.model.AbstractProject<?,?> project, hudson.Launcher launcher, hudson.FilePath workspace, hudson.model.TaskListener listener, hudson.scm.SCMRevisionState rstate)
          This method polls the version control system to see if there are any changes in the source code.
 hudson.scm.ChangeLogParser createChangeLogParser()
           
 void ensurePublisher(hudson.model.AbstractBuild build)
           
 void generateChangeLog(hudson.model.AbstractBuild<?,?> build, CCUCMBuildAction state, hudson.model.BuildListener listener, File changelogFile, net.praqma.clearcase.ucm.view.SnapshotView snapshotView)
          Generate the change log for poll/sibling mode
 String getBaseline()
           
 String getBaselineValue(hudson.model.AbstractBuild<?,?> build)
           
 String getBuildProject()
           
 String getComponent()
           
 boolean getForceDeliver()
           
 String getHLinkFeedFrom()
           
static CCUCMBuildAction getLastAction(hudson.model.AbstractProject<?,?> project)
          Returns the last CCUCMBuildAction, that has a valid Baseline
 String getLevelToPoll()
           
 String getLoadModule()
           
 PollingMode getMode()
           
 boolean getMultisitePolling()
           
 String getNameTemplate()
           
 String getPolling()
           
 boolean getSlavePolling()
           
 String getStream()
           
 net.praqma.clearcase.ucm.entities.Stream getStreamObject()
           
 String getTreatUnstable()
           
 net.praqma.clearcase.ucm.view.SnapshotView initializeDeliverView(hudson.model.AbstractBuild<?,?> build, CCUCMBuildAction state, hudson.model.BuildListener listener)
          Initialize the deliver view
 boolean isCreateBaseline()
           
 boolean isDiscard()
           
 boolean isMakeTag()
           
 boolean isRecommend()
           
 boolean isRemoveViewPrivateFiles()
           
 boolean isSetDescription()
           
 boolean isTrimmedChangeSet()
           
 void postCheckout(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.FilePath workspace, hudson.model.BuildListener listener)
           
 void printBaselines(List<net.praqma.clearcase.ucm.entities.Baseline> baselines, PrintStream ps)
           
 Object readResolve()
           
 void resolveBaselineInput(hudson.model.AbstractBuild<?,?> build, String baselineInput, CCUCMBuildAction action, hudson.model.BuildListener listener)
          Resolve the Baseline parameter and store the information in the Action
 void setAddPostBuild(boolean addPostBuild)
           
 void setDiscard(boolean discard)
           
 void setMode(PollingMode mode)
           
 void setMultisitePolling(boolean mp)
           
 
Methods inherited from class hudson.scm.SCM
_calcRevisionsFromBuild, _for, all, createEmptyChangeLog, getApi, getBrowser, getDescriptor, getEffectiveBrowser, getModuleRoot, getModuleRoot, getModuleRoots, getModuleRoots, getType, nullify, poll, pollChanges, processWorkspaceBeforeDeletion, requiresWorkspaceForPolling, supportsPolling
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HLINK_DEFAULT

public static final String HLINK_DEFAULT
See Also:
Constant Field Values
Constructor Detail

CCUCMScm

public CCUCMScm()
Default constructor, mainly used for unit tests.


CCUCMScm

@DataBoundConstructor
public CCUCMScm(String component,
                                     String loadModule,
                                     boolean newest,
                                     PollingMode mode,
                                     String stream,
                                     String treatUnstable,
                                     String nameTemplate,
                                     boolean forceDeliver,
                                     boolean recommend,
                                     boolean makeTag,
                                     boolean setDescription,
                                     String buildProject,
                                     boolean removeViewPrivateFiles,
                                     boolean trimmedChangeSet,
                                     boolean discard)
Method Detail

readResolve

public Object readResolve()

checkout

public boolean checkout(hudson.model.AbstractBuild<?,?> build,
                        hudson.Launcher launcher,
                        hudson.FilePath workspace,
                        hudson.model.BuildListener listener,
                        File changelogFile)
                 throws IOException,
                        InterruptedException
Specified by:
checkout in class hudson.scm.SCM
Throws:
IOException
InterruptedException

postCheckout

public void postCheckout(hudson.model.AbstractBuild<?,?> build,
                         hudson.Launcher launcher,
                         hudson.FilePath workspace,
                         hudson.model.BuildListener listener)
                  throws IOException,
                         InterruptedException
Overrides:
postCheckout in class hudson.scm.SCM
Throws:
IOException
InterruptedException

ensurePublisher

public void ensurePublisher(hudson.model.AbstractBuild build)
                     throws IOException
Throws:
IOException

setAddPostBuild

public void setAddPostBuild(boolean addPostBuild)

resolveBaselineInput

public void resolveBaselineInput(hudson.model.AbstractBuild<?,?> build,
                                 String baselineInput,
                                 CCUCMBuildAction action,
                                 hudson.model.BuildListener listener)
                          throws net.praqma.clearcase.exceptions.UnableToInitializeEntityException,
                                 IOException,
                                 InterruptedException
Resolve the Baseline parameter and store the information in the Action

Parameters:
build -
baselineInput -
action -
listener -
Throws:
net.praqma.clearcase.exceptions.UnableToInitializeEntityException
CCUCMException
IOException
InterruptedException

getBaselineValue

public String getBaselineValue(hudson.model.AbstractBuild<?,?> build)

initializeDeliverView

public net.praqma.clearcase.ucm.view.SnapshotView initializeDeliverView(hudson.model.AbstractBuild<?,?> build,
                                                                        CCUCMBuildAction state,
                                                                        hudson.model.BuildListener listener)
                                                                 throws IOException,
                                                                        InterruptedException
Initialize the deliver view

Throws:
IOException
InterruptedException

generateChangeLog

public void generateChangeLog(hudson.model.AbstractBuild<?,?> build,
                              CCUCMBuildAction state,
                              hudson.model.BuildListener listener,
                              File changelogFile,
                              net.praqma.clearcase.ucm.view.SnapshotView snapshotView)
                       throws IOException,
                              InterruptedException
Generate the change log for poll/sibling mode

Parameters:
build -
state -
listener -
changelogFile -
snapshotView -
Throws:
IOException
InterruptedException

createChangeLogParser

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

buildEnvVars

public void buildEnvVars(hudson.model.AbstractBuild<?,?> build,
                         Map<String,String> env)
Overrides:
buildEnvVars in class hudson.scm.SCM

compareRemoteRevisionWith

public hudson.scm.PollingResult compareRemoteRevisionWith(hudson.model.AbstractProject<?,?> project,
                                                          hudson.Launcher launcher,
                                                          hudson.FilePath workspace,
                                                          hudson.model.TaskListener listener,
                                                          hudson.scm.SCMRevisionState rstate)
                                                   throws IOException,
                                                          InterruptedException
This method polls the version control system to see if there are any changes in the source code.

Specified by:
compareRemoteRevisionWith in class hudson.scm.SCM
Parameters:
project -
launcher -
workspace -
listener -
rstate -
Returns:
Throws:
IOException
InterruptedException

getLastAction

public static CCUCMBuildAction getLastAction(hudson.model.AbstractProject<?,?> project)
Returns the last CCUCMBuildAction, that has a valid Baseline

Parameters:
project -
Returns:
An Action

calcRevisionsFromBuild

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

printBaselines

public void printBaselines(List<net.praqma.clearcase.ucm.entities.Baseline> baselines,
                           PrintStream ps)

getLevelToPoll

public String getLevelToPoll()

getComponent

public String getComponent()

getStream

public String getStream()

getLoadModule

public String getLoadModule()

getStreamObject

public net.praqma.clearcase.ucm.entities.Stream getStreamObject()

getBaseline

@Exported
public String getBaseline()

getSlavePolling

public boolean getSlavePolling()

getHLinkFeedFrom

public String getHLinkFeedFrom()

getMultisitePolling

public boolean getMultisitePolling()

getPolling

@Exported
public String getPolling()

getTreatUnstable

@Exported
public String getTreatUnstable()

getBuildProject

public String getBuildProject()

getForceDeliver

public boolean getForceDeliver()

isTrimmedChangeSet

public boolean isTrimmedChangeSet()

isRemoveViewPrivateFiles

public boolean isRemoveViewPrivateFiles()

isCreateBaseline

public boolean isCreateBaseline()

getNameTemplate

public String getNameTemplate()

isMakeTag

public boolean isMakeTag()

isSetDescription

public boolean isSetDescription()

isRecommend

public boolean isRecommend()

setMultisitePolling

public void setMultisitePolling(boolean mp)

isDiscard

public boolean isDiscard()

setDiscard

public void setDiscard(boolean discard)

getMode

public PollingMode getMode()
Returns:
the mode

setMode

public void setMode(PollingMode mode)
Parameters:
mode - the mode to set


Copyright © 2004-2015. All Rights Reserved.