Package net.sourceforge.processdash.process

Examples of net.sourceforge.processdash.process.ProcessUtil


        if (params.containsKey(INPUT_VAL))
            try {
                double inputVal = FormatUtil.parseNumber
                    ((String) params.get(INPUT_VAL));

                ProcessUtil processUtil = new ProcessUtil(data, prefix);
                String probeInputElem =
                    processUtil.getProcessString(ProbeData.PROBE_INPUT_METRIC);
                putValue(probeInputElem, new DoubleData(inputVal));

                return (inputVal > 0);
            } catch (Exception e) {
                return false;
View Full Code Here


        setNextPage(null);
    }


    private boolean writeVerifyInput(boolean full, boolean checkMismatch) {
        ProcessUtil processUtil = new ProcessUtil(data, prefix);
        String probeInputElem =
            processUtil.getProcessString(ProbeData.PROBE_INPUT_METRIC);
        String probeInputElemDisplay = Translator.translate(probeInputElem);
        String elemNameHTML = esc(probeInputElemDisplay);
        boolean editInputAllowed = full &&
            "".equals(processUtil.getProcessString("PROBE_NO_EDIT_INPUT"));

        if (full)
            writeStepTitle(resources.format
                           ("Input.Verify_Title_FMT", probeInputElemDisplay));
        else
            writeSectionTitle(probeInputElemDisplay);

        double inputVal = getNumber(probeInputElem);
        double lastInputVal = getNumber(ProbeData.PROBE_LAST_RUN_PREFIX
                + probeInputElem);

        if (editInputAllowed) {
            if (Double.isNaN(inputVal)) inputVal = 0;

            // write the prompt
            out.print(resources.format
                      ("Input.Provide_Input_HTML_FMT", elemNameHTML));
            // write a field for entry of the data
            out.print("<p>");
            out.print(elemNameHTML);
            out.print("<input type='text' name='"+INPUT_VAL+"' value='");
            out.print(FormatUtil.formatNumber(inputVal));
            out.print("'>&nbsp;");
            out.print(esc(processUtil.getSizeAbbrLabel()));
            out.print("</p>");

        } else if (checkMismatch == true
                && !Double.isNaN(lastInputVal)
                && (Math.abs(inputVal - lastInputVal) > 0.1)) {
View Full Code Here

                .getSizeUnits(), table, null);
    }

    private void createNew() throws IOException {
        drawForm("Create_New", resources.getString("Enter_New_Name"), true,
            new ProcessUtil(getDataContext()).getSizeUnits(), null, null);
    }
View Full Code Here

        if (columns.isEmpty()) {
            out.write("<!-- no columns selected;  no table to display -->\n\n");
            return;
        }
       
        ProcessUtil procUtil = new ProcessUtil(getDataContext());
       
        // retrieve the list of phases the user wants to display
        String phaseList = getSelectedPhaseList();
        List phases = null;
        for (int i = 0; i < PHASES.length; i++) {
            if (PHASES[i][0].equals(phaseList)) {
                phases = procUtil.getProcessListPlain(PHASES[i][1]);
                break;
            }
        }
        if (phases == null)
            // default to all phases
            phases = procUtil.getProcessListPlain(PHASES[0][1]);

        // filter the list of phases, if applicable
        phases = procUtil.filterPhaseList(phases);
        applyExplicitPhaseFilter(phases);
        if (phases.isEmpty()) {
            out.write("<!-- no phases selected;  no table to display -->\n\n");
            return;
        }
View Full Code Here

        private ProcessUtil procUtil;

        private Map pathCache;

        public PhaseAppender(DataContext data) {
            this.procUtil = new ProcessUtil(data);
            this.pathCache = new HashMap();
        }
View Full Code Here

        header = StringUtils.findAndReplace(header, "%for owner%", owner);
        header = StringUtils.findAndReplace(header, "%for path%", title);
        header = StringUtils.findAndReplace(header, "%css%", cssLinkHTML());
        out.print(header);

        ProcessUtil procUtil = new ProcessUtil(getDataContext());

        for (Iterator rows = l.iterator(); rows.hasNext();) {
            TimeLogEntry tle = (TimeLogEntry) rows.next();
            String entryPath = tle.getPath();
            String phase = procUtil.getEffectivePhase(entryPath, false);
            if (phase == null) {
                int slashPos = entryPath.lastIndexOf('/');
                phase = entryPath.substring(slashPos+1);
                entryPath = entryPath.substring(0, slashPos);
            }
View Full Code Here

        return chart;
    }

    private void maybeConfigurePhaseColors(final PiePlot plot,
            PieDataset pieData) {
        ProcessUtil procUtil = new ProcessUtil(getDataContext());
        new PhaseChartColorer(procUtil, pieData.getKeys()) {
            public void setItemColor(Object key, int pos, Color c) {
                plot.setSectionPaint((Comparable) key, c);
            }
        }.run();
View Full Code Here

     */
    public static String guessRemovalPhase(String defectPath,
            String taskPath, DashboardContext context) {
   
        // first, check to see if this task has registered an effective phase
        ProcessUtil pu = new ProcessUtil(context.getData());
        String effectivePhase = pu.getEffectivePhase(taskPath, false);
        if (effectivePhase != null)
            return effectivePhase;
   
        // if no effective phase was registered, infer it from the path.  We
        // don't use the path inference provided by ProcessUtil because we
View Full Code Here

     */
    public ProbeData(DataRepository data, String prefix,
                     String subsetPrefixParam) {
        this.data = data;
        this.prefix = prefix;
        this.processUtil = new ProcessUtil(data, prefix);
        this.subsetPrefix = getSubsetPrefix(data, prefix, subsetPrefixParam);
        this.reportMode = false;
        boolean clearOutlierMarks = (subsetPrefixParam != null);
        String[] conditions = shouldOnlyIncludeCompletedProjects(data, prefix)
                ? CONDITIONS : null;
View Full Code Here

    }

    private ProbeData(DataRepository data, String prefix, ListData probeList) {
        this.data = data;
        this.prefix = prefix;
        this.processUtil = new ProcessUtil(data, prefix);
        //subsetPrefix = getSubsetPrefix(data, prefix, params);
        String[] conditions = shouldOnlyIncludeCompletedProjects(data, prefix)
                ? CONDITIONS : null;

        this.resultSet = new ProbeDatabaseUtil(data, prefix) //
View Full Code Here

TOP

Related Classes of net.sourceforge.processdash.process.ProcessUtil

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.