Search in sources :

Example 46 with SimpleData

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);
    }
}
Also used : DataContext(net.sourceforge.processdash.data.DataContext) SimpleData(net.sourceforge.processdash.data.SimpleData)

Example 47 with SimpleData

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());
}
Also used : SimpleData(net.sourceforge.processdash.data.SimpleData) SaveableData(net.sourceforge.processdash.data.SaveableData)

Example 48 with SimpleData

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());
}
Also used : SimpleData(net.sourceforge.processdash.data.SimpleData) SaveableData(net.sourceforge.processdash.data.SaveableData)

Example 49 with SimpleData

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();
}
Also used : SimpleData(net.sourceforge.processdash.data.SimpleData)

Example 50 with SimpleData

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();
}
Also used : SimpleData(net.sourceforge.processdash.data.SimpleData)

Aggregations

SimpleData (net.sourceforge.processdash.data.SimpleData)164 ListData (net.sourceforge.processdash.data.ListData)20 DoubleData (net.sourceforge.processdash.data.DoubleData)15 SaveableData (net.sourceforge.processdash.data.SaveableData)14 StringData (net.sourceforge.processdash.data.StringData)13 IOException (java.io.IOException)11 DataRepository (net.sourceforge.processdash.data.repository.DataRepository)11 DateData (net.sourceforge.processdash.data.DateData)10 Iterator (java.util.Iterator)9 List (java.util.List)7 PropertyKey (net.sourceforge.processdash.hier.PropertyKey)7 ArrayList (java.util.ArrayList)6 HashMap (java.util.HashMap)6 ImmutableDoubleData (net.sourceforge.processdash.data.ImmutableDoubleData)6 NumberData (net.sourceforge.processdash.data.NumberData)6 Element (org.w3c.dom.Element)6 Map (java.util.Map)5 DataContext (net.sourceforge.processdash.data.DataContext)5 EscapeString (net.sourceforge.processdash.util.EscapeString)5 File (java.io.File)4