public String execute() throws Exception { String[] importItemIds = selectionManager.getListObject(); if (importItemIds == null) { message = i18n.getString("choose_import_item"); return ERROR; } OrganisationUnit organisationUnit = organisationUnitSelectionManager.getSelectedOrganisationUnit(); if (organisationUnit != null) { Period period = periodGenericManager.getSelectedPeriod(); Set<DataValue> oldDataValues = new HashSet<DataValue>(); Set<DataValue> newDataValues = new HashSet<DataValue>(); executeToImport(organisationUnit, period, importItemIds, oldDataValues, newDataValues); selectionManager.setOldDataValueList(oldDataValues); selectionManager.setNewDataValueList(newDataValues); } message = i18n.getString("import_successfully"); return SUCCESS; }
@Override public String execute() throws Exception { bookmarks = new ArrayList<Bookmark>(bookmarkService.getAllBookmark(selectionManager.getBookmarkType())); return SUCCESS; }
public String execute() throws Exception { // --------------------------------------------------------------------- // Get File Excel // --------------------------------------------------------------------- String path = selectionManager.getUploadFilePath(); if (path != null && path != "") { fileExcel = new File(path); } // --------------------------------------------------------------------- // Validate selected OrganisationUnit // --------------------------------------------------------------------- organisationUnit = organisationUnitSelectionManager.getSelectedOrganisationUnit(); if (organisationUnit == null) { return SUCCESS; } // --------------------------------------------------------------------- // Load and sort ImportReports // --------------------------------------------------------------------- importReports = new ArrayList<ImportReport>(importReportService.getImportReports(organisationUnit)); return SUCCESS; }
@Override public String execute() throws Exception { message = ""; File templateDirectory = reportLocationManager.getExportReportTemplateDirectory(); File curFile = new File(templateDirectory + File.separator + curFileName); File newFile = new File(templateDirectory + File.separator + newFileName); selectionManager.setRenameFilePath(curFile.getAbsolutePath()); if (rename(curFile, newFile)) { message = i18n.getString("rename_successful"); } else { message = i18n.getString("rename_failed"); return ERROR; } if (renamingMode.equals("RNUS")) { return NONE; } return SUCCESS; }