/** The edition to insert to. */
protected int edition;
+ /** Whether to always force inserts. */
+ private boolean alwaysForceInserts;
+
/** Whether to ignore hidden directory. */
private boolean ignoreHiddenFiles;
localPath = project.localPath;
indexFile = project.indexFile;
lastInsertionTime = project.lastInsertionTime;
+ alwaysForceInserts = project.alwaysForceInserts;
ignoreHiddenFiles = project.ignoreHiddenFiles;
fileOptions = new HashMap<String, FileOption>(project.fileOptions);
}
}
/**
+ * Returns whether files for this project should always be inserted, even
+ * when unchanged.
+ *
+ * @return {@code true} to always force inserts on this project,
+ * {@code false} otherwise
+ */
+ public boolean isAlwaysForceInsert() {
+ return alwaysForceInserts;
+ }
+
+ /**
+ * Sets whether files for this project should always be inserted, even when
+ * unchanged.
+ *
+ * @param alwaysForceInsert
+ * {@code true} to always force inserts on this project,
+ * {@code false} otherwise
+ */
+ public void setAlwaysForceInsert(boolean alwaysForceInsert) {
+ this.alwaysForceInserts = alwaysForceInsert;
+ }
+
+ /**
* Returns whether hidden files are ignored, i.e. not inserted.
*
* @return {@code true} if hidden files are not inserted, {@code false}
* The URI to shorten
* @return The shortened URI
*/
- private String shortenURI(String uri) {
+ private static String shortenURI(String uri) {
String shortUri = uri;
if (shortUri.startsWith("freenet:")) {
shortUri = shortUri.substring("freenet:".length());
* <p>
* Projects are compared by their name only.
*/
+ @Override
public int compareTo(Project project) {
return name.compareToIgnoreCase(project.name);
}