use of org.openforis.collect.reporting.ReportingRepositoriesGeneratorJob in project collect by openforis.
the class SaikuController method generateRepository.
@RequestMapping(value = "datasources/{surveyName}/generate", method = POST)
@ResponseBody
public JobProxy generateRepository(@PathVariable String surveyName, @RequestParam String language) throws CollectRdbException, SQLException {
CollectSurvey survey = surveyManager.get(surveyName);
ReportingRepositoriesGeneratorJob job = jobManager.createJob(ReportingRepositoriesGeneratorJob.class);
job.setInput(new Input(language));
job.setSurvey(survey);
jobManager.startSurveyJob(job);
return new JobProxy(job);
}
use of org.openforis.collect.reporting.ReportingRepositoriesGeneratorJob in project collect by openforis.
the class SaikuService method generateRdb.
@Secured(USER)
public JobProxy generateRdb(final String surveyName, final String preferredLanguage) {
CollectSurvey survey = surveyManager.get(surveyName);
ReportingRepositoriesGeneratorJob job = jobManager.createJob(ReportingRepositoriesGeneratorJob.class);
job.setInput(new Input(preferredLanguage));
job.setSurvey(survey);
jobManager.startSurveyJob(job);
return new JobProxy(job);
}
Aggregations