@@ -1,5 +1,5 @@
/*
* Copyright 2003-2004 The Apache Software Foundation
* Copyright 2003-2004, 2006 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,7 +27,6 @@ import org.apache.tools.ant.types.Commandline;
* comment field doesn't include all options yet
*/
/**
* Performs a ClearCase Unlock command.
*
@@ -70,7 +69,6 @@ import org.apache.tools.ant.types.Commandline;
public class CCUnlock extends ClearCase {
private String mComment = null;
private String mPname = null;
private String mObjselect = null;
/**
* Executes the task.
@@ -115,20 +113,20 @@ public class CCUnlock extends ClearCase {
/**
* Check the command line options.
*/
private void checkOptions(Commandline cmd) {
private void checkOptions(Commandline cmd) {
// ClearCase items
getCommentCommand(cmd);
if (getObjs elect() == null && getPname() == null) {
if (getObjS elect() == null && getPname() == null) {
throw new BuildException("Should select either an element "
+ "(pname) or an object (objselect)");
}
getPnameCommand(cmd);
// object selector
if (getObjs elect() != null) {
cmd.createArgument().setValue(getObjs elect());
if (getObjS elect() != null) {
cmd.createArgument().setValue(getObjS elect());
}
}
}
/**
* Sets how comments should be written
@@ -173,7 +171,7 @@ private void checkOptions(Commandline cmd) {
* @param objselect objects to be locked
*/
public void setObjselect(String objselect) {
mObjselect = objselect ;
setObjSelect(objselect) ;
}
/**
@@ -183,7 +181,7 @@ private void checkOptions(Commandline cmd) {
* @since ant 1.6.1
*/
public void setObjSel(String objsel) {
mObjselect = objsel ;
setObjSelect(objsel) ;
}
/**
@@ -192,10 +190,9 @@ private void checkOptions(Commandline cmd) {
* @return String containing the objects to be locked
*/
public String getObjselect() {
return mObjselect ;
return getObjSelect() ;
}
/**
* Get the 'comment' command
*
@@ -246,7 +243,7 @@ private void checkOptions(Commandline cmd) {
if (getPname() != null) {
return getPname();
} else {
return getObjs elect();
return getObjS elect();
}
}