Search in sources :

Example 56 with ListData

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

Example 57 with ListData

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

Example 58 with ListData

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

Example 59 with ListData

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

Example 60 with ListData

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;
    }
}
Also used : IOException(java.io.IOException) 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