Search in sources :

Example 41 with ListData

use of net.sourceforge.processdash.data.ListData in project processdash by dtuma.

the class SizeEstimatingTemplate method writeTable.

/** Write a table containing a variable number of rows.
     *
     * @param template HTML text which should be printed for each row.
     *    Occurrences of the text "#//#" will be replaced with the row number.
     * @param dataElements the names of the data elements that are being
     *    displayed in the table.
     * @param minRows the minimum number of rows to display.
     * @param padRows the number of blank rows to display after data
     * @param addRows the number of blank rows to add upon user request
     * @param queryArg a string which, if present in the query string,
     *    indicates a request from the user to add extra rows.
     */
protected void writeTable(String template, String[] dataElements, String queryArg, int minRows, int padRows, int addRows) {
    String prefix = (String) env.get("PATH_TRANSLATED");
    int extraRows = padRows;
    if (parameters.get(queryArg) != null && !isExporting())
        extraRows = addRows;
    ListData rows = configureSETList(getDataRepository(), prefix, dataElements, minRows, extraRows, !isExporting());
    writeTableRows(template, rows);
}
Also used : ListData(net.sourceforge.processdash.data.ListData)

Example 42 with ListData

use of net.sourceforge.processdash.data.ListData in project processdash by dtuma.

the class DefectUtil method getDevelopmentPhases.

private static Set<String> getDevelopmentPhases(DataRepository data, String path) {
    Set<String> result = new HashSet();
    ListData list = ListData.asListData(data.getInheritableValue(path, "Development_Phase_List"));
    if (list != null)
        result.addAll(list.asList());
    return result;
}
Also used : HashSet(java.util.HashSet) ListData(net.sourceforge.processdash.data.ListData)

Example 43 with ListData

use of net.sourceforge.processdash.data.ListData in project processdash by dtuma.

the class TeamProjectSetupWizard method copyRelaunchableSettingsFrom.

private void copyRelaunchableSettingsFrom(String relaunchSourcePath) {
    ListData settingNames = ListData.asListData(getSimpleValue(RELAUNCHABLE_SETTINGS));
    if (settingNames == null || !settingNames.test())
        return;
    List<String> phases = ListData.asListData(getSimpleValue("Phase_List")).asList();
    for (String oneName : (List<String>) settingNames.asList()) {
        if (oneName.contains("*PHASE*")) {
            for (String phase : phases) copyRelaunchableSetting(relaunchSourcePath, StringUtils.findAndReplace(oneName, "*PHASE*", phase));
        } else {
            copyRelaunchableSetting(relaunchSourcePath, oneName);
        }
    }
}
Also used : List(java.util.List) NetworkDriveList(net.sourceforge.processdash.util.NetworkDriveList) ArrayList(java.util.ArrayList) EVTaskList(net.sourceforge.processdash.ev.EVTaskList) ListData(net.sourceforge.processdash.data.ListData) EVTaskListData(net.sourceforge.processdash.ev.EVTaskListData)

Example 44 with ListData

use of net.sourceforge.processdash.data.ListData in project processdash by dtuma.

the class TaskListDataWatcher method addTaskListNames.

private void addTaskListNames(ExportedDataValue val) {
    SimpleData d = val.getSimpleValue();
    if (!d.test())
        return;
    ListData list = null;
    if (d instanceof ListData)
        list = (ListData) d;
    else if (d instanceof StringData)
        list = ((StringData) d).asList();
    if (list != null)
        for (int i = 0; i < list.size(); i++) taskListNames.add(list.get(i));
}
Also used : SimpleData(net.sourceforge.processdash.data.SimpleData) StringData(net.sourceforge.processdash.data.StringData) ListData(net.sourceforge.processdash.data.ListData) EVTaskListData(net.sourceforge.processdash.ev.EVTaskListData)

Example 45 with ListData

use of net.sourceforge.processdash.data.ListData in project processdash by dtuma.

the class ExportJanitor method finishExportAllOperation.

public void finishExportAllOperation() {
    ListData currentExportedFiles = ListData.asListData(data.getValue(CURRENT_EXPORTED_FILES_DATANAME));
    ListData historicallyExportedFiles = ListData.asListData(data.getValue(HISTORICALLY_EXPORTED_DATANAME));
    if (historicallyExportedFiles != null && currentExportedFiles != null) {
        // After this method call, historicallyExportedFiles wont contain filenames
        //  that are not in currentExportedFiles.
        cleanHistoricalFiles(historicallyExportedFiles, currentExportedFiles);
    }
    data.putValue(CURRENT_EXPORTED_FILES_DATANAME, null);
    data.putValue(HISTORICALLY_EXPORTED_DATANAME, historicallyExportedFiles);
}
Also used : ListData(net.sourceforge.processdash.data.ListData)

Aggregations

ListData (net.sourceforge.processdash.data.ListData)129 SimpleData (net.sourceforge.processdash.data.SimpleData)20 ArrayList (java.util.ArrayList)18 List (java.util.List)16 Iterator (java.util.Iterator)15 StringData (net.sourceforge.processdash.data.StringData)15 EVTaskListData (net.sourceforge.processdash.ev.EVTaskListData)9 Map (java.util.Map)8 HashSet (java.util.HashSet)7 DashHierarchy (net.sourceforge.processdash.hier.DashHierarchy)6 IOException (java.io.IOException)5 HashMap (java.util.HashMap)5 LinkedList (java.util.LinkedList)5 DoubleData (net.sourceforge.processdash.data.DoubleData)5 PropertyKey (net.sourceforge.processdash.hier.PropertyKey)5 LocalizedString (net.sourceforge.processdash.util.LocalizedString)5 NodeList (org.w3c.dom.NodeList)5 Date (java.util.Date)4 EVTaskList (net.sourceforge.processdash.ev.EVTaskList)4 Element (org.w3c.dom.Element)4