Bladeren bron

moved vault upgrade classes to custom package with custom log config

Sebastian Stenzel 6 jaren geleden
bovenliggende
commit
fe722629be

+ 2 - 2
main/ui/src/main/java/org/cryptomator/ui/controllers/MainController.java

@@ -52,8 +52,8 @@ import org.cryptomator.ui.controls.DirectoryListCell;
 import org.cryptomator.ui.l10n.Localization;
 import org.cryptomator.ui.model.AppLaunchEvent;
 import org.cryptomator.ui.model.AutoUnlocker;
-import org.cryptomator.ui.model.UpgradeStrategies;
-import org.cryptomator.ui.model.UpgradeStrategy;
+import org.cryptomator.ui.model.upgrade.UpgradeStrategies;
+import org.cryptomator.ui.model.upgrade.UpgradeStrategy;
 import org.cryptomator.ui.model.Vault;
 import org.cryptomator.ui.model.VaultFactory;
 import org.cryptomator.ui.model.VaultList;

+ 3 - 3
main/ui/src/main/java/org/cryptomator/ui/controllers/UpgradeController.java

@@ -22,9 +22,9 @@ import javafx.scene.control.Label;
 import javafx.scene.control.ProgressIndicator;
 import javafx.scene.layout.GridPane;
 import org.cryptomator.ui.controls.SecPasswordField;
-import org.cryptomator.ui.model.UpgradeStrategies;
-import org.cryptomator.ui.model.UpgradeStrategy;
-import org.cryptomator.ui.model.UpgradeStrategy.UpgradeFailedException;
+import org.cryptomator.ui.model.upgrade.UpgradeStrategies;
+import org.cryptomator.ui.model.upgrade.UpgradeStrategy;
+import org.cryptomator.ui.model.upgrade.UpgradeStrategy.UpgradeFailedException;
 import org.cryptomator.ui.model.Vault;
 import org.cryptomator.ui.util.Tasks;
 import org.fxmisc.easybind.EasyBind;

+ 2 - 1
main/ui/src/main/java/org/cryptomator/ui/model/UpgradeStrategies.java

@@ -3,9 +3,10 @@
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the accompanying LICENSE file.
  *******************************************************************************/
-package org.cryptomator.ui.model;
+package org.cryptomator.ui.model.upgrade;
 
 import org.cryptomator.common.FxApplicationScoped;
+import org.cryptomator.ui.model.Vault;
 
 import javax.inject.Inject;
 import java.util.Arrays;

+ 2 - 1
main/ui/src/main/java/org/cryptomator/ui/model/UpgradeStrategy.java

@@ -3,7 +3,7 @@
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the accompanying LICENSE file.
  *******************************************************************************/
-package org.cryptomator.ui.model;
+package org.cryptomator.ui.model.upgrade;
 
 import java.io.IOException;
 import java.nio.file.Files;
@@ -19,6 +19,7 @@ import org.cryptomator.cryptolib.api.InvalidPassphraseException;
 import org.cryptomator.cryptolib.api.KeyFile;
 import org.cryptomator.cryptolib.api.UnsupportedVaultFormatException;
 import org.cryptomator.ui.l10n.Localization;
+import org.cryptomator.ui.model.Vault;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

+ 2 - 1
main/ui/src/main/java/org/cryptomator/ui/model/UpgradeVersion3DropBundleExtension.java

@@ -3,7 +3,7 @@
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the accompanying LICENSE file.
  *******************************************************************************/
-package org.cryptomator.ui.model;
+package org.cryptomator.ui.model.upgrade;
 
 import javafx.application.Platform;
 import org.apache.commons.lang3.StringUtils;
@@ -11,6 +11,7 @@ import org.cryptomator.common.FxApplicationScoped;
 import org.cryptomator.cryptolib.Cryptors;
 import org.cryptomator.cryptolib.api.Cryptor;
 import org.cryptomator.ui.l10n.Localization;
+import org.cryptomator.ui.model.Vault;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

+ 2 - 1
main/ui/src/main/java/org/cryptomator/ui/model/UpgradeVersion3to4.java

@@ -3,7 +3,7 @@
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the accompanying LICENSE file.
  *******************************************************************************/
-package org.cryptomator.ui.model;
+package org.cryptomator.ui.model.upgrade;
 
 import com.google.common.io.BaseEncoding;
 import org.apache.commons.lang3.StringUtils;
@@ -12,6 +12,7 @@ import org.cryptomator.cryptolib.Cryptors;
 import org.cryptomator.cryptolib.api.Cryptor;
 import org.cryptomator.cryptolib.common.MessageDigestSupplier;
 import org.cryptomator.ui.l10n.Localization;
+import org.cryptomator.ui.model.Vault;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

+ 2 - 1
main/ui/src/main/java/org/cryptomator/ui/model/UpgradeVersion4to5.java

@@ -3,13 +3,14 @@
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the accompanying LICENSE file.
  *******************************************************************************/
-package org.cryptomator.ui.model;
+package org.cryptomator.ui.model.upgrade;
 
 import org.cryptomator.common.FxApplicationScoped;
 import org.cryptomator.cryptolib.Cryptors;
 import org.cryptomator.cryptolib.api.Cryptor;
 import org.cryptomator.cryptolib.api.FileHeader;
 import org.cryptomator.ui.l10n.Localization;
+import org.cryptomator.ui.model.Vault;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

+ 2 - 1
main/ui/src/main/java/org/cryptomator/ui/model/UpgradeVersion5toX.java

@@ -3,7 +3,7 @@
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the accompanying LICENSE file.
  *******************************************************************************/
-package org.cryptomator.ui.model;
+package org.cryptomator.ui.model.upgrade;
 
 import org.cryptomator.common.FxApplicationScoped;
 import org.cryptomator.cryptofs.migration.Migrators;
@@ -12,6 +12,7 @@ import org.cryptomator.cryptolib.Cryptors;
 import org.cryptomator.cryptolib.api.Cryptor;
 import org.cryptomator.cryptolib.api.InvalidPassphraseException;
 import org.cryptomator.ui.l10n.Localization;
+import org.cryptomator.ui.model.Vault;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

+ 5 - 2
main/ui/src/test/java/org/cryptomator/ui/model/UpgradeVersion3to4Test.java

@@ -1,10 +1,13 @@
-package org.cryptomator.ui.model;
+package org.cryptomator.ui.model.upgrade;
 
 import com.google.common.jimfs.Configuration;
 import com.google.common.jimfs.Jimfs;
 import org.cryptomator.ui.l10n.Localization;
 import org.cryptomator.ui.l10n.LocalizationMock;
-import org.cryptomator.ui.model.UpgradeStrategy.UpgradeFailedException;
+import org.cryptomator.ui.model.Vault;
+import org.cryptomator.ui.model.upgrade.UpgradeStrategy;
+import org.cryptomator.ui.model.upgrade.UpgradeStrategy.UpgradeFailedException;
+import org.cryptomator.ui.model.upgrade.UpgradeVersion3to4;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.BeforeEach;