Package com.sun.enterprise.util

Examples of com.sun.enterprise.util.ColumnFormatter.addRow()


                    break;
                default:
                    throw new IllegalArgumentException("Unknown header: " + getOutputHeaders()[index]);
            }
        }
        columnFormatter.addRow(data);
        context.getActionReport().setMessage(columnFormatter.toString());
    }

    @Override
    protected final String[] getSupportedHeaders() {
View Full Code Here


                    }

                    if (filename == null)
                        filename = strings.get("backup-list.unavailable");

                    cf.addRow(new Object[] {
                              status.getBackupConfigName(),
                              status.getUserName(),
                              status.getTimeStamp(),
                              filename
                         });
View Full Code Here

                case JOB_PARAMETERS:
                    data = je.getJobParameters() == null ? new Properties() : je.getJobParameters();
                    jobParamIndex = index;
                    ColumnFormatter cf = new ColumnFormatter(new String[]{"KEY", "VALUE"});
                    for (Map.Entry e : ((Properties) data).entrySet())
                        cf.addRow(new String[]{e.getKey().toString(), e.getValue().toString()});
                    st = new StringTokenizer(cf.toString(), "\n");
                    break;
                default:
                    throw new IllegalArgumentException("Unknown header: " + getOutputHeaders()[index]);
            }
View Full Code Here

                case JOB_PARAMETERS:
                    data = je.getJobParameters() == null ? new Properties() : je.getJobParameters();
                    jobParamIndex = index;
                    ColumnFormatter cf = new ColumnFormatter(new String[]{"KEY", "VALUE"});
                    for (Map.Entry e : ((Properties) data).entrySet())
                        cf.addRow(new String[]{e.getKey().toString(), e.getValue().toString()});
                    st = new StringTokenizer(cf.toString(), "\n");
                    break;
                case STEP_COUNT:
                    long exeId = executionId == null ? je.getExecutionId() : Long.valueOf(executionId);
                    data = jobOperator.getStepExecutions(exeId) == null
View Full Code Here

    public static String format(List<InstanceInfo> infos) {
        String headings[] = {NAME, HOST, PORT, PID, CLUSTER, STATE};
        ColumnFormatter cf = new ColumnFormatter(headings);
        for (InstanceInfo info : infos) {
            cf.addRow(new Object[]{
                        info.getName(),
                        info.getHost(),
                        info.getPort(),
                        formatPid(info),
                        info.getDisplayCluster(),
View Full Code Here

    }

    public static String formatBrief(List<InstanceInfo> infos) {
        ColumnFormatter cf = new ColumnFormatter();
        for (InstanceInfo info : infos) {
            cf.addRow(new Object[]{
                        info.getName(),
                        info.getDisplayState()
                    });
        }
        return cf.toString();
View Full Code Here

                String desc = loggerInfoMetadataService.getDescription(logger, locale);
                boolean published = loggerInfoMetadataService.isPublished(logger);
                if (subsystem == null) subsystem = UNKNOWN;
                if (desc == null) desc = UNKNOWN;
                if (published || listInternalLoggers) {
                    colFormatter.addRow(new Object[]{logger, subsystem, desc});
                    loggerSubsystems.put(logger, subsystem);
                    loggerDescriptions.put(logger, desc); //Needed for REST xml and JSON output
                    loggerList.add(logger); //Needed for REST xml and JSON output                                   
                }
            }
View Full Code Here

                    break;
                default:
                    throw new IllegalArgumentException("Unknown header: " + getOutputHeaders()[index]);
            }
        }
        columnFormatter.addRow(data);
        context.getActionReport().setMessage(columnFormatter.toString());
    }


    @Override
View Full Code Here

                case JOB_PARAMETERS:
                    data = je.getJobParameters() == null ? new Properties() : je.getJobParameters();
                    jobParamIndex = index;
                    ColumnFormatter cf = new ColumnFormatter(new String[]{"KEY", "VALUE"});
                    for (Map.Entry e : ((Properties) data).entrySet())
                        cf.addRow(new String[]{e.getKey().toString(), e.getValue().toString()});
                    st = new StringTokenizer(cf.toString(), "\n");
                    break;
                case STEP_COUNT:
                    long exeId = executionId == null ? je.getExecutionId() : Long.valueOf(executionId);
                    data = jobOperator.getStepExecutions(exeId) == null
View Full Code Here

                    Map<String, Long> metricMap = new HashMap<>();
                    if (stepExecution.getMetrics() != null) {
                        ColumnFormatter cf = new ColumnFormatter(new String[]{"METRICNAME", "VALUE"});
                        for (Metric metric : stepExecution.getMetrics()) {
                            metricMap.put(metric.getType().name(), metric.getValue());
                            cf.addRow(new Object[] {metric.getType().name(), metric.getValue()});
                        }
                        st = new StringTokenizer(cf.toString(), "\n");
                    }
                    data = metricMap;
                    break;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.