1 18 package org.apache.tools.ant.taskdefs.optional.sos; 19 20 import org.apache.tools.ant.types.Commandline; 21 22 27 public class SOSCheckout 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 61 protected Commandline buildCmdLine() { 62 commandLine = new Commandline(); 63 64 if (getFilename() != null) { 66 commandLine.createArgument().setValue(SOSCmd.FLAG_COMMAND); 68 commandLine.createArgument().setValue(SOSCmd.COMMAND_CHECKOUT_FILE); 69 commandLine.createArgument().setValue(SOSCmd.FLAG_FILE); 71 commandLine.createArgument().setValue(getFilename()); 72 } else { 73 commandLine.createArgument().setValue(SOSCmd.FLAG_COMMAND); 75 commandLine.createArgument().setValue(SOSCmd.COMMAND_CHECKOUT_PROJECT); 76 commandLine.createArgument().setValue(getRecursive()); 78 } 79 80 getRequiredAttributes(); 81 getOptionalAttributes(); 82 83 return commandLine; 84 } 85 } 86 | Popular Tags |