use of com.netflix.spinnaker.front50.model.tag.EntityTags in project front50 by spinnaker.
the class EntityTagsController method tag.
@RequestMapping(value = "/**", method = RequestMethod.GET)
public EntityTags tag(HttpServletRequest request) {
String pattern = (String) request.getAttribute(HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE);
final String searchTerm = new AntPathMatcher().extractPathWithinPattern(pattern, request.getServletPath());
return taggedEntityDAO.map(it -> it.findById(searchTerm)).orElseThrow(() -> new NotFoundException(format("No tags found for '%s'", searchTerm)));
}
Aggregations