// Path: src/main/java/org/broadinstitute/macarthurlab/matchbox/entities/Metric.java
// public class Metric {
// }
// 
// Path: src/main/java/org/broadinstitute/macarthurlab/matchbox/metrics/MetricService.java
// public interface MetricService {
// 	public Metric getMetrics();
// }


import java.util.HashMap;
import java.util.Map;
import org.broadinstitute.macarthurlab.matchbox.entities.Metric;
import org.broadinstitute.macarthurlab.matchbox.metrics.MetricService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
/**
 * An  endpoint to deliver metrics
 */
package org.broadinstitute.macarthurlab.matchbox.controllers;



/**
 * @author harindra
 *
 */

@RestController
@CrossOrigin(origins = "*")
public class MetricsController {
	private final String CONTENT_TYPE_HEADER="application/vnd.ga4gh.matchmaker.v1.0+json ";
	
	@Autowired
	@Qualifier("privilegedMetricServiceImpl")
	private MetricService privilegedMetric;
	
	@Autowired
	@Qualifier("publicMetricServiceImpl")
	private MetricService publicMetric;
	
	private final Logger logger = LoggerFactory.getLogger(this.getClass());
	
	/**
	 * Constructor for testing
	 */
	public MetricsController() {}
	
	
	
	/**
	 * Controller for /metrics GET end-point.Returns metric of LOCAL DATABASE ONLY
	 * and is meant for INTERNAL VIEWING ONLY
	 * TODO: add a "privileged" phrase to URL so it looks like /metrics/privileged
	 */
	@RequestMapping(method = RequestMethod.GET, value = "/metrics")
// Path: src/main/java/org/broadinstitute/macarthurlab/matchbox/entities/Metric.java
// public class Metric {
// }
// 
// Path: src/main/java/org/broadinstitute/macarthurlab/matchbox/metrics/MetricService.java
// public interface MetricService {
// 	public Metric getMetrics();
// }


// Path: src/main/java/org/broadinstitute/macarthurlab/matchbox/controllers/MetricsController.java
import java.util.HashMap;
import java.util.Map;
import org.broadinstitute.macarthurlab.matchbox.entities.Metric;
import org.broadinstitute.macarthurlab.matchbox.metrics.MetricService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * An  endpoint to deliver metrics
 */
package org.broadinstitute.macarthurlab.matchbox.controllers;



/**
 * @author harindra
 *
 */

@RestController
@CrossOrigin(origins = "*")
public class MetricsController {
	private final String CONTENT_TYPE_HEADER="application/vnd.ga4gh.matchmaker.v1.0+json ";
	
	@Autowired
	@Qualifier("privilegedMetricServiceImpl")
	private MetricService privilegedMetric;
	
	@Autowired
	@Qualifier("publicMetricServiceImpl")
	private MetricService publicMetric;
	
	private final Logger logger = LoggerFactory.getLogger(this.getClass());
	
	/**
	 * Constructor for testing
	 */
	public MetricsController() {}
	
	
	
	/**
	 * Controller for /metrics GET end-point.Returns metric of LOCAL DATABASE ONLY
	 * and is meant for INTERNAL VIEWING ONLY
	 * TODO: add a "privileged" phrase to URL so it looks like /metrics/privileged
	 */
	@RequestMapping(method = RequestMethod.GET, value = "/metrics")
	public Map<String,Metric> internalMatch() {		