X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fde%2Ftodesbaum%2Fjsite%2Fmain%2FConfiguration.java;h=e98a18dc51d7e445199bfc5a3d049cfde17cc388;hb=3663f967a6d105d079be90c512048e9fe2bf05d1;hp=9d288b5fdb7a213279ed227a91ffd7f5b5b4196b;hpb=e2e553c23e712178421dbedae7308466fc23c9c9;p=jSite.git diff --git a/src/de/todesbaum/jsite/main/Configuration.java b/src/de/todesbaum/jsite/main/Configuration.java index 9d288b5..e98a18d 100644 --- a/src/de/todesbaum/jsite/main/Configuration.java +++ b/src/de/todesbaum/jsite/main/Configuration.java @@ -343,6 +343,11 @@ public class Configuration { project.setEdition(Integer.parseInt(projectNode.getNode("edition").getValue("0"))); project.setInsertURI(projectNode.getNode("insert-uri").getValue("")); project.setRequestURI(projectNode.getNode("request-uri").getValue("")); + if (projectNode.getNode("ignore-hidden-files") != null) { + project.setIgnoreHiddenFiles(Boolean.parseBoolean(projectNode.getNode("ignore-hidden-files").getValue("true"))); + } else { + project.setIgnoreHiddenFiles(true); + } SimpleXML fileOptionsNode = projectNode.getNode("file-options"); Map fileOptions = new HashMap(); if (fileOptionsNode != null) { @@ -351,7 +356,13 @@ public class Configuration { String filename = fileOptionNode.getNode("filename").getValue(); FileOption fileOption = project.getFileOption(filename); fileOption.setInsert(Boolean.parseBoolean(fileOptionNode.getNode("insert").getValue())); + if (fileOptionNode.getNode("insert-redirect") != null) { + fileOption.setInsertRedirect(Boolean.parseBoolean(fileOptionNode.getNode("insert-redirect").getValue())); + } fileOption.setCustomKey(fileOptionNode.getNode("custom-key").getValue("")); + if (fileOptionNode.getNode("changed-name") != null) { + fileOption.setChangedName(fileOptionNode.getNode("changed-name").getValue()); + } fileOption.setMimeType(fileOptionNode.getNode("mime-type").getValue("")); fileOption.setContainer(fileOptionNode.getNode("container").getValue()); if (fileOptionNode.getNode("replace-edition") != null) { @@ -389,6 +400,7 @@ public class Configuration { projectNode.append("path", project.getPath()); projectNode.append("insert-uri", project.getInsertURI()); projectNode.append("request-uri", project.getRequestURI()); + projectNode.append("ignore-hidden-files", String.valueOf(project.isIgnoreHiddenFiles())); SimpleXML fileOptionsNode = projectNode.append("file-options"); Iterator> entries = project.getFileOptions().entrySet().iterator(); while (entries.hasNext()) { @@ -398,7 +410,9 @@ public class Configuration { SimpleXML fileOptionNode = fileOptionsNode.append("file-option"); fileOptionNode.append("filename", entry.getKey()); fileOptionNode.append("insert", String.valueOf(fileOption.isInsert())); + fileOptionNode.append("insert-redirect", String.valueOf(fileOption.isInsertRedirect())); fileOptionNode.append("custom-key", fileOption.getCustomKey()); + fileOptionNode.append("changed-name", fileOption.getChangedName()); fileOptionNode.append("mime-type", fileOption.getMimeType()); fileOptionNode.append("container", fileOption.getContainer()); fileOptionNode.append("replace-edition", String.valueOf(fileOption.getReplaceEdition()));