1 37 package net.sourceforge.cruisecontrol.bootstrappers; 38 39 import net.sourceforge.cruisecontrol.Bootstrapper; 40 import net.sourceforge.cruisecontrol.CruiseControlException; 41 import net.sourceforge.cruisecontrol.util.CurrentBuildFileWriter; 42 import net.sourceforge.cruisecontrol.util.ValidationHelper; 43 44 import org.apache.log4j.Logger; 45 46 import java.util.Date ; 47 48 57 public class CurrentBuildStatusBootstrapper implements Bootstrapper { 58 private static final Logger LOG = Logger.getLogger(CurrentBuildStatusBootstrapper.class); 59 60 private String fileName; 61 62 public CurrentBuildStatusBootstrapper() { 63 LOG.warn("CurrentBuildStatusBootstrapper was obsoleted by CurrentBuildStatusListener"); 64 } 65 66 public void setFile(String fileName) { 67 this.fileName = fileName; 68 } 69 70 public void bootstrap() throws CruiseControlException { 71 CurrentBuildFileWriter.writefile("Current Build Started At:\n", new Date (), fileName); 72 } 73 74 public void validate() throws CruiseControlException { 75 ValidationHelper.assertIsSet(fileName, "file", this.getClass()); 76 CurrentBuildFileWriter.validate(fileName); 77 } 78 } 79 | Popular Tags |