1 18 19 package org.apache.tools.ant.taskdefs.optional.vss; 20 21 import org.apache.tools.ant.BuildException; 22 import org.apache.tools.ant.types.Commandline; 23 import org.apache.tools.ant.types.Path; 24 25 30 public class MSVSSADD extends MSVSS { 31 32 private String localPath = null; 33 34 38 protected Commandline buildCmdLine() { 39 Commandline commandLine = new Commandline(); 40 41 if (getLocalpath() == null) { 43 String msg = "localPath attribute must be set!"; 44 throw new BuildException(msg, getLocation()); 45 } 46 47 commandLine.setExecutable(getSSCommand()); 51 commandLine.createArgument().setValue(COMMAND_ADD); 52 53 commandLine.createArgument().setValue(getLocalpath()); 55 commandLine.createArgument().setValue(getAutoresponse()); 57 commandLine.createArgument().setValue(getRecursive()); 59 commandLine.createArgument().setValue(getWritable()); 61 commandLine.createArgument().setValue(getLogin()); 63 commandLine.createArgument().setValue(getComment()); 65 66 return commandLine; 67 } 68 69 74 protected String getLocalpath() { 75 return localPath; 76 } 77 78 83 public void setRecursive(boolean recursive) { 84 super.setInternalRecursive(recursive); 85 } 86 87 92 public final void setWritable(boolean writable) { 93 super.setInternalWritable(writable); 94 } 95 96 101 public void setAutoresponse(String response) { 102 super.setInternalAutoResponse(response); 103 } 104 105 110 public void setComment(String comment) { 111 super.setInternalComment(comment); 112 } 113 114 119 public void setLocalpath(Path localPath) { 120 this.localPath = localPath.toString(); 121 } 122 } 123 | Popular Tags |