1 18 19 29 30 package org.apache.tools.ant.taskdefs.optional.unix; 31 32 import org.apache.tools.ant.BuildException; 33 34 41 public class Chown extends AbstractAccessTask { 42 43 private boolean haveOwner = false; 44 45 48 public Chown() { 49 super.setExecutable("chown"); 50 } 51 52 57 public void setOwner(String owner) { 58 createArg().setValue(owner); 59 haveOwner = true; 60 } 61 62 66 protected void checkConfiguration() { 67 if (!haveOwner) { 68 throw new BuildException("Required attribute owner not set in" 69 + " chown", getLocation()); 70 } 71 super.checkConfiguration(); 72 } 73 74 79 public void setExecutable(String e) { 80 throw new BuildException(getTaskType() 81 + " doesn\'t support the executable" 82 + " attribute", getLocation()); 83 } 84 } 85 | Popular Tags |