1 18 package org.apache.tools.ant.taskdefs.optional.sos; 19 20 import org.apache.tools.ant.types.Commandline; 21 22 27 public class SOSCheckin extends SOS { 28 29 36 public final void setFile(String filename) { 37 super.setInternalFilename(filename); 38 } 39 40 45 public void setRecursive(boolean recursive) { 46 super.setInternalRecursive(recursive); 47 } 48 49 54 public void setComment(String comment) { 55 super.setInternalComment(comment); 56 } 57 58 72 protected Commandline buildCmdLine() { 73 commandLine = new Commandline(); 74 75 if (getFilename() != null) { 77 commandLine.createArgument().setValue(SOSCmd.FLAG_COMMAND); 79 commandLine.createArgument().setValue(SOSCmd.COMMAND_CHECKIN_FILE); 80 commandLine.createArgument().setValue(SOSCmd.FLAG_FILE); 82 commandLine.createArgument().setValue(getFilename()); 83 } else { 84 commandLine.createArgument().setValue(SOSCmd.FLAG_COMMAND); 86 commandLine.createArgument().setValue(SOSCmd.COMMAND_CHECKIN_PROJECT); 87 commandLine.createArgument().setValue(getRecursive()); 89 } 90 91 getRequiredAttributes(); 92 getOptionalAttributes(); 93 94 if (getComment() != null) { 96 commandLine.createArgument().setValue(SOSCmd.FLAG_COMMENT); 97 commandLine.createArgument().setValue(getComment()); 98 } 99 return commandLine; 100 } 101 } 102 | Popular Tags |