Package org.mule.util

Examples of org.mule.util.SimpleLoggingTable$TableColumn


        Multimap<String, String> applicationsPerDomain = LinkedListMultimap.create();

        Map<String, ArtifactDeploymentStatusTracker.DeploymentState> domainDeploymentState = tracker.getDomainDeploymentStatusTracker().getDeploymentStates();

        SimpleLoggingTable domainTable = new SimpleLoggingTable();
        domainTable.addColumn(DOMAIN_OWNER_LABEL, ARTIFACT_NAME_LABEL_LENGTH);
        domainTable.addColumn(STATUS_LABEL, STATUS_LABEL_LENGTH);

        for (String domain : domainDeploymentState.keySet())
        {
            String[] data = new String[] {domain, domainDeploymentState.get(domain).toString()};
            domainTable.addDataRow(data);
        }

        Map<String, ArtifactDeploymentStatusTracker.DeploymentState> applicationStates = tracker.getApplicationDeploymentStatusTracker().getDeploymentStates();

        for (String applicationName : applicationStates.keySet())
        {
            Application application = deploymentService.findApplication(applicationName);
            applicationsPerDomain.put(application.getDomain().getArtifactName(), applicationName);
        }

        String message;

        if (!applicationsPerDomain.isEmpty())
        {
            SimpleLoggingTable applicationTable = new SimpleLoggingTable();
            applicationTable.addColumn(APPLICATION_LABEL, ARTIFACT_NAME_LABEL_LENGTH);
            applicationTable.addColumn(DOMAIN_OWNER_LABEL, DOMAIN_OWNER_LABEL_LENGTH);
            applicationTable.addColumn(STATUS_LABEL, STATUS_LABEL_LENGTH);

            for (String domainName : applicationsPerDomain.keySet())
            {
                for (String app : applicationsPerDomain.get(domainName))
                {
                    String[] data = new String[] {app, domainName, applicationStates.get(app).toString()};
                    applicationTable.addDataRow(data);
                }
            }

            message = String.format("%n%s%n%s", domainTable, applicationTable);
        }
View Full Code Here

TOP

Related Classes of org.mule.util.SimpleLoggingTable$TableColumn

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.