if(parameter == null){
throw new TracException(MessageUtils.getMessage("core.parameter.not.found", "Milestone", this.getClass().getName()));
}
Milestone milestone = (Milestone)parameter;
// check for mandatory fields
String name = milestone.getName();
if(name == null || name.trim().equals("")){
throw new TracException(MessageUtils.getMessage("core.parameter.not.found", "Milestone.name", this.getClass().getName()));
}
Date due = milestone.getDue();
if(due == null){
throw new TracException(MessageUtils.getMessage("core.parameter.not.found", "Milestone.due", this.getClass().getName()));
}
String description = milestone.getDescription();
if(description == null){
description = "";
}