|
@@ -51,20 +51,25 @@ public class LockWorkflow extends Task<Void> {
|
|
|
|
|
|
@Override
|
|
|
protected Void call() throws Volume.VolumeException, InterruptedException, LockNotCompletedException {
|
|
|
+ lock(false);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ private void lock(boolean forced) throws InterruptedException {
|
|
|
try {
|
|
|
- vault.lock(false);
|
|
|
+ vault.lock(forced);
|
|
|
} catch (Volume.VolumeException | LockNotCompletedException e) {
|
|
|
- LOG.debug("Regular lock of {} failed.", vault.getDisplayName(), e);
|
|
|
+ LOG.info("Locking {} failed (forced: {}).", vault.getDisplayName(), forced, e);
|
|
|
var decision = askUserForAction();
|
|
|
switch (decision) {
|
|
|
- case FORCE -> vault.lock(true);
|
|
|
+ case FORCE -> lock(true);
|
|
|
case CANCEL -> cancel(false);
|
|
|
}
|
|
|
}
|
|
|
- return null;
|
|
|
}
|
|
|
|
|
|
private LockModule.ForceLockDecision askUserForAction() throws InterruptedException {
|
|
|
+ forceLockDecisionLock.reset(null);
|
|
|
// show forcedLock dialogue ...
|
|
|
Platform.runLater(() -> {
|
|
|
lockWindow.setScene(lockForcedScene.get());
|