Class AttributeStatisticsAdminController
java.lang.Object
org.tailormap.api.controller.admin.AttributeStatisticsAdminController
-
Constructor Summary
ConstructorsConstructorDescriptionAttributeStatisticsAdminController(FeatureTypeRepository featureTypeRepository, FeatureSourceFactoryHelper featureSourceFactoryHelper) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<AttributeStatisticsResponse> getStatistics(Long featureTypeId, String attributeName, String filter) Retrieve attribute statistics for a feature type.org.springframework.http.ResponseEntity<?> handleException(org.springframework.web.server.ResponseStatusException ex)
-
Constructor Details
-
AttributeStatisticsAdminController
public AttributeStatisticsAdminController(FeatureTypeRepository featureTypeRepository, FeatureSourceFactoryHelper featureSourceFactoryHelper)
-
-
Method Details
-
handleException
@ExceptionHandler(org.springframework.web.server.ResponseStatusException.class) public org.springframework.http.ResponseEntity<?> handleException(org.springframework.web.server.ResponseStatusException ex) -
getStatistics
@GetMapping(path="${tailormap-api.admin.base-path}/statistics/{featureTypeId}/{attributeName}", produces="application/json") public org.springframework.http.ResponseEntity<AttributeStatisticsResponse> getStatistics(@PathVariable Long featureTypeId, @PathVariable String attributeName, @RequestParam(required=false) String filter) Retrieve attribute statistics for a feature type.- Parameters:
featureTypeId- the feature type id for which to retrieve statisticsattributeName- the name of the attributefilter- an optional CQL filter to apply to the features before calculating statistics- Returns:
- @return the calculated statistics; fields may be null when not applicable or when no features match
- Throws:
org.springframework.web.server.ResponseStatusException- if the feature type or attribute does not exist, or if a bad request was submitted
-