public abstract class ClearToolExec extends Object implements ClearTool
ClearTool.DefaultPromotionLevel, ClearTool.DiffBlOptions, ClearTool.SetcsOption
Modifier and Type | Field and Description |
---|---|
protected int |
endOrRmViewDelay |
protected ClearToolLauncher |
launcher |
protected String |
optionalMkviewParameters |
protected String |
updtFileName |
protected hudson.util.VariableResolver<String> |
variableResolver |
Constructor and Description |
---|
ClearToolExec(hudson.util.VariableResolver<String> variableResolver,
ClearToolLauncher launcher,
String optionalMkviewParameters)
Deprecated.
|
ClearToolExec(hudson.util.VariableResolver<String> variableResolver,
ClearToolLauncher launcher,
String optionalMkviewParameters,
int endOrRmViewDelay) |
Modifier and Type | Method and Description |
---|---|
String |
catcs(String viewTag)
Retrieves the config spec for the specified view name
|
Reader |
describe(String format,
String objectSelector)
Call the cleartool describe with the provided format on the specified object selector See http://www.ipnom.com/ClearCase-Commands/describe.html for valid
options
|
Reader |
describe(String format,
String[] objectSelectors)
Call the cleartool describe with the provided format on the specified object selectors See http://www.ipnom.com/ClearCase-Commands/describe.html for
valid options
|
Reader |
describe(String format,
String viewPath,
String objectSelector)
Call the cleartool describe with the provided format on the specified object selector See http://www.ipnom.com/ClearCase-Commands/describe.html for valid
options
|
Reader |
diffbl(EnumSet<ClearTool.DiffBlOptions> type,
String baseline1,
String baseline2,
String viewPath)
Call diffbl using the two provided baselines (can be stream or baseline)
|
boolean |
doesSetcsSupportOverride() |
boolean |
doesStreamExist(String streamSelector) |
boolean |
doesViewExist(String viewTag)
Checks whether the given view tag already exists in the ClearCase region.
|
void |
endView(String viewTag)
Ends the view
|
void |
endViewServer(String viewTag)
Ends the view, with -server option
|
ClearToolLauncher |
getLauncher()
Get the inner CLearToolLauncher.
|
protected abstract hudson.FilePath |
getRootViewPath(ClearToolLauncher launcher) |
Properties |
getViewData(String viewTag)
Gets the view UUID, for thorough view deletion.
|
boolean |
lock(String comment,
String objectSelector)
Lock an object.
|
void |
logRedundantCleartoolError(String[] cmd,
Exception ex) |
Reader |
lsactivity(String activity,
String commandFormat,
String viewPath)
Call lsactivity (see on Rational ClearCase Commands Reference for details)
|
Reader |
lsactivityIn(String streamSelector,
String commandFormat,
String viewPath) |
String |
lsbl(String baselineName,
String format)
List attributes of a baseline
|
String |
lscurrentview(String viewPath)
Given a relative path, return the associated view tag if it exists.
|
LsHistoryCommand |
lshistory()
Returns a lsHistoryCommand to prepare execution of a cleartool lshistory
|
Reader |
lshistory(String format,
Date lastBuildDate,
String viewPath,
String branch,
String[] pathsInView,
boolean getMinor)
Deprecated.
|
Reader |
lshistory(String format,
Date lastBuildDate,
String viewPath,
String branch,
String[] pathsInView,
boolean getMinor,
boolean useRecurse)
Deprecated.
|
String |
lsproject(String viewTag,
String format)
List attributes of a project
|
String |
lsstream(String stream,
String viewTag,
String format)
List attributes of a stream
|
List<String> |
lsview(boolean onlyActiveDynamicViews)
Lists view registry entries.
|
List<String> |
lsvob(boolean onlyMounted)
Lists VOB registry entries
|
List<Baseline> |
mkbl(String name,
String viewTag,
String comment,
boolean fullBaseline,
boolean identical,
List<String> components,
String dDependsOn,
String aDependsOn)
Creates a new baseline
|
void |
mklabel(String viewName,
String label)
Attaches version labels to versions of elements
|
void |
mkstream(String parentStream,
String stream)
Make a new stream
|
void |
mkview(MkViewParameters parameters) |
void |
mkview(String viewPath,
String viewTag,
String streamSelector)
Deprecated.
|
void |
mkview(String viewPath,
String viewTag,
String streamSelector,
String defaultStorageDir)
Deprecated.
|
void |
mountVobs()
Mounts all VOBs.
|
String |
pwv(String viewPath)
Retrieves the canonical working directory for a given view.
|
void |
rebaseDynamic(String viewTag,
String baseline)
Rebase a dynamic view
|
void |
recommendBaseline(String streamSelector)
Recommend the latest baselines on the stream that matches the minimum promotion level of the stream
|
void |
rmtag(String viewTag)
Removes a view tag or a VOB tag from the networkwide storage registry
|
void |
rmview(String viewPath)
Removes the view from a VOB
|
void |
rmviewtag(String viewTag)
Removes the view tag from the ClearCase registry - used when the view storage in the workspace has already been deleted.
|
void |
rmviewUuid(String viewUuid)
Removes the view (as identified by UUID) from all VOBs
|
protected String |
runAndProcessOutput(hudson.util.ArgumentListBuilder cmd,
InputStream in,
hudson.FilePath workFolder,
boolean catchExceptions,
List<IOException> exceptions,
boolean log) |
void |
setBaselinePromotionLevel(String baselineName,
ClearTool.DefaultPromotionLevel promotionLevel) |
void |
setBaselinePromotionLevel(String baselineName,
String promotionLevel)
Set the baseline promotion level to the given level.
|
void |
setcs(String viewPath,
ClearTool.SetcsOption option,
String configSpec)
Deprecated.
|
CleartoolUpdateResult |
setcs2(String viewPath,
ClearTool.SetcsOption option,
String configSpec)
Sets the config spec of the view
|
void |
setcsCurrent(String viewPath)
To set the config spec of a snapshot view, you must be in or under the snapshot view root directory.
|
void |
setcsTag(String viewTag,
ClearTool.SetcsOption option,
String configSpec)
Synchronize the dynamic view with the latest recommended baseline for the stream.
|
void |
startView(String viewTags)
Starts or connects to a dynamic view's view_server process
|
void |
unlock(String comment,
String objectSelector)
Unlock an object
|
void |
unregisterView(String uuid)
Unregisters the view tag for a given UUID.
|
void |
update(String viewPath,
String[] loadRules)
Deprecated.
|
CleartoolUpdateResult |
update2(String viewPath,
String[] loadRules)
Updates the elements in the view
|
CleartoolVersion |
version() |
protected ClearToolLauncher launcher
protected String optionalMkviewParameters
protected int endOrRmViewDelay
protected String updtFileName
protected hudson.util.VariableResolver<String> variableResolver
@Deprecated public ClearToolExec(hudson.util.VariableResolver<String> variableResolver, ClearToolLauncher launcher, String optionalMkviewParameters)
public ClearToolExec(hudson.util.VariableResolver<String> variableResolver, ClearToolLauncher launcher, String optionalMkviewParameters, int endOrRmViewDelay)
public String catcs(String viewTag) throws IOException, InterruptedException
ClearTool
catcs
in interface ClearTool
viewTag
- The view tag the client want the config spec for.IOException
InterruptedException
public Reader describe(String format, String objectSelector) throws IOException, InterruptedException
ClearTool
describe
in interface ClearTool
IOException
- If cleartool throws an error codeInterruptedException
- If the process is interruptedpublic Reader describe(String format, String viewPath, String objectSelector) throws IOException, InterruptedException
ClearTool
describe
in interface ClearTool
IOException
- If cleartool throws an error codeInterruptedException
- If the process is interruptedpublic Reader describe(String format, String[] objectSelectors) throws IOException, InterruptedException
ClearTool
describe
in interface ClearTool
IOException
- If cleartool throws an error codeInterruptedException
- If the process is interruptedpublic Reader diffbl(EnumSet<ClearTool.DiffBlOptions> type, String baseline1, String baseline2, String viewPath) throws IOException
ClearTool
diffbl
in interface ClearTool
type
- see http://www.ipnom.com/ClearCase-Commands/diffbl.htmlviewPath
- A view path name needed to retrieve versions fromIOException
- if unable to do I/O operationspublic boolean doesSetcsSupportOverride() throws IOException, InterruptedException
doesSetcsSupportOverride
in interface ClearTool
IOException
InterruptedException
public boolean doesStreamExist(String streamSelector) throws IOException, InterruptedException
doesStreamExist
in interface ClearTool
IOException
InterruptedException
public boolean doesViewExist(String viewTag) throws IOException, InterruptedException
ClearTool
doesViewExist
in interface ClearTool
viewTag
- the view tag to checkIOException
InterruptedException
public void endView(String viewTag) throws IOException, InterruptedException
ClearTool
endView
in interface ClearTool
viewTag
- the view tagIOException
InterruptedException
public void endViewServer(String viewTag) throws IOException, InterruptedException
ClearTool
endViewServer
in interface ClearTool
viewTag
- the view tagIOException
InterruptedException
public ClearToolLauncher getLauncher()
ClearTool
getLauncher
in interface ClearTool
public Properties getViewData(String viewTag) throws IOException, InterruptedException
ClearTool
getViewData
in interface ClearTool
IOException
InterruptedException
public boolean lock(String comment, String objectSelector) throws IOException, InterruptedException
ClearTool
lock
in interface ClearTool
comment
- Can be nullobjectSelector
- Object select. Cannot be nullIOException
InterruptedException
public void logRedundantCleartoolError(String[] cmd, Exception ex)
logRedundantCleartoolError
in interface ClearTool
public Reader lsactivity(String activity, String commandFormat, String viewPath) throws IOException, InterruptedException
ClearTool
lsactivity
in interface ClearTool
activity
- Specifies one or more activities to list.commandFormat
- The output format to be used (-fmt <commandFormat>)viewPath
- view path name to use in order to list activityIOException
InterruptedException
public Reader lsactivityIn(String streamSelector, String commandFormat, String viewPath) throws IOException, InterruptedException
lsactivityIn
in interface ClearTool
IOException
InterruptedException
public String lsbl(String baselineName, String format) throws IOException, InterruptedException
ClearTool
lsbl
in interface ClearTool
IOException
InterruptedException
public String lscurrentview(String viewPath) throws IOException, InterruptedException
ClearTool
lscurrentview
in interface ClearTool
IOException
InterruptedException
@Deprecated public Reader lshistory(String format, Date lastBuildDate, String viewPath, String branch, String[] pathsInView, boolean getMinor) throws IOException, InterruptedException
lshistory
in interface ClearTool
IOException
InterruptedException
public LsHistoryCommand lshistory()
ClearTool
@Deprecated public Reader lshistory(String format, Date lastBuildDate, String viewPath, String branch, String[] pathsInView, boolean getMinor, boolean useRecurse) throws IOException, InterruptedException
lshistory
in interface ClearTool
IOException
InterruptedException
public String lsproject(String viewTag, String format) throws InterruptedException, IOException
ClearTool
lsproject
in interface ClearTool
viewTag
- View tag of a view attached to a stream of the projectInterruptedException
IOException
public String lsstream(String stream, String viewTag, String format) throws IOException, InterruptedException
ClearTool
lsstream
in interface ClearTool
stream
- TODOviewTag
- The view tag of a view on the wanted streamIOException
InterruptedException
public List<String> lsview(boolean onlyActiveDynamicViews) throws IOException, InterruptedException
ClearTool
lsview
in interface ClearTool
onlyActiveDynamicViews
- true for only return active dynamic views; false all views are returnedIOException
InterruptedException
public List<String> lsvob(boolean onlyMounted) throws IOException, InterruptedException
ClearTool
lsvob
in interface ClearTool
onlyMounted
- true for only return mounted vobs; false all vobs are returnedIOException
InterruptedException
public List<Baseline> mkbl(String name, String viewTag, String comment, boolean fullBaseline, boolean identical, List<String> components, String dDependsOn, String aDependsOn) throws IOException, InterruptedException
ClearTool
mkbl
in interface ClearTool
name
- The base name for the baselineviewTag
- The view from which to create baseline. Baselines are created in the stream linked to this viewdDependsOn
- TODOaDependsOn
- TODOIOException
InterruptedException
public void mklabel(String viewName, String label) throws IOException, InterruptedException
ClearTool
mklabel
in interface ClearTool
viewName
- The view path name (relative to the workspace)label
- the label nameIOException
InterruptedException
public void mkstream(String parentStream, String stream) throws IOException, InterruptedException
ClearTool
mkstream
in interface ClearTool
parentStream
- The parent stream namestream
- The new stream nameIOException
InterruptedException
public void mkview(MkViewParameters parameters) throws IOException, InterruptedException
mkview
in interface ClearTool
IOException
InterruptedException
@Deprecated public void mkview(String viewPath, String viewTag, String streamSelector) throws IOException, InterruptedException
ClearTool
mkview
in interface ClearTool
viewPath
- The view path name (relative to the workspace)viewTag
- the name of the viewstreamSelector
- optional stream selector, null if not used.IOException
InterruptedException
ClearToolExec#mkview(MkViewParameters) instead
@Deprecated public void mkview(String viewPath, String viewTag, String streamSelector, String defaultStorageDir) throws IOException, InterruptedException
mkview
in interface ClearTool
viewPath
- The view path name (relative to the workspace)viewTag
- The view tag (unique server identifier for the view)streamSelector
- optional stream selector, null if not used.IOException
InterruptedException
public void mountVobs() throws IOException, InterruptedException
ClearTool
mountVobs
in interface ClearTool
IOException
InterruptedException
public String pwv(String viewPath) throws IOException, InterruptedException
ClearTool
pwv
in interface ClearTool
viewPath
- The view path to use to execute pwvIOException
InterruptedException
public void rebaseDynamic(String viewTag, String baseline) throws IOException, InterruptedException
ClearTool
rebaseDynamic
in interface ClearTool
viewTag
- the view to rebase. It must be a dynamic viewbaseline
- The new foundation baseline to useIOException
InterruptedException
public void recommendBaseline(String streamSelector) throws IOException, InterruptedException
ClearTool
recommendBaseline
in interface ClearTool
IOException
InterruptedException
public void rmtag(String viewTag) throws IOException, InterruptedException
ClearTool
rmtag
in interface ClearTool
IOException
InterruptedException
public void rmview(String viewPath) throws IOException, InterruptedException
ClearTool
rmview
in interface ClearTool
viewPath
- The path used for the viewIOException
InterruptedException
public void rmviewtag(String viewTag) throws IOException, InterruptedException
ClearTool
rmviewtag
in interface ClearTool
viewTag
- The view tag (server identifier of the view)IOException
InterruptedException
public void rmviewUuid(String viewUuid) throws IOException, InterruptedException
ClearTool
rmviewUuid
in interface ClearTool
viewUuid
- the unique identifier for the viewIOException
InterruptedException
public void setBaselinePromotionLevel(String baselineName, ClearTool.DefaultPromotionLevel promotionLevel) throws IOException, InterruptedException
setBaselinePromotionLevel
in interface ClearTool
IOException
InterruptedException
public void setBaselinePromotionLevel(String baselineName, String promotionLevel) throws IOException, InterruptedException
ClearTool
setBaselinePromotionLevel
in interface ClearTool
IOException
InterruptedException
@Deprecated public void setcs(String viewPath, ClearTool.SetcsOption option, String configSpec) throws IOException, InterruptedException
setcs
in interface ClearTool
viewPath
- The view path name (relative to the workspace)option
- The type of setcs that needs to be performedconfigSpec
- the name of the file containing a config specIOException
InterruptedException
http://www.ipnom.com/ClearCase-Commands/setcs.html
public CleartoolUpdateResult setcs2(String viewPath, ClearTool.SetcsOption option, String configSpec) throws IOException, InterruptedException
ClearTool
setcs2
in interface ClearTool
viewPath
- The view path name (relative to the workspace)configSpec
- the name of the file containing a config specIOException
InterruptedException
public void setcsCurrent(String viewPath) throws IOException, InterruptedException
IOException
InterruptedException
http://www.ipnom.com/ClearCase-Commands/setcs.html
public void setcsTag(String viewTag, ClearTool.SetcsOption option, String configSpec) throws IOException, InterruptedException
setcsTag
in interface ClearTool
option
- The option to useconfigSpec
- The config spec to apply. If omitted, the view tagIOException
InterruptedException
public void startView(String viewTags) throws IOException, InterruptedException
ClearTool
startView
in interface ClearTool
viewTags
- One or more currently registered view tags (that is, view tags visible to lsview).IOException
InterruptedException
public void unlock(String comment, String objectSelector) throws IOException, InterruptedException
ClearTool
unlock
in interface ClearTool
IOException
InterruptedException
public void unregisterView(String uuid) throws IOException, InterruptedException
ClearTool
unregisterView
in interface ClearTool
uuid
- the unique identifier for the view.IOException
InterruptedException
@Deprecated public void update(String viewPath, String[] loadRules) throws IOException, InterruptedException
ClearTool
update
in interface ClearTool
viewPath
- the name of the viewloadRules
- optional load rules, null if not used.IOException
InterruptedException
public CleartoolUpdateResult update2(String viewPath, String[] loadRules) throws IOException, InterruptedException
ClearTool
update2
in interface ClearTool
viewPath
- the name of the viewloadRules
- optional load rules, null if not used.IOException
InterruptedException
public CleartoolVersion version() throws IOException, InterruptedException, CleartoolVersionParsingException
version
in interface ClearTool
IOException
InterruptedException
CleartoolVersionParsingException
protected abstract hudson.FilePath getRootViewPath(ClearToolLauncher launcher)
launcher
- protected String runAndProcessOutput(hudson.util.ArgumentListBuilder cmd, InputStream in, hudson.FilePath workFolder, boolean catchExceptions, List<IOException> exceptions, boolean log) throws IOException, InterruptedException
IOException
InterruptedException
Copyright © 2004-2021. All Rights Reserved.