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

public Class CCRmtype

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 rmtype command to ClearCase.

The following attributes are interpreted:

Task attributes
Attribute Values Required
typekind The kind of type to create. Valid types are:
attype attribute type
brtype branch type
eltype element type
hltype hyperlink type
lbtype label type
trtype trigger type
Yes
typename The name of the type to remove Yes
vob Name of the VOB No
ignore Used with trigger types only. Forces removal of trigger type even if a pre-operation trigger would prevent its removal No
rmall Removes all instances of a type and the type object itself 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_FORCE

-force flag -- suppresses confirmation prompts

public static final String
FLAG_IGNORE

-ignore flag -- ignore pre-trigger operations when removing a trigger type

public static final String
FLAG_NOCOMMENT

-nc flag -- no comment is specified

public static final String
FLAG_RMALL

-rmall flag -- removes all instances of a type and the type object itself

private String
private String
private boolean
private boolean
private String
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 ignore flag
getIgnore
()

Get ignore flag status

public boolean

Returns:

boolean containing status of rmall flag
getRmAll
()

Get rmall flag status

public String

Returns:

String containing the type-kind
getTypeKind
()

Get type-kind string

public String

Returns:

String containing the type-name
getTypeName
()

Get type-name string

private String

Returns:

the 'type-kind:type-name@vob' specifier
getTypeSpecifier
()

Get the 'type-specifier' string

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
setIgnore(boolean
the status to set the flag to
ignore
)

Set the ignore flag

public void
setRmAll(boolean
the status to set the flag to
rmall
)

Set rmall flag

public void
setTypeKind(String
the type-kind string
tk
)

Set type-kind string

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_FORCEback to summary
public static final String FLAG_FORCE

-force flag -- suppresses confirmation prompts

FLAG_IGNOREback to summary
public static final String FLAG_IGNORE

-ignore flag -- ignore pre-trigger operations when removing a trigger type

FLAG_NOCOMMENTback to summary
public static final String FLAG_NOCOMMENT

-nc flag -- no comment is specified

FLAG_RMALLback to summary
public static final String FLAG_RMALL

-rmall flag -- removes all instances of a type and the type object itself

mCfileback to summary
private String mCfile
mCommentback to summary
private String mComment
mIgnoreback to summary
private boolean mIgnore
mRmallback to summary
private boolean mRmall
mTypeKindback to summary
private String mTypeKind
mTypeNameback to summary
private String mTypeName
mVOBback to summary
private String mVOB

Constructor Detail

CCRmtypeback to summary
public CCRmtype()

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

getIgnoreback to summary
public boolean getIgnore()

Get ignore flag status

Returns:boolean

boolean containing status of ignore flag

getRmAllback to summary
public boolean getRmAll()

Get rmall flag status

Returns:boolean

boolean containing status of rmall flag

getTypeKindback to summary
public String getTypeKind()

Get type-kind string

Returns:String

String containing the type-kind

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-specifier' string

Returns:String

the 'type-kind:type-name@vob' specifier

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

setIgnoreback to summary
public void setIgnore(boolean ignore)

Set the ignore flag

Parameters
ignore:boolean

the status to set the flag to

setRmAllback to summary
public void setRmAll(boolean rmall)

Set rmall flag

Parameters
rmall:boolean

the status to set the flag to

setTypeKindback to summary
public void setTypeKind(String tk)

Set type-kind string

Parameters
tk:String

the type-kind string

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