Update year in copyright headers.
[jSite.git] / src / main / java / de / todesbaum / jsite / main / Configuration.java
index 0cc7750..2a27e89 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * jSite - Configuration.java - Copyright © 2006–2012 David Roden
+ * jSite - Configuration.java - Copyright © 2006–2014 David Roden
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -307,7 +307,7 @@ public class Configuration {
         *
         * @return A list of all projects
         */
-       public Project[] getProjects() {
+       public List<Project> getProjects() {
                List<Project> projects = new ArrayList<Project>();
                SimpleXML projectsNode = rootNode.getNode("project-list");
                if (projectsNode != null) {
@@ -381,7 +381,7 @@ public class Configuration {
                                }
                        }
                }
-               return projects.toArray(new Project[projects.size()]);
+               return projects;
        }
 
        /**
@@ -390,7 +390,7 @@ public class Configuration {
         * @param projects
         *            The list of all projects
         */
-       public void setProjects(Project[] projects) {
+       public void setProjects(List<Project> projects) {
                SimpleXML projectsNode = new SimpleXML("project-list");
                for (Project project : projects) {
                        SimpleXML projectNode = projectsNode.append("project");
@@ -430,7 +430,7 @@ public class Configuration {
                                        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("changed-name", fileOption.getChangedName().orNull());
                                        fileOptionNode.append("mime-type", fileOption.getMimeType());
                                }
                        }