use of com.revolsys.record.io.RecordStoreConnection in project com.revolsys.open by revolsys.
the class RecordStoreConnectionForm method addHandlers.
public static void addHandlers() {
RecordStoreConnectionManager.setInvalidRecordStoreFunction((connection, exception) -> {
return Invoke.andWait(() -> {
final RecordStoreConnectionRegistry registry = connection.getRegistry();
final RecordStoreConnectionForm form = new RecordStoreConnectionForm(registry, connection, exception);
return form.showDialog();
});
});
RecordStoreConnectionManager.setMissingRecordStoreFunction((name) -> {
final RecordStoreConnectionRegistry registry = RecordStoreConnectionManager.get().getUserConnectionRegistry();
Invoke.andWait(() -> {
final RecordStoreConnectionForm form = new RecordStoreConnectionForm(registry, name);
form.showDialog();
});
final RecordStoreConnection connection = registry.getConnection(name);
if (connection == null) {
return null;
} else {
return connection.getRecordStore();
}
});
}
Aggregations