Top Description Fields Constructors Methods
org.apache.tools.ant.taskdefs.optional.clearcase

public Class CCMklbtype

extends ClearCase
Class Inheritance
Imports
org.apache.tools.ant.BuildException, .Project, org.apache.tools.ant.taskdefs.Execute, org.apache.tools.ant.types.Commandline

Task to perform mklbtype command to ClearCase.

The following attributes are interpreted:

Task attributes
Attribute Values Required
typename Name of the label type to create Yes
vob Name of the VOB No
replace Replace an existing label definition of the same type No
global Either global or ordinary can be specified, not both. Creates a label type that is global to the VOB or to VOBs that use this VOB No
ordinary Either global or ordinary can be specified, not both. Creates a label type that can be used only in the current VOB. Default No
pbranch Allows the label type to be used once per branch in a given element's version tree No
shared Sets the way mastership is checked by ClearCase. See ClearCase documentation for details No
comment Specify a comment. Only one of comment or cfile may be used. No
commentfile Specify a file containing a comment. Only one of comment or cfile may be used. No
failonerr Throw an exception if the command fails. Default is true No

Field Summary

Modifier and TypeField and Description
public static final String
FLAG_COMMENT

-c flag -- comment to attach to the file

public static final String
FLAG_COMMENTFILE

-cfile flag -- file containing a comment to attach to the file

public static final String
FLAG_GLOBAL

-global flag -- creates a label type that is global to the VOB or to VOBs that use this VOB

public static final String
FLAG_NOCOMMENT

-nc flag -- no comment is specified

public static final String
FLAG_ORDINARY

-ordinary flag -- creates a label type that can be used only in the current VOB

public static final String
FLAG_PBRANCH

-pbranch flag -- allows label type to be used once per branch

public static final String
FLAG_REPLACE

-replace flag -- replace existing label definition of the same type

public static final String
FLAG_SHARED

-shared flag -- sets the way mastership is checked by ClearCase

private String
private String
private boolean
private boolean
private boolean
private boolean
private boolean
private String
private String
Inherited from org.apache.tools.ant.taskdefs.optional.clearcase.ClearCase:
COMMAND_CHECKINCOMMAND_CHECKOUTCOMMAND_LOCKCOMMAND_LSCOCOMMAND_MKATTRCOMMAND_MKBLCOMMAND_MKDIRCOMMAND_MKELEMCOMMAND_MKLABELCOMMAND_MKLBTYPECOMMAND_RMTYPECOMMAND_UNCHECKOUTCOMMAND_UNLOCKCOMMAND_UPDATE

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
checkOptions(Commandline cmd)

Check the command line options.

public void
execute()

Overrides org.apache.tools.ant.Task.execute.

Executes the task.
public String

Returns:

String containing the comment
getComment
()

Get comment string

private void
getCommentCommand(Commandline
containing the command line string with or without the comment flag and string appended
cmd
)

Get the 'comment' command

public String

Returns:

String containing the path to the comment file
getCommentFile
()

Get comment file

private void
getCommentFileCommand(Commandline
containing the command line string with or without the commentfile flag and file appended
cmd
)

Get the 'commentfile' command

public boolean

Returns:

boolean containing status of global flag
getGlobal
()

Get global flag status

public boolean

Returns:

boolean containing status of ordinary flag
getOrdinary
()

Get ordinary flag status

public boolean

Returns:

boolean containing status of pbranch flag
getPbranch
()

Get pbranch flag status

public boolean

Returns:

boolean containing status of replace flag
getReplace
()

Get replace flag status

public boolean

Returns:

boolean containing status of shared flag
getShared
()

Get shared flag status

public String

Returns:

String containing the type-name
getTypeName
()

Get type-name string

private String

Returns:

the 'type-name-specifier' command if the attribute was specified, otherwise an empty string
getTypeSpecifier
()

Get the type-name specifier

public String

Returns:

String containing VOB name
getVOB
()

Get VOB name

public void
setComment(String
the comment string
comment
)

Set comment string

public void
setCommentFile(String
the path to the comment file
cfile
)

Set comment file

public void
setGlobal(boolean
the status to set the flag to
glob
)

Set the global flag

public void
setOrdinary(boolean
the status to set the flag to
ordinary
)

Set the ordinary flag

public void
setPbranch(boolean
the status to set the flag to
pbranch
)

Set the pbranch flag

public void
setReplace(boolean
the status to set the flag to
repl
)

Set the replace flag

public void
setShared(boolean
the status to set the flag to
shared
)

Set the shared flag

public void
setTypeName(String
the type-name string
tn
)

Set type-name string

public void
setVOB(String
the VOB name
vob
)

Set the VOB name

Inherited from org.apache.tools.ant.taskdefs.optional.clearcase.ClearCase:
getClearToolCommandgetFailOnErrgetObjSelectgetViewPathgetViewPathBasenamerunrunSrunSsetClearToolDirsetFailOnErrsetObjSelectsetViewPath

Field Detail

FLAG_COMMENTback to summary
public static final String FLAG_COMMENT

-c flag -- comment to attach to the file

FLAG_COMMENTFILEback to summary
public static final String FLAG_COMMENTFILE

-cfile flag -- file containing a comment to attach to the file

FLAG_GLOBALback to summary
public static final String FLAG_GLOBAL

-global flag -- creates a label type that is global to the VOB or to VOBs that use this VOB

FLAG_NOCOMMENTback to summary
public static final String FLAG_NOCOMMENT

-nc flag -- no comment is specified

FLAG_ORDINARYback to summary
public static final String FLAG_ORDINARY

-ordinary flag -- creates a label type that can be used only in the current VOB

FLAG_PBRANCHback to summary
public static final String FLAG_PBRANCH

-pbranch flag -- allows label type to be used once per branch

FLAG_REPLACEback to summary
public static final String FLAG_REPLACE

-replace flag -- replace existing label definition of the same type

FLAG_SHAREDback to summary
public static final String FLAG_SHARED

-shared flag -- sets the way mastership is checked by ClearCase

mCfileback to summary
private String mCfile
mCommentback to summary
private String mComment
mGlobalback to summary
private boolean mGlobal
mOrdinaryback to summary
private boolean mOrdinary
mPbranchback to summary
private boolean mPbranch
mReplaceback to summary
private boolean mReplace
mSharedback to summary
private boolean mShared
mTypeNameback to summary
private String mTypeName
mVOBback to summary
private String mVOB

Constructor Detail

CCMklbtypeback to summary
public CCMklbtype()

Method Detail

checkOptionsback to summary
private void checkOptions(Commandline cmd)

Check the command line options.

executeback to summary
public void execute() throws BuildException

Overrides org.apache.tools.ant.Task.execute.

Executes the task.

Builds a command line to execute cleartool and then calls Exec's run method to execute the command line.

Annotations
@Override
Exceptions
BuildException:
if the command fails and failonerr is set to true
getCommentback to summary
public String getComment()

Get comment string

Returns:String

String containing the comment

getCommentCommandback to summary
private void getCommentCommand(Commandline cmd)

Get the 'comment' command

Parameters
cmd:Commandline

containing the command line string with or without the comment flag and string appended

getCommentFileback to summary
public String getCommentFile()

Get comment file

Returns:String

String containing the path to the comment file

getCommentFileCommandback to summary
private void getCommentFileCommand(Commandline cmd)

Get the 'commentfile' command

Parameters
cmd:Commandline

containing the command line string with or without the commentfile flag and file appended

getGlobalback to summary
public boolean getGlobal()

Get global flag status

Returns:boolean

boolean containing status of global flag

getOrdinaryback to summary
public boolean getOrdinary()

Get ordinary flag status

Returns:boolean

boolean containing status of ordinary flag

getPbranchback to summary
public boolean getPbranch()

Get pbranch flag status

Returns:boolean

boolean containing status of pbranch flag

getReplaceback to summary
public boolean getReplace()

Get replace flag status

Returns:boolean

boolean containing status of replace flag

getSharedback to summary
public boolean getShared()

Get shared flag status

Returns:boolean

boolean containing status of shared flag

getTypeNameback to summary
public String getTypeName()

Get type-name string

Returns:String

String containing the type-name

getTypeSpecifierback to summary
private String getTypeSpecifier()

Get the type-name specifier

Returns:String

the 'type-name-specifier' command if the attribute was specified, otherwise an empty string

getVOBback to summary
public String getVOB()

Get VOB name

Returns:String

String containing VOB name

setCommentback to summary
public void setComment(String comment)

Set comment string

Parameters
comment:String

the comment string

setCommentFileback to summary
public void setCommentFile(String cfile)

Set comment file

Parameters
cfile:String

the path to the comment file

setGlobalback to summary
public void setGlobal(boolean glob)

Set the global flag

Parameters
glob:boolean

the status to set the flag to

setOrdinaryback to summary
public void setOrdinary(boolean ordinary)

Set the ordinary flag

Parameters
ordinary:boolean

the status to set the flag to

setPbranchback to summary
public void setPbranch(boolean pbranch)

Set the pbranch flag

Parameters
pbranch:boolean

the status to set the flag to

setReplaceback to summary
public void setReplace(boolean repl)

Set the replace flag

Parameters
repl:boolean

the status to set the flag to

setSharedback to summary
public void setShared(boolean shared)

Set the shared flag

Parameters
shared:boolean

the status to set the flag to

setTypeNameback to summary
public void setTypeName(String tn)

Set type-name string

Parameters
tn:String

the type-name string

setVOBback to summary
public void setVOB(String vob)

Set the VOB name

Parameters
vob:String

the VOB name