package net.pterodactylus.jsite.project;
+import java.io.File;
+
import net.pterodactylus.util.beans.AbstractBean;
/**
/** 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;
/**
* {@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
+ * <code>true</code> if the default for this entry is to insert
+ * it, <code>false</code> otherwise
+ */
+ void setDefaultInsert(boolean defaultInsert) {
+ this.defaultInsert = defaultInsert;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public String getName() {
return name;
}
public boolean isVirtual();
/**
+ * Returns whether this entry still has its default settings.
+ *
+ * @return <code>true</code> if this entry has not been changed by the
+ * user, <code>false</code> otherwise
+ */
+ public boolean isDefault();
+
+ /**
* Returns the name of the file. The name can contain multiple path
* components, separated by the platform’s {@link File#separatorChar}. It
* will never start with a separator, though.