/** Name of the “base path” property. */
public static final String PROPERTY_BASE_PATH = "basePath";
+ /** Name of the “default file” property. */
+ public static final String PROPERTY_DEFAULT_FILE = "defaultFile";
+
/** Internal ID. */
private String id;
/** The base path of the project. */
private String basePath;
+ /** The default file. */
+ private String defaultFile;
+
/** The overrides. */
private final Map<String, Override> overrides = new HashMap<String, Override>();
}
/**
+ * Returns the default file.
+ *
+ * @return The default file
+ */
+ public String getDefaultFile() {
+ return defaultFile;
+ }
+
+ /**
+ * Sets the default file.
+ *
+ * @param defaultFile
+ * The default file
+ */
+ public void setDefaultFile(String defaultFile) {
+ String oldDefaultFile = this.defaultFile;
+ this.defaultFile = defaultFile;
+ fireIfPropertyChanged(PROPERTY_DEFAULT_FILE, oldDefaultFile, defaultFile);
+ }
+
+ /**
* Adds an override for the given file.
*
* @param filePath
String projectPrivateKey = projectProperties.getProperty(projectPrefix + ".privateKey");
String projectPublicKey = projectProperties.getProperty(projectPrefix + ".publicKey");
String projectBasePath = projectProperties.getProperty(projectPrefix + ".basePath");
+ String projectDefaultFile = projectProperties.getProperty(projectPrefix + ".defaultFile");
Project project = new Project();
project.setId(projectId);
project.setName(projectName);
project.setPrivateKey(projectPrivateKey);
project.setPublicKey(projectPublicKey);
project.setBasePath(projectBasePath);
+ project.setDefaultFile(projectDefaultFile);
int overrideIndex = 0;
while (projectProperties.containsKey(projectPrefix + ".overrides." + overrideIndex)) {
String filePath = projectProperties.getProperty(projectPrefix + ".overrides." + overrideIndex + ".filePath");
projectProperties.setProperty(projectPrefix + ".privateKey", project.getPrivateKey());
projectProperties.setProperty(projectPrefix + ".publicKey", project.getPublicKey());
projectProperties.setProperty(projectPrefix + ".basePath", project.getBasePath());
+ projectProperties.setProperty(projectPrefix + ".defaultFile", project.getDefaultFile());
int overrideIndex = 0;
for (Entry<String, Override> overrideEntry: project.getOverrides().entrySet()) {
projectProperties.setProperty(projectPrefix + ".overrides." + overrideIndex + ".filePath", overrideEntry.getKey());
project.setPrivateKey(keyPair[0]);
project.setPublicKey(keyPair[1]);
project.setBasePath("");
+ project.setDefaultFile("");
projects.add(project);
project.addPropertyChangeListener(this);
try {