use of net.sourceforge.processdash.tool.bridge.client.LocalWorkingDirectory in project processdash by dtuma.
the class DisplayConfig method loadConfigurationInformation.
private void loadConfigurationInformation() {
dataDirectory = null;
dataURL = null;
configFile = new File(DashController.getSettingsFileName());
WorkingDirectory workingDir = ((ProcessDashboard) getDashboardContext()).getWorkingDirectory();
if (workingDir instanceof BridgedWorkingDirectory) {
BridgedWorkingDirectory bwd = (BridgedWorkingDirectory) workingDir;
dataURL = bwd.getDescription();
dataDirectory = bwd.getTargetDirectory();
if (dataDirectory == null)
configFile = null;
else
configFile = new File(dataDirectory, configFile.getName());
} else if (workingDir instanceof LocalWorkingDirectory) {
LocalWorkingDirectory lwd = (LocalWorkingDirectory) workingDir;
dataDirectory = lwd.getTargetDirectory();
}
DashPackage dash = TemplateLoader.getPackage(DASHBOARD_PACKAGE_ID);
if (dash != null && StringUtils.hasValue(dash.filename)) {
File dashJar = new File(dash.filename);
installationDirectory = dashJar.getParentFile();
}
appTemplateDirectory = TemplateLoader.getApplicationTemplateDir();
jvmInfo = System.getProperty("java.vendor") + " JRE " + System.getProperty("java.version") + "; " + System.getProperty("os.name");
}
Aggregations