use of net.sourceforge.processdash.data.ListData in project processdash by dtuma.
the class FilterDataContainingTaskNames method hashRollupTaskListSpec.
@EnabledFor("/Task Lists$")
public String hashRollupTaskListSpec(String value) throws MalformedValueException {
List<String> taskLists = StringData.create(value).asList().asList();
ListData newVal = new ListData();
for (String elem : taskLists) {
elem = taskListMapper.hashTaskListName(elem);
newVal.add(elem);
}
return newVal.saveString().substring(1);
}
use of net.sourceforge.processdash.data.ListData in project processdash by dtuma.
the class EVTaskListData method getSchedule.
private EVSchedule getSchedule(DataRepository data, String taskListName) {
String globalPrefix = MAIN_DATA_PREFIX + taskListName;
String dataName = DataRepository.createDataName(globalPrefix, EST_HOURS_DATA_NAME);
SimpleData d = data.getSimpleValue(dataName);
if (d instanceof StringData)
d = ((StringData) d).asList();
if (d instanceof ListData) {
String lockedName = DataRepository.createDataName(globalPrefix, DATES_LOCKED_DATA_NAME);
SimpleData l = data.getSimpleValue(lockedName);
boolean locked = (l != null && l.test());
return new EVSchedule((ListData) d, locked);
} else
return new EVSchedule();
}
use of net.sourceforge.processdash.data.ListData in project processdash by dtuma.
the class EVTaskListRollup method addTaskListsFromData.
private void addTaskListsFromData(DataRepository data, DashHierarchy hierarchy, ObjectCache cache, String taskListName, boolean willNeedChangeNotification) {
String globalPrefix = MAIN_DATA_PREFIX + taskListName;
String dataName = DataRepository.createDataName(globalPrefix, TASK_LISTS_DATA_NAME);
SimpleData listVal = data.getSimpleValue(dataName);
ListData list = null;
if (listVal instanceof ListData)
list = (ListData) listVal;
else if (listVal instanceof StringData)
list = ((StringData) listVal).asList();
if (list == null)
return;
for (int i = 0; i < list.size(); i++) {
taskListName = (String) list.get(i);
EVTaskList taskList = openTaskListToAdd(taskListName, data, hierarchy, cache, willNeedChangeNotification);
if (taskList == null) {
if (EVTaskListXML.validName(taskListName))
taskList = new EVTaskListXML(taskListName);
else
continue;
}
if (((EVTask) root).add((EVTask) taskList.getRoot()))
evTaskLists.add(taskList);
}
}
use of net.sourceforge.processdash.data.ListData in project processdash by dtuma.
the class WBSTaskOrderComparator method loadOrdinalData.
private void loadOrdinalData(DataContext data, String path) {
String dataName = DataRepository.createDataName(path, NODE_ORDER_DATA_NAME);
ListData list = ListData.asListData(data.getSimpleValue(dataName));
if (list != null) {
cacheInvalidator.listenToData(dataName);
for (int i = 0; i < list.size(); i++) {
String taskId = StringUtils.asString(list.get(i));
getOrdinalData(taskId).put(path, i);
}
}
}
use of net.sourceforge.processdash.data.ListData in project processdash by dtuma.
the class MoveProjectWizard method someTeamMembersAreOutOfDate.
private boolean someTeamMembersAreOutOfDate() {
if (isMaster)
return false;
try {
ListData members = getOutOfDateTeamMembers();
putValue(OOD_MEMBER_LIST, members);
return (members.size() > 0);
} catch (Exception e) {
return false;
}
}
Aggregations