Package net.sourceforge.processdash.ev

Examples of net.sourceforge.processdash.ev.EVTaskList


                taskListNames.length);

        TaskLabeler taskLabeler = null;

        for (String taskListName : taskListNames) {
            EVTaskList tl = EVTaskList.openExisting(taskListName, data,
                hierarchy, null, false);
            if (tl instanceof EVTaskListData && !includePersonal)
                continue;
            if (tl instanceof EVTaskListRollup && !includeRollups)
                continue;
            tl.recalc();
            tl = new EVTaskListMerged(tl, false, true, null);

            if (taskLabeler == null) {
                taskLabeler = new DefaultTaskLabeler(this);
                taskLabeler.recalculate();
            }
            tl.setTaskLabeler(taskLabeler);

            result.add(tl);
        }

        return result;
View Full Code Here


    }

    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);
            }
        }
       
    }
View Full Code Here

        result.append("<" + HIST_INTERVALS_TAG //
                + " " + VERSION_ATTR + "='1'>");

        List<EVTaskList> taskLists = new ArrayList<EVTaskList>();
        for (String taskListName : taskListNames) {
            EVTaskList tl = EVTaskList.openExisting(taskListName,
                ctx.getData(), ctx.getHierarchy(), ctx.getCache(), false);
            if (tl == null)
                continue;

            tl.setDependencyCalculator(null);
            tl.recalc();
            taskLists.add(tl);
            result.append("<" + HIST_TASK_LIST_TAG + " " + NAME_ATTR + "='")
                    .append(XMLUtils.escapeAttribute(taskListName)) //
                    .append("' />");
        }
View Full Code Here

            }
            i = taskListNames.iterator();
            String owner = ProcessDashboard.getOwnerName(ctx.getData());
            while (i.hasNext()) {
                name = (String) i.next();
                EVTaskList tl = EVTaskList.openExisting(name, ctx.getData(),
                        ctx.getHierarchy(), ctx.getCache(), false);
                if (tl == null)
                    continue;

                tl.recalc();
                String xml = tl.getAsXML(false);
                name = exportedScheduleDataName(owner, name);
                out.write(name + ",");
                out.write(StringData.escapeString(xml));
                out.println();
            }

            ctx.getData().dumpRepository(out, filter,
                    DataRepository.DUMP_STYLE_TEXT);

            TimeLog tl = ctx.getTimeLog();
            Iterator keys = tl.filter(null, null, null);
            while (keys.hasNext()) {
                TimeLogEntry tle = (TimeLogEntry) keys.next();
                if (Filter.matchesFilter(filter, tle.getPath()))
                    out.println(toAbbrevString(tle));
            }
View Full Code Here

                merged = true;
                taskScheduleName = taskScheduleName.substring(MERGED_PREFIX
                        .length());
            }
           
            EVTaskList tl = EVTaskList.openExisting(taskScheduleName, ctx
                    .getData(), ctx.getHierarchy(), ctx.getCache(), false);
            if (tl == null)
                continue;

            tl.setDependencyCalculator(new EVDependencyCalculator(
                    ctx.getData(), ctx.getHierarchy(), ctx.getCache()));
            tl.recalc();
           
            if (merged)
                tl = new EVTaskListMerged(tl, false, false, null);
           
            schedules.put(taskScheduleName, tl);
View Full Code Here

        out.write("<" + DOCUMENT_ELEM + ">" + NEWLINE);

        for (Iterator iter = schedules.entrySet().iterator(); iter.hasNext();) {
            Map.Entry e = (Entry) iter.next();
            String taskScheduleName = (String) e.getKey();
            EVTaskList tl = (EVTaskList) e.getValue();

            String xml = tl.getAsXML(true);
            xml = StringUtils.findAndReplace(xml, "\n", NEWLINE + INDENT + INDENT);
            out.write(INDENT + "<" + SCHEDULE_ELEM + " " + SCHEDULE_NAME_ATTR
                    + "='");
            out.write(XMLUtils.escapeAttribute(taskScheduleName));
            out.write("'>" + NEWLINE + INDENT + INDENT);
View Full Code Here

            // task list, and compute the dependency target date.
            List taskListNames = EVTaskList.getPreferredTaskListsForPath(
                context.getData(), taskPath);
            if (taskListNames != null && taskListNames.size() == 1) {
                String taskListName = (String) taskListNames.get(0);
                EVTaskList tl = EVTaskList.openExisting(taskListName,
                    context.getData(), context.getHierarchy(),
                    context.getCache(), false);
                tl.recalc();
                List l = tl.findTasksByFullName(taskPath);
                if (l != null && l.size() == 1) {
                    EVTask t = (EVTask) l.get(0);
                    for (Iterator i = dependencies.iterator(); i.hasNext();) {
                        EVTaskDependency d = (EVTaskDependency) i.next();
                        d.loadParentDate(t);
View Full Code Here

            String displayName = EVTaskList.cleanupName(taskListName);

            for (int i = 5;   i-- > 0; ) {
                try {
                    EVTaskList tl = EVTaskList.openExisting(taskListName,
                            context.getData(), context.getHierarchy(),
                            context.getCache(), false);
                    if (tl == null)
                        return resources.format(
                                "Navigator.Errors.Not_Found_FMT", displayName);
       
                    if (!(tl instanceof EVTaskListData))
                        return resources.format("Navigator.Errors.Invalid_FMT",
                                displayName);
       
                    ((EVTaskListData) tl).recalcLeavesOnly();
                    tl.recalc();
                   
                    return tl;
                } catch (Exception e) {
                    logger.log(Level.WARNING,
                            "When opening task list, caught exception:", e);
View Full Code Here

                return;

            node.removeAllChildren();
            NodeObject obj = (NodeObject) node.getUserObject();
            String taskListName = obj.getValue();
            EVTaskList tl = EVTaskList.open(taskListName, context.getData(),
                    context.getHierarchy(), context.getCache(), false);
            if (tl != null)
                copyNodes(node, (EVTask) tl.getRoot());
            nodeStructureChanged(node);
        }
View Full Code Here

        lowerBound = upperBound = null;

        Set<String> ambiguousNames = getRepeatedPersonNames();
       
        for (int i = 0; i < rollup.getSubScheduleCount(); i++) {
            EVTaskList tl = rollup.getSubSchedule(i);
            String seriesName = getSeriesName(tl, ambiguousNames);

            // by default, attempt to add a series based on the forecast date
            // confidence interval
            if (maybeAddSeries(tl.getSchedule().getMetrics()
                    .getDateConfidenceInterval(), seriesName))
                continue;

            // if no confidence interval is available, see if this schedule
            // is 100% complete.  If so, draw a vertical line on the chart.
            Date completionDate = tl.getTaskRoot().getActualDate();
            if (completionDate != null
                    && maybeAddSeries(new SingleValueConfidenceInterval(
                            completionDate.getTime()), seriesName))
                continue;

            // if no interval is available and we're less than 100% complete,
            // see if they have a forecast date, and draw that as a single
            // point on the chart.
            Date forecastDate = tl.getSchedule().getMetrics()
                    .independentForecastDate();
            if (forecastDate != null && !forecastDate.equals(EVSchedule.NEVER))
                maybeAddSeries(new SinglePointXYChartSeries(seriesName,
                        forecastDate.getTime(), 0));
        }
View Full Code Here

TOP

Related Classes of net.sourceforge.processdash.ev.EVTaskList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.