Search in sources :

Example 1 with EXPORT

use of org.opendatakit.briefcase.model.FormStatus.TransferType.EXPORT in project briefcase by opendatakit.

the class ExportPanel method export.

private void export() {
    form.disableUI();
    terminationFuture.reset();
    forms.getSelectedForms().parallelStream().peek(FormStatus::clearStatusHistory).forEach(form -> {
        String formId = form.getFormDefinition().getFormId();
        ExportConfiguration configuration = forms.getConfiguration(formId);
        if (configuration.resolvePullBefore())
            forms.getTransferSettings(formId).ifPresent(sci -> NewTransferAction.transferServerToBriefcase(sci, terminationFuture, Collections.singletonList(form)));
        ExportAction.export((BriefcaseFormDefinition) form.getFormDefinition(), configuration, terminationFuture);
    });
    form.enableUI();
}
Also used : ConfigurationPanel(org.opendatakit.briefcase.ui.export.components.ConfigurationPanel) TransferSucceededEvent(org.opendatakit.briefcase.model.TransferSucceededEvent) ExportProgressEvent(org.opendatakit.briefcase.model.ExportProgressEvent) LocalDateTime(java.time.LocalDateTime) BriefcasePreferences(org.opendatakit.briefcase.model.BriefcasePreferences) EXPORT(org.opendatakit.briefcase.model.FormStatus.TransferType.EXPORT) ExportFailedEvent(org.opendatakit.briefcase.model.ExportFailedEvent) BriefcaseFormDefinition(org.opendatakit.briefcase.model.BriefcaseFormDefinition) AnnotationProcessor(org.bushe.swing.event.annotation.AnnotationProcessor) ExportConfiguration(org.opendatakit.briefcase.export.ExportConfiguration) ISO_DATE_TIME(java.time.format.DateTimeFormatter.ISO_DATE_TIME) SavePasswordsConsentRevoked(org.opendatakit.briefcase.model.SavePasswordsConsentRevoked) ExportForms(org.opendatakit.briefcase.export.ExportForms) ExportSucceededWithErrorsEvent(org.opendatakit.briefcase.model.ExportSucceededWithErrorsEvent) FileSystemUtils(org.opendatakit.briefcase.util.FileSystemUtils) ExportSucceededEvent(org.opendatakit.briefcase.model.ExportSucceededEvent) ExportForms.buildCustomConfPrefix(org.opendatakit.briefcase.export.ExportForms.buildCustomConfPrefix) FormStatus(org.opendatakit.briefcase.model.FormStatus) FormStatusEvent(org.opendatakit.briefcase.model.FormStatusEvent) Executor(java.util.concurrent.Executor) ExportAction(org.opendatakit.briefcase.export.ExportAction) SavePasswordsConsentGiven(org.opendatakit.briefcase.model.SavePasswordsConsentGiven) Collectors.joining(java.util.stream.Collectors.joining) NewTransferAction(org.opendatakit.briefcase.transfer.NewTransferAction) TerminationFuture(org.opendatakit.briefcase.model.TerminationFuture) Collectors.toList(java.util.stream.Collectors.toList) ODKOptionPane.showErrorDialog(org.opendatakit.briefcase.ui.ODKOptionPane.showErrorDialog) List(java.util.List) Stream(java.util.stream.Stream) EventSubscriber(org.bushe.swing.event.annotation.EventSubscriber) Analytics(org.opendatakit.briefcase.ui.reused.Analytics) Collections(java.util.Collections) ExportConfiguration(org.opendatakit.briefcase.export.ExportConfiguration)

Aggregations

LocalDateTime (java.time.LocalDateTime)1 ISO_DATE_TIME (java.time.format.DateTimeFormatter.ISO_DATE_TIME)1 Collections (java.util.Collections)1 List (java.util.List)1 Executor (java.util.concurrent.Executor)1 Collectors.joining (java.util.stream.Collectors.joining)1 Collectors.toList (java.util.stream.Collectors.toList)1 Stream (java.util.stream.Stream)1 AnnotationProcessor (org.bushe.swing.event.annotation.AnnotationProcessor)1 EventSubscriber (org.bushe.swing.event.annotation.EventSubscriber)1 ExportAction (org.opendatakit.briefcase.export.ExportAction)1 ExportConfiguration (org.opendatakit.briefcase.export.ExportConfiguration)1 ExportForms (org.opendatakit.briefcase.export.ExportForms)1 ExportForms.buildCustomConfPrefix (org.opendatakit.briefcase.export.ExportForms.buildCustomConfPrefix)1 BriefcaseFormDefinition (org.opendatakit.briefcase.model.BriefcaseFormDefinition)1 BriefcasePreferences (org.opendatakit.briefcase.model.BriefcasePreferences)1 ExportFailedEvent (org.opendatakit.briefcase.model.ExportFailedEvent)1 ExportProgressEvent (org.opendatakit.briefcase.model.ExportProgressEvent)1 ExportSucceededEvent (org.opendatakit.briefcase.model.ExportSucceededEvent)1 ExportSucceededWithErrorsEvent (org.opendatakit.briefcase.model.ExportSucceededWithErrorsEvent)1