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

public Class CCUnlock

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

Performs a ClearCase Unlock command.

The following attributes are interpreted:

Task attributes
Attribute Values Required
comment Specifies how to populate comments fields No
pname Specifies the object pathname to be unlocked. No
objselect This variable is obsolete. Should use objsel instead. no
objsel Specifies the object(s) to be unlocked. 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

-comment flag -- method to use for commenting events

public static final String
FLAG_PNAME

-pname flag -- pathname to lock

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 desired comment method
getComment
()

Get comment method

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

Get the 'comment' command

public String

Returns:

String containing the objects to be locked
getObjselect
()

Get list of objects to be locked

private String

Returns:

String containing the object/pname being worked on
getOpType
()

Return which object/pname is being operated on

public String

Returns:

String containing the pathname to be locked
getPname
()

Get the pathname to be locked

private void
getPnameCommand(Commandline
containing the command line string with or without the pname flag and value appended
cmd
)

Get the 'pname' command

public void
setComment(String
comment method to use
comment
)

Sets how comments should be written for the event record(s)

public void
setObjSel(String
objects to be locked
objsel
)

Sets the object(s) to be locked

public void
setObjselect(String
objects to be locked
objselect
)

Sets the object(s) to be locked

public void
setPname(String
pathname to be locked
pname
)

Sets the pathname to be locked

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

Field Detail

FLAG_COMMENTback to summary
public static final String FLAG_COMMENT

-comment flag -- method to use for commenting events

FLAG_PNAMEback to summary
public static final String FLAG_PNAME

-pname flag -- pathname to lock

mCommentback to summary
private String mComment
mPnameback to summary
private String mPname

Constructor Detail

CCUnlockback to summary
public CCUnlock()

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 method

Returns:String

String containing the desired comment method

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 value appended

getObjselectback to summary
public String getObjselect()

Get list of objects to be locked

Returns:String

String containing the objects to be locked

getOpTypeback to summary
private String getOpType()

Return which object/pname is being operated on

Returns:String

String containing the object/pname being worked on

getPnameback to summary
public String getPname()

Get the pathname to be locked

Returns:String

String containing the pathname to be locked

getPnameCommandback to summary
private void getPnameCommand(Commandline cmd)

Get the 'pname' command

Parameters
cmd:Commandline

containing the command line string with or without the pname flag and value appended

setCommentback to summary
public void setComment(String comment)

Sets how comments should be written for the event record(s)

Parameters
comment:String

comment method to use

setObjSelback to summary
public void setObjSel(String objsel)

Sets the object(s) to be locked

Parameters
objsel:String

objects to be locked

Since
ant 1.6.1
setObjselectback to summary
public void setObjselect(String objselect)

Sets the object(s) to be locked

Parameters
objselect:String

objects to be locked

setPnameback to summary
public void setPname(String pname)

Sets the pathname to be locked

Parameters
pname:String

pathname to be locked