use of net.sourceforge.processdash.data.ListData in project processdash by dtuma.
the class ConvertTeamProjectMCF method setupProcessConversionOptions.
private void setupProcessConversionOptions() throws MigrationException {
Map<String, String> processes = getTeamProcessIDs();
ListData pidList = new ListData();
for (Map.Entry<String, String> e : processes.entrySet()) {
String onePID = e.getKey();
String oneName = e.getValue();
if (processID.equals(onePID))
continue;
pidList.add(onePID);
putStringValue(DISPLAY_DATA_NAME_PREFIX + onePID, oneName);
}
if (pidList.size() == 0)
throw new MigrationException("noOtherTeamProcesses");
putSimpleValue(ID_LIST_DATA_NAME, pidList);
}
use of net.sourceforge.processdash.data.ListData in project processdash by dtuma.
the class MoveProjectWizard method getOutOfDateTeamMembers.
private ListData getOutOfDateTeamMembers() throws Exception {
ListData result = new ListData();
String uri = resolveRelativeURI("teamMetricsStatus");
uri = uri + "?for=Corresponding_Project_Nodes&xml";
String xml = getRequestAsString(uri);
NodeList nl = XMLUtils.parse(xml).getElementsByTagName("member");
for (int i = 0; i < nl.getLength(); i++) {
Element m = (Element) nl.item(i);
String version = m.getAttribute("dashVersion");
if (DashPackage.compareVersions(version, "1.10.5") < 0)
result.add(HTMLUtils.escapeEntities(m.getAttribute("name")));
}
return result;
}
use of net.sourceforge.processdash.data.ListData in project processdash by dtuma.
the class GlobEngine method asCollection.
private static Collection asCollection(SimpleData data) {
if (!data.test())
return null;
if (data instanceof StringData)
data = ((StringData) data).asList();
if (data instanceof ListData) {
Collection words = new HashSet();
words.addAll(((ListData) data).asList());
return words;
} else
return asCollection(data.format());
}
use of net.sourceforge.processdash.data.ListData in project processdash by dtuma.
the class EVSchedule method getPeriodNoteData.
public String getPeriodNoteData() {
if (periodNotes == null || periodNotes.isEmpty())
return null;
ListData result = new ListData();
for (Map.Entry<Date, String> e : periodNotes.entrySet()) {
result.add(saveDate(e.getKey()));
result.add(e.getValue());
}
return result.format();
}
use of net.sourceforge.processdash.data.ListData in project processdash by dtuma.
the class EVTaskDependency method removeTaskID.
public static void removeTaskID(DataContext data, String taskPath, String id) {
String dataName = DataRepository.createDataName(taskPath, TASK_ID_DATA_NAME);
SimpleData currentValue = data.getSimpleValue(dataName);
ListData list = null;
if (currentValue instanceof ListData)
list = (ListData) currentValue;
else if (currentValue instanceof StringData)
list = ((StringData) currentValue).asList();
if (list != null && list.remove(id))
data.putValue(dataName, list);
}
Aggregations