private String fileName;
public void handleEvent(ProjectEvent event) throws CruiseControlException {
if (event instanceof ProjectStateChangedEvent) {
final ProjectStateChangedEvent stateChanged = (ProjectStateChangedEvent) event;
final ProjectState newState = stateChanged.getNewState();
LOG.debug("updating status to " + newState.getName() + " for project " + stateChanged.getProjectName());
final String text = newState.getDescription() + " since\n";
CurrentBuildFileWriter.writefile(text, new Date(), fileName);
} else {
// ignore other ProjectEvents
LOG.debug("ignoring event " + event.getClass().getName() + " for project " + event.getProjectName());
}