package pt.utl.ist.scripts.runOnce.thesis; import java.util.Set; import net.sourceforge.fenixedu.domain.thesis.Thesis; import net.sourceforge.fenixedu.domain.thesis.ThesisSite; import net.sourceforge.fenixedu.domain.thesis.ThesisState; import pt.utl.ist.scripts.commons.AtomicScript; public class GenerateThesisSites extends AtomicScript { @Override protected void run() throws Exception { Set theses = rootDomainObject.getThesesSet(); for (Thesis thesis : theses) { if (thesis.getState().equals(ThesisState.EVALUATED) && thesis.isFinalAndApprovedThesis()) { new ThesisSite(thesis); } } } public static void main(String[] args) { processWriteTransaction(new GenerateThesisSites()); System.exit(0); } }