Package net.sourceforge.processdash.tool.export.mgr

Examples of net.sourceforge.processdash.tool.export.mgr.CompletionStatus


    public static void exportData(String prefix) {
        exportDataForPrefix(prefix);
    }
    public static CompletionStatus exportDataForPrefix(String prefix) {
        CompletionStatus result = ExportManager.getInstance()
                .exportDataForPrefix(prefix);

        if (result != null && result.getException() != null)
            logger.log(Level.WARNING, "Error exporting data for '" + prefix
                    + "'", result.getException());

        return result;
    }
View Full Code Here


            exp.dumpDefects(ctx.getHierarchy(), filter, out);

            out.close();
            outWriter = null;
           
            completionStatus = new CompletionStatus(CompletionStatus.SUCCESS,
                    dest, null);
           
        } catch (Exception ioe) {
            completionStatus = new CompletionStatus(CompletionStatus.ERROR,
                    dest, ioe);
            System.out.println("IOException: " + ioe);
            tryCancel();
        }
View Full Code Here

    }

    public void run() {
        try {
            doExport();
            completionStatus = new CompletionStatus(CompletionStatus.SUCCESS,
                    dest.getTarget(), null);
        } catch (Exception ioe) {
            completionStatus = new CompletionStatus(CompletionStatus.ERROR,
                    dest.getTarget(), ioe);
            ioe.printStackTrace();
            tryCancel();
        }
       
View Full Code Here


    /** Export the data, and tell the user the results.
     */
    private void run() {
        CompletionStatus result = null;
        if (parameters.containsKey("all"))
            DashController.exportAllData();
        else
            result = DashController.exportDataForPrefix(getPrefix());

        if (result == null || CompletionStatus.SUCCESS.equals(result.getStatus())) {
            interpOut("<HTML><HEAD><TITLE>${ExportComplete}</TITLE></HEAD>\n"
                    + "<BODY><H1>${ExportComplete}</H1>\n");
            out.println(HTMLUtils.escapeEntities(resources.format(
                    "ExportDataComplete_FMT", new Date())));
            out.println("</BODY></HTML>");

        } else if (CompletionStatus.NO_WORK_NEEDED.equals(result.getStatus())) {
            interpOut("<HTML><HEAD><TITLE>${ExportNotNeeded.Title}</TITLE></HEAD>\n"
                    + "<BODY><H1>${ExportNotNeeded.Title}</H1>\n"
                    + "${ExportNotNeeded.Message}"
                    + "</BODY></HTML>");

        } else {
            interpOut("<HTML><HEAD><TITLE>${ExportError.Title}</TITLE></HEAD>\n"
                    + "<BODY><H1>${ExportError.Title}</H1>\n");

            if (result != null && result.getTarget() != null
                    && result.getException() instanceof IOException) {
                String target = result.getTarget().toString();
                String resKey = TeamServerSelector.isUrlFormat(target)
                        ? "ExportError.Server_IO_FMT": "ExportError.IO_FMT";
                out.println(HTMLUtils.escapeEntities(resources.format(
                        resKey, target)));
            } else {
                out.println(resources.getHTML("ExportError.Message"));
                if (result != null && result.getException() != null) {
                    out.print("<PRE>");
                    result.getException().printStackTrace(out);
                    out.print("</PRE>");
                }
            }

            out.println("</BODY></HTML>");
View Full Code Here

TOP

Related Classes of net.sourceforge.processdash.tool.export.mgr.CompletionStatus

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.