1 18 package org.apache.tools.ant.taskdefs.optional.sos; 19 20 import org.apache.tools.ant.BuildException; 21 import org.apache.tools.ant.types.Commandline; 22 23 28 public class SOSLabel extends SOS { 29 30 35 public void setVersion(String version) { 36 super.setInternalVersion(version); 37 } 38 39 46 public void setLabel(String label) { 47 super.setInternalLabel(label); 48 } 49 50 55 public void setComment(String comment) { 56 super.setInternalComment(comment); 57 } 58 59 66 protected Commandline buildCmdLine() { 67 commandLine = new Commandline(); 68 69 commandLine.createArgument().setValue(SOSCmd.FLAG_COMMAND); 71 commandLine.createArgument().setValue(SOSCmd.COMMAND_LABEL); 72 73 getRequiredAttributes(); 74 75 if (getLabel() == null) { 77 throw new BuildException("label attribute must be set!", getLocation()); 78 } 79 commandLine.createArgument().setValue(SOSCmd.FLAG_LABEL); 80 commandLine.createArgument().setValue(getLabel()); 81 82 commandLine.createArgument().setValue(getVerbose()); 84 if (getComment() != null) { 86 commandLine.createArgument().setValue(SOSCmd.FLAG_COMMENT); 87 commandLine.createArgument().setValue(getComment()); 88 } 89 return commandLine; 90 } 91 } 92 | Popular Tags |