X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Fjsite%2Fproject%2FAbstractEntry.java;h=41449b08b2627c4d90725ef9463e6bbf1c6a650d;hb=e858fb8e714fdb9f07c9172869caab47bfc7945e;hp=4f6e6ed8c8225e02ffcbfab15f542d50efc4923a;hpb=a8908775cd1d18f2d6a01125d1c5bdad0a61f7a3;p=jSite2.git
diff --git a/src/net/pterodactylus/jsite/project/AbstractEntry.java b/src/net/pterodactylus/jsite/project/AbstractEntry.java
index 4f6e6ed..41449b0 100644
--- a/src/net/pterodactylus/jsite/project/AbstractEntry.java
+++ b/src/net/pterodactylus/jsite/project/AbstractEntry.java
@@ -19,6 +19,8 @@
package net.pterodactylus.jsite.project;
+import java.io.File;
+
import net.pterodactylus.util.beans.AbstractBean;
/**
@@ -43,6 +45,9 @@ public abstract class AbstractEntry extends AbstractBean implements Entry {
/** The name of the file. */
private String name;
+ /** The default insert flag for this entry. */
+ private boolean defaultInsert;
+
/** Whether to insert the file. */
private boolean insert;
@@ -70,6 +75,25 @@ public abstract class AbstractEntry extends AbstractBean implements Entry {
/**
* {@inheritDoc}
*/
+ public boolean isDefault() {
+ return (insert == defaultInsert) && (contentType == null);
+ }
+
+ /**
+ * Sets the default insert flag for this entry. The default insert flag is
+ * derived from {@link File#isHidden()}.
+ *
+ * @param defaultInsert
+ * true
if the default for this entry is to insert
+ * it, false
otherwise
+ */
+ void setDefaultInsert(boolean defaultInsert) {
+ this.defaultInsert = defaultInsert;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public String getName() {
return name;
}