com.michelin.cio.hudson.plugins.clearcaseucmbaseline
Class ClearToolUcmBaseline

java.lang.Object
  extended by hudson.plugins.clearcase.ClearToolExec
      extended by com.michelin.cio.hudson.plugins.clearcaseucmbaseline.ClearToolUcmBaseline
All Implemented Interfaces:
hudson.plugins.clearcase.ClearTool

public class ClearToolUcmBaseline
extends hudson.plugins.clearcase.ClearToolExec

This class defines the cleartool command for use by ClearCaseUcmBaselineParameterValue.createBuildWrapper(hudson.model.AbstractBuild).

While this class extends ClearToolExec, most of ClearToolExec's methods will throw an UnsupportedOperationException since only the methods useful for ClearCaseUcmBaselineParameterValue.createBuildWrapper(hudson.model.AbstractBuild) have been implemented.

Author:
Romain Seguy (http://davadoc.deviantart.com)

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.plugins.clearcase.ClearTool
hudson.plugins.clearcase.ClearTool.DefaultPromotionLevel, hudson.plugins.clearcase.ClearTool.DiffBlOptions, hudson.plugins.clearcase.ClearTool.SetcsOption
 
Field Summary
 
Fields inherited from class hudson.plugins.clearcase.ClearToolExec
launcher, optionalMkviewParameters, variableResolver
 
Constructor Summary
ClearToolUcmBaseline(hudson.util.VariableResolver variableResolver, hudson.plugins.clearcase.ClearToolLauncher launcher)
           
 
Method Summary
 java.lang.String getBaselineDescription(java.lang.String pvob, java.lang.String baseline)
          Returns, for a given ClearCase UCM baseline, its description.
 java.lang.String getComponentFromBaseline(java.lang.String pvob, java.lang.String baseline)
          Returns, for a given ClearCase UCM baseline, the ClearCase UCM component this baseline refers to.
 java.lang.String getComponentRootDir(java.lang.String pvob, java.lang.String component)
          Returns, for a given ClearCase UCM component, its root dir.
 java.lang.String[] getDependentBaselines(java.lang.String pvob, java.lang.String baseline)
          Returns, for a given ClearCase UCM composite baseline, all the baselines in the dependencies graph.
protected  hudson.FilePath getRootViewPath(hudson.plugins.clearcase.ClearToolLauncher launcher)
           
 void mkview(java.lang.String viewName, java.lang.String streamSelector)
           
 void mkview(java.lang.String viewName, java.lang.String mkviewOptionalParam, boolean snapshotView, java.lang.String streamSelector)
           
 void mkview(java.lang.String viewName, java.lang.String streamSelector, java.lang.String defaultStorageDir)
           
 void rmview(java.lang.String viewName)
           
 void rmviewtag(java.lang.String viewName)
           
 void setcs(java.lang.String viewName, java.lang.String configSpec)
           
 void startView(java.lang.String viewTags)
           
 void syncronizeViewWithStream(java.lang.String viewName, java.lang.String stream)
           
 void update(java.lang.String viewName, java.lang.String loadRules)
           
 void update(java.lang.String viewName, java.lang.String[] loadRules)
           
 
Methods inherited from class hudson.plugins.clearcase.ClearToolExec
catcs, describe, diffbl, doesStreamExist, doesViewExist, endView, getLauncher, getViewData, lock, logRedundantCleartoolError, lsactivity, lsbl, lscurrentview, lshistory, lsproject, lsstream, lsview, lsvob, mkbl, mklabel, mkstream, mkview, mountVobs, pwv, rebaseDynamic, recommendBaseline, rmtag, rmviewUuid, runAndProcessOutput, setBaselinePromotionLevel, setBaselinePromotionLevel, setcs, setcsCurrent, setcsTag, unlock, unregisterView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClearToolUcmBaseline

public ClearToolUcmBaseline(hudson.util.VariableResolver variableResolver,
                            hudson.plugins.clearcase.ClearToolLauncher launcher)
Method Detail

getBaselineDescription

public java.lang.String getBaselineDescription(java.lang.String pvob,
                                               java.lang.String baseline)
                                        throws java.io.IOException,
                                               java.lang.InterruptedException
Returns, for a given ClearCase UCM baseline, its description.

Throws:
java.io.IOException
java.lang.InterruptedException

getComponentFromBaseline

public java.lang.String getComponentFromBaseline(java.lang.String pvob,
                                                 java.lang.String baseline)
                                          throws java.io.IOException,
                                                 java.lang.InterruptedException
Returns, for a given ClearCase UCM baseline, the ClearCase UCM component this baseline refers to.

The ClearCase UCM components are cached for each instance of the class.

Throws:
java.io.IOException
java.lang.InterruptedException
See Also:
(%[component]p, page 392)

getComponentRootDir

public java.lang.String getComponentRootDir(java.lang.String pvob,
                                            java.lang.String component)
                                     throws java.io.IOException,
                                            java.lang.InterruptedException
Returns, for a given ClearCase UCM component, its root dir.

Note that in case the component is rootless, an empty string is returned (cf. HUDSON-6398).

The root dirs are cached for each instance of the class.

Throws:
java.io.IOException
java.lang.InterruptedException
See Also:
(%[root_dir]p, page 392)

getDependentBaselines

public java.lang.String[] getDependentBaselines(java.lang.String pvob,
                                                java.lang.String baseline)
                                         throws java.io.IOException,
                                                java.lang.InterruptedException
Returns, for a given ClearCase UCM composite baseline, all the baselines in the dependencies graph.

Returns:
An array of ClearCase UCM baseline selectors (it may be empty)
Throws:
java.io.IOException
java.lang.InterruptedException
See Also:
(%[depends_on_closure]p, page 392)

getRootViewPath

protected hudson.FilePath getRootViewPath(hudson.plugins.clearcase.ClearToolLauncher launcher)
Specified by:
getRootViewPath in class hudson.plugins.clearcase.ClearToolExec

update

public void update(java.lang.String viewName,
                   java.lang.String loadRules)
            throws java.io.IOException,
                   java.lang.InterruptedException
Throws:
java.io.IOException
java.lang.InterruptedException

rmview

public void rmview(java.lang.String viewName)
            throws java.io.IOException,
                   java.lang.InterruptedException
Specified by:
rmview in interface hudson.plugins.clearcase.ClearTool
Overrides:
rmview in class hudson.plugins.clearcase.ClearToolExec
Throws:
java.io.IOException
java.lang.InterruptedException

rmviewtag

public void rmviewtag(java.lang.String viewName)
               throws java.io.IOException,
                      java.lang.InterruptedException
Specified by:
rmviewtag in interface hudson.plugins.clearcase.ClearTool
Overrides:
rmviewtag in class hudson.plugins.clearcase.ClearToolExec
Throws:
java.io.IOException
java.lang.InterruptedException

mkview

public void mkview(java.lang.String viewName,
                   java.lang.String streamSelector)
            throws java.io.IOException,
                   java.lang.InterruptedException
Throws:
java.io.IOException
java.lang.InterruptedException

mkview

public void mkview(java.lang.String viewName,
                   java.lang.String mkviewOptionalParam,
                   boolean snapshotView,
                   java.lang.String streamSelector)
            throws java.io.IOException,
                   java.lang.InterruptedException
Throws:
java.io.IOException
java.lang.InterruptedException

mkview

public void mkview(java.lang.String viewName,
                   java.lang.String streamSelector,
                   java.lang.String defaultStorageDir)
            throws java.io.IOException,
                   java.lang.InterruptedException
Specified by:
mkview in interface hudson.plugins.clearcase.ClearTool
Overrides:
mkview in class hudson.plugins.clearcase.ClearToolExec
Throws:
java.io.IOException
java.lang.InterruptedException

setcs

public void setcs(java.lang.String viewName,
                  java.lang.String configSpec)
           throws java.io.IOException,
                  java.lang.InterruptedException
Throws:
java.io.IOException
java.lang.InterruptedException

startView

public void startView(java.lang.String viewTags)
               throws java.io.IOException,
                      java.lang.InterruptedException
Specified by:
startView in interface hudson.plugins.clearcase.ClearTool
Overrides:
startView in class hudson.plugins.clearcase.ClearToolExec
Throws:
java.io.IOException
java.lang.InterruptedException

syncronizeViewWithStream

public void syncronizeViewWithStream(java.lang.String viewName,
                                     java.lang.String stream)
                              throws java.io.IOException,
                                     java.lang.InterruptedException
Throws:
java.io.IOException
java.lang.InterruptedException

update

public void update(java.lang.String viewName,
                   java.lang.String[] loadRules)
            throws java.io.IOException,
                   java.lang.InterruptedException
Specified by:
update in interface hudson.plugins.clearcase.ClearTool
Overrides:
update in class hudson.plugins.clearcase.ClearToolExec
Throws:
java.io.IOException
java.lang.InterruptedException


Copyright © 2011. All Rights Reserved.