Search in sources :

Example 1 with FileInfo

use of org.openremote.model.file.FileInfo in project openremote by openremote.

the class ProtocolDiscoveryView method doDiscoveryImport.

protected void doDiscoveryImport(String name, String data, boolean binary) {
    fileUpload.clearInput();
    setDisabled(true);
    fileUpload.setText(environment.getMessages().importInProgress());
    FileInfo fileInfo = new FileInfo(name, data, binary);
    DiscoveryRequest discoveryRequest = new DiscoveryRequest(attribute.getName().orElse(""), importParentId, importRealmId, fileInfo);
    if (discoveryRequestConsumer != null) {
        discoveryRequestConsumer.accept(discoveryRequest, () -> {
            fileUpload.setText(environment.getMessages().uploadProtocolFile());
            setDisabled(false);
        });
    }
}
Also used : FileInfo(org.openremote.model.file.FileInfo)

Aggregations

FileInfo (org.openremote.model.file.FileInfo)1