class TenantController {

  @RequestMapping(
      value = "/{token:.+}",
      method = RequestMethod.GET,
      produces = {"application/json;charset=UTF-8"})
  @JsonView(Views.Default.class)
  public ResponseEntity<Tenant> getTenant(@PathVariable String token) {
    try {
      // Load existing tenant
      try {
        final Tenant tenant =
            TenantRepository.FILTER.findOne(this.tenantRepository.findBySecondaryKey(token));
        return new ResponseEntity<Tenant>(tenant, HttpStatus.OK);
      } catch (EntityNotFoundException enfe) {
        return new ResponseEntity<Tenant>(HttpStatus.NOT_FOUND);
      }
    } catch (Exception enfe) {
      return new ResponseEntity<Tenant>(HttpStatus.INTERNAL_SERVER_ERROR);
    }
  }

  @Autowired  TenantController(TenantRepository tenantRepository, Filter cacheFilter);

}