add default insert flag
[jSite2.git] / src / net / pterodactylus / jsite / project / Project.java
index b6c514b..5c58763 100644 (file)
@@ -77,6 +77,28 @@ public class Project extends AbstractBean {
        private List<Entry> virtualEntries = new ArrayList<Entry>();
 
        /**
+        * Creates a new project.
+        */
+       public Project() {
+               /* do nothing. */
+       }
+
+       /**
+        * Clones the given project.
+        * 
+        * @param project
+        */
+       Project(Project project) {
+               this.name = project.name;
+               this.description = project.description;
+               this.publicKey = project.publicKey;
+               this.privateKey = project.privateKey;
+               this.basePath = project.basePath;
+               this.basePathEntries.addAll(project.basePathEntries);
+               this.virtualEntries.addAll(project.virtualEntries);
+       }
+
+       /**
         * Returns the internal ID.
         * 
         * @return The internal ID
@@ -275,6 +297,7 @@ public class Project extends AbstractBean {
                        PhysicalEntry entry = new PhysicalEntry();
                        entry.setName(fileName);
                        entry.setPath(file.getPath());
+                       entry.setDefaultInsert(!file.isHidden());
                        entry.setInsert(!file.isHidden());
                        entries.add(entry);
                }