Rename RevealerFacade to Revealer

This commit is contained in:
Armin Schrenk
2021-01-21 15:29:04 +01:00
parent d5eb84a000
commit 8977440697
8 changed files with 13 additions and 14 deletions

View File

@@ -52,7 +52,7 @@ public class DokanyVolume extends AbstractVolume {
}
@Override
public void reveal(RevealerFacade revealer) throws VolumeException {
public void reveal(Revealer revealer) throws VolumeException {
try {
mount.reveal(revealer::reveal);
} catch (Exception e) {

View File

@@ -72,7 +72,7 @@ public class FuseVolume extends AbstractVolume {
}
@Override
public void reveal(RevealerFacade revealer) throws VolumeException {
public void reveal(Revealer revealer) throws VolumeException {
try {
mount.reveal(revealer::reveal);
} catch (Exception e) {

View File

@@ -148,7 +148,7 @@ public class Vault {
}
}
public void reveal(Volume.RevealerFacade vaultRevealer) throws VolumeException {
public void reveal(Volume.Revealer vaultRevealer) throws VolumeException {
volume.reveal(vaultRevealer);
}

View File

@@ -42,7 +42,7 @@ public interface Volume {
* @param revealer An object capable of revealing the location of the mounted vault to view the content (e.g. in the default file browser).
* @throws VolumeException
*/
void reveal(RevealerFacade revealer) throws VolumeException;
void reveal(Revealer revealer) throws VolumeException;
void unmount() throws VolumeException;
@@ -91,7 +91,7 @@ public interface Volume {
* Hides and unifies the different Revealer implementations in the different nio-adapters.
*/
@FunctionalInterface
interface RevealerFacade {
interface Revealer {
void reveal(Path p) throws VolumeException;

View File

@@ -73,7 +73,7 @@ public class WebDavVolume implements Volume {
}
@Override
public void reveal(RevealerFacade revealer) throws VolumeException {
public void reveal(Revealer revealer) throws VolumeException {
try {
mount.reveal(revealer::reveal);
} catch (Exception e) {

View File

@@ -15,7 +15,6 @@ import java.util.Iterator;
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
@FxApplicationScoped
@@ -30,7 +29,7 @@ public class VaultService {
this.executorService = executorService;
}
public void reveal(Vault vault, Volume.RevealerFacade vaultRevealCmd) {
public void reveal(Vault vault, Volume.Revealer vaultRevealCmd) {
executorService.execute(createRevealTask(vault, vaultRevealCmd));
}
@@ -39,7 +38,7 @@ public class VaultService {
*
* @param vault The vault to reveal
*/
public Task<Vault> createRevealTask(Vault vault, Volume.RevealerFacade vaultRevealCmd) {
public Task<Vault> createRevealTask(Vault vault, Volume.Revealer vaultRevealCmd) {
Task<Vault> task = new RevealVaultTask(vault, vaultRevealCmd);
task.setOnSucceeded(evt -> LOG.info("Revealed {}", vault.getDisplayName()));
task.setOnFailed(evt -> LOG.error("Failed to reveal " + vault.getDisplayName(), evt.getSource().getException()));
@@ -100,13 +99,13 @@ public class VaultService {
private static class RevealVaultTask extends Task<Vault> {
private final Vault vault;
private final Volume.RevealerFacade revealer;
private final Volume.Revealer revealer;
/**
* @param vault The vault to lock
* @param revealer The object to use to show the vault content to the user.
*/
public RevealVaultTask(Vault vault, Volume.RevealerFacade revealer) {
public RevealVaultTask(Vault vault, Volume.Revealer revealer) {
this.vault = vault;
this.revealer = revealer;

View File

@@ -28,11 +28,11 @@ class TrayMenuController {
private final AppLifecycleListener appLifecycle;
private final FxApplicationStarter fxApplicationStarter;
private final ObservableList<Vault> vaults;
private final Volume.RevealerFacade revealer;
private final Volume.Revealer revealer;
private final PopupMenu menu;
@Inject
TrayMenuController(ResourceBundle resourceBundle, AppLifecycleListener appLifecycle, FxApplicationStarter fxApplicationStarter, ObservableList<Vault> vaults, Volume.RevealerFacade revealer) {
TrayMenuController(ResourceBundle resourceBundle, AppLifecycleListener appLifecycle, FxApplicationStarter fxApplicationStarter, ObservableList<Vault> vaults, Volume.Revealer revealer) {
this.resourceBundle = resourceBundle;
this.appLifecycle = appLifecycle;
this.fxApplicationStarter = fxApplicationStarter;

View File

@@ -11,7 +11,7 @@ import java.io.IOException;
abstract class TrayMenuModule {
@Provides
static Volume.RevealerFacade provideAwtRevealer(){
static Volume.Revealer provideAwtRevealer(){
return p -> {
if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.OPEN)) {
try {