use of org.opendatakit.briefcase.model.FormStatus in project briefcase by opendatakit.
the class ExportForms method appendStatus.
public void appendStatus(IFormDefinition formDefinition, String statusUpdate, boolean successful) {
FormStatus form = getForm(formDefinition);
form.setStatusString(statusUpdate, successful);
if (successful) {
LocalDateTime exportDate = LocalDateTime.now();
String formId = getFormId(form);
lastExportDateTimes.put(formId, exportDate);
onSuccessfulExportCallbacks.forEach(callback -> callback.accept(formId, exportDate));
}
}
use of org.opendatakit.briefcase.model.FormStatus in project briefcase by opendatakit.
the class FormsTableViewModel method setValueAt.
@Override
// Suppressing next ParameterName checkstyle error becasue 'aValue' param triggers it by mistake
@SuppressWarnings("checkstyle:ParameterName")
public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
FormStatus form = forms.get(rowIndex);
switch(columnIndex) {
case FormsTableView.SELECTED_CHECKBOX_COL:
Boolean isSelected = (Boolean) aValue;
form.setSelected(isSelected);
triggerChange();
break;
case FormsTableView.EXPORT_STATUS_COL:
form.setStatusString((String) aValue, true);
break;
default:
throw new IllegalStateException("unexpected column choice");
}
fireTableCellUpdated(rowIndex, columnIndex);
}
Aggregations