Examples of ResultsFormatter


Examples of com.opengamma.web.analytics.formatting.ResultsFormatter

    GridColumn col3 = new GridColumn("col3", "col3 desc", Double.class, renderer);
    GridColumn col4 = new GridColumn("col4", "col4 desc", String.class, renderer);
    GridColumnGroup group1 = new GridColumnGroup("group1", ImmutableList.of(col1, col2), true);
    GridColumnGroup group2 = new GridColumnGroup("group2", ImmutableList.of(col3, col4), false);
    ImmutableList<GridColumnGroup> groups = ImmutableList.of(group1, group2);
    GridColumnsJsonWriter writer = new GridColumnsJsonWriter(new ResultsFormatter());
    String json = writer.getJson(groups);
    String expectedJson =
        "[{\"name\":\"group1\",\"dependencyGraphsAvailable\":true,\"columns\":[" +
            "{\"header\":\"col1\",\"description\":\"col1 desc\",\"type\":\"DOUBLE\"}," +
            "{\"header\":\"col2\",\"description\":\"col2 desc\",\"type\":\"STRING\"}]}," +
View Full Code Here

Examples of com.opengamma.web.analytics.formatting.ResultsFormatter

                                                                         getPositionSource(),
                                                                         getCombinedConfigSource(),
                                                                         getSecuritySource(),
                                                                         getSecurityMaster(),
                                                                         getPositionMaster());
    ResultsFormatter resultsFormatter = new ResultsFormatter(_suppressCurrencyDisplay ? SUPPRESS_CURRENCY : DISPLAY_CURRENCY);
    GridColumnsJsonWriter columnWriter = new GridColumnsJsonWriter(resultsFormatter);
    ViewportResultsJsonCsvWriter viewportResultsWriter = new ViewportResultsJsonCsvWriter(resultsFormatter);

    repo.getRestComponents().publishResource(aggregatorsResource);
    repo.getRestComponents().publishResource(snapshotResource);
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.