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);
}
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;
}
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);
}
}
}
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));
}
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);
}
Aggregations