hudson.plugins.clearcase.ucm
Class UcmCommon

java.lang.Object
  extended by hudson.plugins.clearcase.ucm.UcmCommon

public class UcmCommon
extends java.lang.Object

Author:
kyosi

Nested Class Summary
static class UcmCommon.BaselineDesc
           
static class UcmCommon.ComponentDesc
           
 
Constructor Summary
UcmCommon()
           
 
Method Summary
static java.util.List<UcmCommon.BaselineDesc> getComponentsForBaselines(ClearToolLauncher clearToolLauncher, java.util.List<UcmCommon.ComponentDesc> componentsList, boolean isUseDynamicView, java.lang.String viewName, hudson.FilePath filePath, java.util.List<java.lang.String> baselinesNames)
           
static UcmCommon.BaselineDesc getDataforBaseline(ClearToolLauncher clearToolLauncher, hudson.FilePath filePath, java.lang.String blName)
          Get the component binding to the baseline
static java.util.List<java.lang.String> getDiffBlVersions(ClearToolLauncher clearToolLauncher, java.lang.String viewRootDirectory, java.lang.String bl1, java.lang.String bl2)
           
static java.util.List<java.lang.String> getLatestBaselineNames(ClearToolLauncher clearToolLauncher, boolean isUseDynamicView, java.lang.String viewName, hudson.FilePath filePath, java.util.List<java.lang.String> readWriteComponents)
           
static java.util.List<UcmCommon.BaselineDesc> getLatestBlsWithCompOnStream(ClearToolLauncher clearToolLauncher, java.lang.String stream, java.lang.String view)
           
static java.lang.String getNoVob(java.lang.String element)
           
static java.util.List<java.lang.String> getReadWriteComponents(java.util.List<UcmCommon.ComponentDesc> componentsDesc)
           
static java.util.List<UcmCommon.ComponentDesc> getStreamComponentsDesc(ClearToolLauncher clearToolLauncher, java.lang.String streamName)
           
static java.lang.String getVersionDescription(ClearToolLauncher clearToolLauncher, java.lang.String version, java.lang.String format)
           
static java.lang.String getVob(java.lang.String element)
           
static boolean isStreamExists(ClearToolLauncher clearToolLauncher, java.lang.String stream)
           
static java.util.List<UcmCommon.BaselineDesc> makeBaseline(ClearToolLauncher clearToolLauncher, boolean isUseDynamicView, java.lang.String viewName, hudson.FilePath filePath, java.lang.String baselineName, java.lang.String baselineComment, boolean identical, boolean fullBaseline, java.util.List<java.lang.String> readWriteComponents)
           
static void mkstream(ClearToolLauncher clearToolLauncher, java.lang.String parentStream, java.lang.String childStream)
           
static void rebase(ClearToolLauncher clearToolLauncher, java.lang.String viewName, java.util.List<UcmCommon.BaselineDesc> baselines)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UcmCommon

public UcmCommon()
Method Detail

makeBaseline

public static java.util.List<UcmCommon.BaselineDesc> makeBaseline(ClearToolLauncher clearToolLauncher,
                                                                  boolean isUseDynamicView,
                                                                  java.lang.String viewName,
                                                                  hudson.FilePath filePath,
                                                                  java.lang.String baselineName,
                                                                  java.lang.String baselineComment,
                                                                  boolean identical,
                                                                  boolean fullBaseline,
                                                                  java.util.List<java.lang.String> readWriteComponents)
                                                           throws java.io.IOException,
                                                                  java.lang.InterruptedException
Parameters:
clearToolLauncher -
isUseDynamicView -
viewName -
filePath -
baselineName -
baselineComment -
identical -
fullBaseline -
readWriteComponents -
Returns:
list of created baselines
Throws:
java.io.IOException
java.lang.InterruptedException

getLatestBaselineNames

public static java.util.List<java.lang.String> getLatestBaselineNames(ClearToolLauncher clearToolLauncher,
                                                                      boolean isUseDynamicView,
                                                                      java.lang.String viewName,
                                                                      hudson.FilePath filePath,
                                                                      java.util.List<java.lang.String> readWriteComponents)
                                                               throws java.io.IOException,
                                                                      java.lang.InterruptedException
Parameters:
clearToolLauncher -
isUseDynamicView -
viewName -
filePath -
readWriteComponents - . if null both baselines on read and read-write components will be returned
Returns:
List of latest baselines on read write components (only)
Throws:
java.lang.InterruptedException
java.io.IOException
java.lang.Exception

getComponentsForBaselines

public static java.util.List<UcmCommon.BaselineDesc> getComponentsForBaselines(ClearToolLauncher clearToolLauncher,
                                                                               java.util.List<UcmCommon.ComponentDesc> componentsList,
                                                                               boolean isUseDynamicView,
                                                                               java.lang.String viewName,
                                                                               hudson.FilePath filePath,
                                                                               java.util.List<java.lang.String> baselinesNames)
                                                                        throws java.lang.InterruptedException,
                                                                               java.io.IOException
Parameters:
clearToolLauncher -
isUseDynamicView -
viewName -
filePath -
baselinesNames -
Returns:
list of BaselineDesc (baseline name and component name)
Throws:
java.lang.InterruptedException
java.io.IOException

getDataforBaseline

public static UcmCommon.BaselineDesc getDataforBaseline(ClearToolLauncher clearToolLauncher,
                                                        hudson.FilePath filePath,
                                                        java.lang.String blName)
                                                 throws java.lang.InterruptedException,
                                                        java.io.IOException
Get the component binding to the baseline

Parameters:
clearToolLauncher -
filePath -
blName - the baseline name like 'deskCore_3.2-146_2008-11-14_18-07-22.3543@\P_ORC'
Returns:
the component name like 'Desk_Core@\P_ORC'
Throws:
java.lang.InterruptedException
java.io.IOException

mkstream

public static void mkstream(ClearToolLauncher clearToolLauncher,
                            java.lang.String parentStream,
                            java.lang.String childStream)
                     throws java.io.IOException,
                            java.lang.InterruptedException
Parameters:
clearToolLauncher -
parentStream -
childStream -
Throws:
java.io.IOException
java.lang.InterruptedException

isStreamExists

public static boolean isStreamExists(ClearToolLauncher clearToolLauncher,
                                     java.lang.String stream)
                              throws java.io.IOException,
                                     java.lang.InterruptedException
Parameters:
clearToolLauncher -
stream -
Returns:
boolean indicating if the given stream exists
Throws:
java.io.IOException
java.lang.InterruptedException

getStreamComponentsDesc

public static java.util.List<UcmCommon.ComponentDesc> getStreamComponentsDesc(ClearToolLauncher clearToolLauncher,
                                                                              java.lang.String streamName)
                                                                       throws java.io.IOException,
                                                                              java.lang.InterruptedException
Parameters:
clearToolLauncher -
streamName -
Returns:
list of components - name and isModifiable
Throws:
java.io.IOException
java.lang.InterruptedException

getLatestBlsWithCompOnStream

public static java.util.List<UcmCommon.BaselineDesc> getLatestBlsWithCompOnStream(ClearToolLauncher clearToolLauncher,
                                                                                  java.lang.String stream,
                                                                                  java.lang.String view)
                                                                           throws java.io.IOException,
                                                                                  java.lang.InterruptedException
Returns:
List of latest BaseLineDesc (baseline + component) for stream. Only baselines on read-write components are returned
Throws:
java.lang.InterruptedException
java.io.IOException
java.lang.Exception

getReadWriteComponents

public static java.util.List<java.lang.String> getReadWriteComponents(java.util.List<UcmCommon.ComponentDesc> componentsDesc)
Parameters:
componentsDesc -
Returns:
list of read-write components out of components list (removing read-only components)

getDiffBlVersions

public static java.util.List<java.lang.String> getDiffBlVersions(ClearToolLauncher clearToolLauncher,
                                                                 java.lang.String viewRootDirectory,
                                                                 java.lang.String bl1,
                                                                 java.lang.String bl2)
                                                          throws java.io.IOException,
                                                                 java.lang.InterruptedException
Parameters:
clearToolLauncher -
viewRootDirectory -
bl1 -
bl2 -
Returns:
list of versions that were changed between two baselines
Throws:
java.io.IOException
java.lang.InterruptedException

getVersionDescription

public static java.lang.String getVersionDescription(ClearToolLauncher clearToolLauncher,
                                                     java.lang.String version,
                                                     java.lang.String format)
                                              throws java.io.IOException,
                                                     java.lang.InterruptedException
Parameters:
clearToolLauncher -
version -
Returns:
version description
Throws:
java.io.IOException
java.lang.InterruptedException

rebase

public static void rebase(ClearToolLauncher clearToolLauncher,
                          java.lang.String viewName,
                          java.util.List<UcmCommon.BaselineDesc> baselines)
                   throws java.io.IOException,
                          java.lang.InterruptedException
Parameters:
clearToolLauncher -
stream -
baselines -
Throws:
java.io.IOException
java.lang.InterruptedException

getNoVob

public static java.lang.String getNoVob(java.lang.String element)
Parameters:
clearToolLauncher -
element -
Returns:

getVob

public static java.lang.String getVob(java.lang.String element)


Copyright © 2010. All Rights Reserved.