Class CCLock
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.optional.clearcase.ClearCase
org.apache.tools.ant.taskdefs.optional.clearcase.CCLock
- All Implemented Interfaces:
- Cloneable
Performs a ClearCase Lock command.
 
   
The following attributes are interpreted:
| Attribute | Values | Required | 
|---|---|---|
| replace | Specifies replacing an existing lock | No | 
| nusers | Specifies user(s) who can still modify the object/pname | No | 
| obsolete | Specifies that the object/pname should be marked obsolete | No | 
| comment | Specifies how to populate comments fields | No | 
| pname | Specifies the pathname to be locked. | 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 SummaryFieldsModifier and TypeFieldDescriptionstatic final String-comment flag -- method to use for commenting eventsstatic final String-nusers flag -- list of users to exclude from lockstatic final String-obsolete flag -- mark locked object as obsoletestatic final String-pname flag -- pathname to lockstatic final String-replace flag -- replace existing lock on object(s)Fields inherited from class org.apache.tools.ant.taskdefs.optional.clearcase.ClearCaseCOMMAND_CHECKIN, COMMAND_CHECKOUT, COMMAND_LOCK, COMMAND_LSCO, COMMAND_MKATTR, COMMAND_MKBL, COMMAND_MKDIR, COMMAND_MKELEM, COMMAND_MKLABEL, COMMAND_MKLBTYPE, COMMAND_RMTYPE, COMMAND_UNCHECKOUT, COMMAND_UNLOCK, COMMAND_UPDATEFields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidexecute()Executes the task.Get comment methodGet nusers listGet list of objects to be lockedbooleanGet obsolete flag statusgetPname()Get the pathname to be lockedbooleanGet replace flag statusvoidsetComment(String comment) Sets how comments should be written for the event record(s)voidSets the users who may continue to edit the object while it is locked.voidSets the object(s) to be lockedvoidsetObjselect(String objselect) Sets the object(s) to be lockedvoidsetObsolete(boolean obsolete) If true, mark object as obsolete.voidSets the pathname to be lockedvoidsetReplace(boolean replace) If true, replace an existing lock.Methods inherited from class org.apache.tools.ant.taskdefs.optional.clearcase.ClearCasegetClearToolCommand, getFailOnErr, getObjSelect, getViewPath, getViewPathBasename, run, runS, runS, setClearToolDir, setFailOnErr, setObjSelect, setViewPathMethods inherited from class org.apache.tools.ant.TaskbindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypeMethods inherited from class org.apache.tools.ant.ProjectComponentclone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
- 
Field Details- 
FLAG_REPLACE-replace flag -- replace existing lock on object(s)- See Also:
 
- 
FLAG_NUSERS-nusers flag -- list of users to exclude from lock- See Also:
 
- 
FLAG_OBSOLETE-obsolete flag -- mark locked object as obsolete- See Also:
 
- 
FLAG_COMMENT-comment flag -- method to use for commenting events- See Also:
 
- 
FLAG_PNAME-pname flag -- pathname to lock- See Also:
 
 
- 
- 
Constructor Details- 
CCLockpublic CCLock()
 
- 
- 
Method Details- 
executeExecutes the task.Builds a command line to execute cleartool and then calls Exec's run method to execute the command line. - Overrides:
- executein class- Task
- Throws:
- BuildException- if the command fails and failonerr is set to true
 
- 
setReplacepublic void setReplace(boolean replace) If true, replace an existing lock.- Parameters:
- replace- the status to set the flag to
 
- 
getReplacepublic boolean getReplace()Get replace flag status- Returns:
- boolean containing status of replace flag
 
- 
setObsoletepublic void setObsolete(boolean obsolete) If true, mark object as obsolete.- Parameters:
- obsolete- the status to set the flag to
 
- 
getObsoletepublic boolean getObsolete()Get obsolete flag status- Returns:
- boolean containing status of obsolete flag
 
- 
setNusersSets the users who may continue to edit the object while it is locked.- Parameters:
- nusers- users excluded from lock
 
- 
getNusersGet nusers list- Returns:
- String containing the list of users excluded from lock
 
- 
setCommentSets how comments should be written for the event record(s)- Parameters:
- comment- comment method to use
 
- 
getCommentGet comment method- Returns:
- String containing the desired comment method
 
- 
setPnameSets the pathname to be locked- Parameters:
- pname- pathname to be locked
 
- 
getPnameGet the pathname to be locked- Returns:
- String containing the pathname to be locked
 
- 
setObjSelSets the object(s) to be locked- Parameters:
- objsel- objects to be locked
- Since:
- ant 1.6.1
 
- 
setObjselectSets the object(s) to be locked- Parameters:
- objselect- objects to be locked
 
- 
getObjselectGet list of objects to be locked- Returns:
- String containing the objects to be locked
 
 
-