private DirectorFactory() {
// DO NOT USE
}
public static Director createNewDirector(DirectorType dType, Workspace wspace) throws Exception {
Director result = null;
if (DirectorType.RECORDING.equals(dType)) {
result = new RecordingDirector(wspace);
} else if (DirectorType.SOLEILSTD.equals(dType)) {
result = new BasicDirector(wspace);
}
// Added to avoid FindBugs bug JC Pret Jan 2011
else
{
throw new IllegalArgumentException("Unknown director type");
}
// End JCP
result.setClassName("Bossanova Director");
Parameter directorParam = (Parameter) result.getAttribute("Properties File", Parameter.class);
directorParam.setExpression(Configuration.getPasserelleConfDirectory() + "systemproperties.txt");
return result;
}