X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fde%2Ftodesbaum%2Fjsite%2Fapplication%2FProjectInserter.java;h=32c9c5bcf3e2161c1675db2c5cec862143086870;hb=9ea58e546eed711db445591dddda1b0bd0f5a09a;hp=48fd36b6ff1358560daece460b1a457e2c9df505;hpb=a8f9077b9c46646ace7c8a665f5085830cad6f81;p=jSite.git diff --git a/src/de/todesbaum/jsite/application/ProjectInserter.java b/src/de/todesbaum/jsite/application/ProjectInserter.java index 48fd36b..32c9c5b 100644 --- a/src/de/todesbaum/jsite/application/ProjectInserter.java +++ b/src/de/todesbaum/jsite/application/ProjectInserter.java @@ -40,7 +40,6 @@ import java.util.logging.Logger; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; -import de.todesbaum.jsite.application.ProjectInserter.CheckReport.Issue; import de.todesbaum.jsite.gui.FileScanner; import de.todesbaum.jsite.gui.FileScannerListener; import de.todesbaum.util.freenet.fcp2.Client; @@ -494,6 +493,7 @@ public class ProjectInserter implements FileScannerListener, Runnable { } putDir.setVerbosity(Verbosity.ALL); putDir.setMaxRetries(-1); + putDir.setEarlyEncode(false); for (String filename : files) { FileEntry fileEntry = createFileEntry(filename, edition, containerFiles); if (fileEntry != null) { @@ -549,7 +549,6 @@ public class ProjectInserter implements FileScannerListener, Runnable { } /* post-insert work */ - fireProjectInsertFinished(success, disconnected ? new IOException("Connection terminated") : null); if (success) { @SuppressWarnings("null") String editionPart = finalURI.substring(finalURI.lastIndexOf('/') + 1); @@ -557,6 +556,7 @@ public class ProjectInserter implements FileScannerListener, Runnable { project.setEdition(newEdition); project.setLastInsertionTime(System.currentTimeMillis()); } + fireProjectInsertFinished(success, disconnected ? new IOException("Connection terminated") : null); } // @@ -639,72 +639,72 @@ public class ProjectInserter implements FileScannerListener, Runnable { return issues.size(); } + } + + /** + * Container class for a single issue. An issue contains an error key + * that describes the error, and a fatality flag that determines whether + * the insert has to be aborted (if the flag is {@code true}) or if it + * can still be performed and only a warning should be generated (if the + * flag is {@code false}). + * + * @author David ‘Bombe’ + * Roden + */ + public static class Issue { + + /** The error key. */ + private final String errorKey; + + /** The fatality flag. */ + private final boolean fatal; + + /** Additional parameters. */ + private String[] parameters; + /** - * Container class for a single issue. An issue contains an error key - * that describes the error, and a fatality flag that determines whether - * the insert has to be aborted (if the flag is {@code true}) or if it - * can still be performed and only a warning should be generated (if the - * flag is {@code false}). + * Creates a new issue. * - * @author David ‘Bombe’ - * Roden + * @param errorKey + * The error key + * @param fatal + * The fatality flag + * @param parameters + * Any additional parameters */ - public static class Issue { - - /** The error key. */ - private final String errorKey; - - /** The fatality flag. */ - private final boolean fatal; - - /** Additional parameters. */ - private String[] parameters; - - /** - * Creates a new issue. - * - * @param errorKey - * The error key - * @param fatal - * The fatality flag - * @param parameters - * Any additional parameters - */ - protected Issue(String errorKey, boolean fatal, String... parameters) { - this.errorKey = errorKey; - this.fatal = fatal; - this.parameters = parameters; - } - - /** - * Returns the key of the encountered error. - * - * @return The error key - */ - public String getErrorKey() { - return errorKey; - } + protected Issue(String errorKey, boolean fatal, String... parameters) { + this.errorKey = errorKey; + this.fatal = fatal; + this.parameters = parameters; + } - /** - * Returns whether the issue is fatal and the insert has to be - * aborted. Otherwise only a warning should be shown. - * - * @return {@code true} if the insert needs to be aborted, {@code - * false} otherwise - */ - public boolean isFatal() { - return fatal; - } + /** + * Returns the key of the encountered error. + * + * @return The error key + */ + public String getErrorKey() { + return errorKey; + } - /** - * Returns any additional parameters. - * - * @return The additional parameters - */ - public String[] getParameters() { - return parameters; - } + /** + * Returns whether the issue is fatal and the insert has to be + * aborted. Otherwise only a warning should be shown. + * + * @return {@code true} if the insert needs to be aborted, {@code + * false} otherwise + */ + public boolean isFatal() { + return fatal; + } + /** + * Returns any additional parameters. + * + * @return The additional parameters + */ + public String[] getParameters() { + return parameters; } }