/**
 * Copyright (C) 2009 - present by OpenGamma Inc. and the OpenGamma group of companies
 *
 * Please see distribution for license.
 */
package com.opengamma.financial.marketdatasnapshot.rest;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.core.Response;

import com.opengamma.engine.marketdatasnapshot.MarketDataSnapshotter;
import com.opengamma.engine.view.ViewProcessor;
import com.opengamma.financial.analytics.volatility.cube.VolatilityCubeDefinitionSource;
import com.opengamma.financial.marketdatasnapshot.MarketDataSnapshotterImpl;
import com.opengamma.financial.view.rest.DataViewProcessorsResource;

/**
 * RESTful back-end to provide access to {@link MarketDataSnapshotter}s
 * TODO: this directly
 */
@Path("/data/marketDataSnapshotters")
public class MarketDataSnapshottersResource {
  //private final Map<UniqueId, MarketDataSnapshotterResource> _resourceMap = new HashMap<UniqueId, MarketDataSnapshotterResource>();
  private final DataViewProcessorsResource _processors;
  private final VolatilityCubeDefinitionSource _volatilityCubeDefinitionSource;
  
  public MarketDataSnapshottersResource(final DataViewProcessorsResource processors, VolatilityCubeDefinitionSource volatilityCubeDefinitionSource) {
    _processors = processors;
    _volatilityCubeDefinitionSource = volatilityCubeDefinitionSource;
  }
  
  @Path("{viewProcessorId}")
  public MarketDataSnapshotterResource createFromViewProcessor(@PathParam("viewProcessorId") String viewProcessorId) {
    ViewProcessor viewProcessor = _processors.findViewProcessor(viewProcessorId).getViewProcessor();
    return new MarketDataSnapshotterResource(viewProcessor, new MarketDataSnapshotterImpl(_volatilityCubeDefinitionSource));
  }
  
  @GET
  public Response get() {
    return _processors.get();
  }
}

@@ -848,142 +848,8 @@
 e %7B%0A
-  //private final Map%3CUniqueId, MarketDataSnapshotterResource%3E _resourceMap = new HashMap%3CUniqueId, MarketDataSnapshotterResource%3E();%0A
   pr
@@ -1669,23 +1669,27 @@
 urn 
-_processors.get
+Response.ok().build
 ();%0A

Stop returning the view processes for /data/marketDataSnapshotters