Subversion Repositories bacoAlunos

Compare Revisions

Ignore whitespace Rev 996 → Rev 997

/impl/src/java/pt/estgp/estgweb/services/sigesimports/ImportSumariesJson.java
325,18 → 325,26
*/
public static void main(String[] args) throws ServiceException, JSONException {
 
System.out.println("Syntax:");
System.out.println("year, semestre, sendIonline, sendEmail");
System.out.println("If no arguments wil user actual year import config in all semestres and true in email and ionline");
 
String year = DaoFactory.getConfigurationDaoImpl().getImportsDefaultImportYearCreateTransaction();
String semestre = null;
boolean sendIonline = true;
boolean sendEmail = true;
if(args != null && args.length > 0)
year = args[0];
 
if(args != null && args.length > 1)
semestre = args[1];
 
if(args != null && args.length > 2)
sendIonline = Boolean.parseBoolean(args[2]);
 
if(args != null && args.length > 3)
sendEmail = Boolean.parseBoolean(args[3]);
 
AbstractDao.getCurrentSession().beginTransaction();
if(semestre != null)
new ImportSumariesJson().run(year,semestre,sendIonline,sendEmail);