use of net.sourceforge.processdash.data.SimpleData in project processdash by dtuma.
the class Program2SizeReminder method writeContents.
@Override
protected void writeContents() throws IOException {
// First, look at the project which is invoking this script, and see
// if it is preceded by a PSP0 program. If not, print nothing and exit.
DataContext data = getDataContext();
SimpleData prevProgramVal = data.getSimpleValue("Previous_Program");
if (!hasValue(prevProgramVal))
return;
String prevProgram = prevProgramVal.format();
SimpleData psp0tag = data.getSimpleValue(prevProgram + "/PSP0");
if (!hasValue(psp0tag))
return;
// Next, check to see if size data has been entered for the preceding
// PSP0 program. If it has, print nothing and exit.
SimpleData psp0size = data.getSimpleValue(prevProgram + "/New & Changed LOC");
if (hasValue(psp0size))
return;
// phase of this project.
if (hasValue(data.getSimpleValue("Test/Time")) || hasValue(data.getSimpleValue("Postmortem/Time")) || hasValue(data.getSimpleValue("New & Changed LOC"))) {
printSizeWarningBlock(prevProgram);
}
}
use of net.sourceforge.processdash.data.SimpleData in project processdash by dtuma.
the class DependencyIndicator method shouldBeVisible.
private boolean shouldBeVisible(String path) {
if (path == null)
return false;
SaveableData enabledVal = context.getData().getInheritableValue(path, ENABLED_DATA_NAME);
if (enabledVal == null)
return Settings.getBool(ENABLED_SETTING_NAME, true);
SimpleData enabled = enabledVal.getSimpleValue();
return (enabled != null && enabled.test());
}
use of net.sourceforge.processdash.data.SimpleData in project processdash by dtuma.
the class EVReportSettings method lookupGroupFilter.
private void lookupGroupFilter() {
SaveableData sval = data.getInheritableValue(prefix, UserGroupManagerDash.FILTER_DATANAME);
SimpleData val = (sval == null ? null : sval.getSimpleValue());
parameters.put(GROUP_FILTER_PARAM, val == null ? "" : val.format());
}
use of net.sourceforge.processdash.data.SimpleData in project processdash by dtuma.
the class EVReportSettings method store.
/** Save the value of a setting to the data repository.
*
* @param settingName the name of the setting. (The value of the setting
* will be read from the parameters used to create this object.)
* @param isBool true if this is a boolean setting, false if it is a string.
*/
public void store(String settingName, boolean isBool) {
SimpleData val = null;
if (isBool)
val = (parameters.containsKey(settingName) ? ImmutableDoubleData.TRUE : ImmutableDoubleData.FALSE);
else if (parameters.get(settingName) instanceof String)
val = StringData.create(getParameter(settingName));
setValue("settings//" + settingName, val);
touchSettingsTimestamp();
}
use of net.sourceforge.processdash.data.SimpleData in project processdash by dtuma.
the class ImportedDefectManager method getWbsId.
private static String getWbsId(DataRepository data, String path) {
String dataName = DataRepository.createDataName(path, "Project_WBS_ID");
SimpleData val = data.getSimpleValue(dataName);
if (val == null)
return null;
else
return val.format();
}
Aggregations