Search in sources :

Example 11 with EVTaskListRollup

use of net.sourceforge.processdash.ev.EVTaskListRollup in project processdash by dtuma.

the class EVReport method writeXML.

/** Generate a page of XML data for the Task and Schedule templates.
     */
public void writeXML() throws IOException {
    if (evModel.isEmpty()) {
        out.print("Status: 404 Not Found\r\n\r\n");
        out.flush();
    } else {
        outStream.write("Content-type: application/xml\r\n".getBytes());
        String owner = getOwner();
        if (owner != null)
            outStream.write((CachedURLObject.OWNER_HEADER_FIELD + ": " + owner + "\r\n").getBytes());
        outStream.write("\r\n".getBytes());
        if (evModel instanceof EVTaskListRollup && parameters.containsKey(MERGED_PARAM)) {
            evModel = new EVTaskListMerged(evModel, false, settings.shouldMergePreserveLeaves(), null);
        }
        outStream.write(XML_HEADER.getBytes("UTF-8"));
        outStream.write(evModel.getAsXML(true).getBytes("UTF-8"));
        outStream.flush();
    }
}
Also used : EVTaskListRollup(net.sourceforge.processdash.ev.EVTaskListRollup) EVTaskListMerged(net.sourceforge.processdash.ev.EVTaskListMerged)

Example 12 with EVTaskListRollup

use of net.sourceforge.processdash.ev.EVTaskListRollup in project processdash by dtuma.

the class TeamProjectSetupWizard method addScheduleToRollup.

protected boolean addScheduleToRollup(String teamScheduleName, String indivSchedPath) {
    if (Settings.isReadOnly()) {
        logger.fine("Cannot add schedule while in read-only mode.");
        return false;
    }
    EVTaskList rollup = EVTaskList.openExisting(teamScheduleName, getDataRepository(), getPSPProperties(), getObjectCache(), false);
    if (!(rollup instanceof EVTaskListRollup)) {
        logger.fine("rollup not an EVTaskListRollup");
        return false;
    }
    if (!rollup.addTask(indivSchedPath, getDataRepository(), getPSPProperties(), getObjectCache(), false)) {
        logger.fine("addTask failed");
        return false;
    }
    rollup.save();
    logger.fine("saved changed task list");
    return true;
}
Also used : EVTaskListRollup(net.sourceforge.processdash.ev.EVTaskListRollup) EVTaskList(net.sourceforge.processdash.ev.EVTaskList)

Example 13 with EVTaskListRollup

use of net.sourceforge.processdash.ev.EVTaskListRollup in project processdash by dtuma.

the class EVCostConfidenceInterval method getUniqueTaskLists.

private static void getUniqueTaskLists(Object[] taskLists, Map<String, EVTaskList> results) {
    for (int i = 0; i < taskLists.length; i++) {
        EVTaskList taskList = (EVTaskList) taskLists[i];
        if (taskList instanceof EVTaskListRollup) {
            EVTaskListRollup rollup = (EVTaskListRollup) taskList;
            List subTaskLists = rollup.getSubSchedules();
            getUniqueTaskLists(subTaskLists.toArray(), results);
        } else {
            String key = taskList.getID();
            if (!StringUtils.hasValue(key))
                key = taskList.getTaskListName();
            results.put(key, taskList);
        }
    }
}
Also used : EVTaskListRollup(net.sourceforge.processdash.ev.EVTaskListRollup) EVTaskList(net.sourceforge.processdash.ev.EVTaskList) EVTaskList(net.sourceforge.processdash.ev.EVTaskList) List(java.util.List) ArrayList(java.util.ArrayList) DataPoint(net.sourceforge.processdash.ev.ci.AbstractConfidenceInterval.DataPoint)

Aggregations

EVTaskListRollup (net.sourceforge.processdash.ev.EVTaskListRollup)13 EVTaskList (net.sourceforge.processdash.ev.EVTaskList)8 ArrayList (java.util.ArrayList)3 DefaultTaskLabeler (net.sourceforge.processdash.ev.DefaultTaskLabeler)3 TinyCGIException (net.sourceforge.processdash.net.http.TinyCGIException)3 IOException (java.io.IOException)2 Date (java.util.Date)2 HashMap (java.util.HashMap)2 Iterator (java.util.Iterator)2 List (java.util.List)2 TableModel (javax.swing.table.TableModel)2 SimpleData (net.sourceforge.processdash.data.SimpleData)2 EVDependencyCalculator (net.sourceforge.processdash.ev.EVDependencyCalculator)2 EVSchedule (net.sourceforge.processdash.ev.EVSchedule)2 EVTaskFilter (net.sourceforge.processdash.ev.EVTaskFilter)2 EVTaskListData (net.sourceforge.processdash.ev.EVTaskListData)2 EVTaskListGroupFilter (net.sourceforge.processdash.ev.EVTaskListGroupFilter)2 EVTaskListMerged (net.sourceforge.processdash.ev.EVTaskListMerged)2 UserFilter (net.sourceforge.processdash.team.group.UserFilter)2 StringWriter (java.io.StringWriter)1