}
@Override
public void delete() throws ModelUpdateException
{
Logger logger = rootNode.logger(Node.class);
try {
if(!dirExists()) throw new NoSuchDirectoryException(this);
try {
FileUtils.deleteDirectory(dir);
logger.debug(Messages.NODE_DELETED_LOG_MSG, getTypeName(), dir.getPath());
notifyObservers(new NodeDeletedEvent(), this);
}
catch(IOException e) {
throw new ModelUpdateException(e);
}
}
catch(Exception e) {
logger.error(Messages.NODE_DELETION_FAILED_LOG_MSG, getTypeName(), dir().getPath());
throw e;
}
}