ViewportResultsJsonCsvWriter viewportResultsWriter = new ViewportResultsJsonCsvWriter(resultsFormatter);
repo.getRestComponents().publishResource(aggregatorsResource);
repo.getRestComponents().publishResource(snapshotResource);
if (getLiveMarketDataProviderFactory() != null) {
repo.getRestComponents().publishResource(new LiveMarketDataProviderNamesResource(getLiveMarketDataProviderFactory()));
} else if (getMarketDataSpecificationRepository() != null) {
repo.getRestComponents().publishResource(new LiveMarketDataSpecificationNamesResource(getMarketDataSpecificationRepository()));
} else {
throw new OpenGammaRuntimeException("Neither " + marketDataSpecificationRepository().name() + " nor " + liveMarketDataProviderFactory().name() + " were specified");
}