@Override public Collection<SchemaVersionKey> findSchemasByFields(SchemaFieldQuery schemaFieldQuery) throws SchemaBranchNotFoundException, SchemaNotFoundException { return schemaRegistry.findSchemasByFields(schemaFieldQuery); }
@GET @Path("/search/schemas/fields") @ApiOperation(value = "Search for schemas containing the given field names", notes = "Search the schemas for given field names and return a list of schemas that contain the field.", response = SchemaVersionKey.class, responseContainer = "List", tags = OPERATION_GROUP_SCHEMA) @Timed @UnitOfWork public Response findSchemasByFields(@Context UriInfo uriInfo) { MultivaluedMap<String, String> queryParameters = uriInfo.getQueryParameters(); try { Collection<SchemaVersionKey> schemaVersionKeys = schemaRegistry.findSchemasByFields(buildSchemaFieldQuery(queryParameters)); return WSUtils.respondEntities(schemaVersionKeys, Response.Status.OK); } catch (Exception ex) { LOG.error("Encountered error while finding schemas for given fields [{}]", queryParameters, ex); return WSUtils.respond(Response.Status.INTERNAL_SERVER_ERROR, CatalogResponse.ResponseMessage.EXCEPTION, ex.getMessage()); } }
@GET @Path("/search/schemas/fields") @ApiOperation(value = "Search for schemas containing the given field names", notes = "Search the schemas for given field names and return a list of schemas that contain the field.", response = SchemaVersionKey.class, responseContainer = "List", tags = OPERATION_GROUP_SCHEMA) @Timed @UnitOfWork public Response findSchemasByFields(@Context UriInfo uriInfo) { MultivaluedMap<String, String> queryParameters = uriInfo.getQueryParameters(); try { Collection<SchemaVersionKey> schemaVersionKeys = schemaRegistry.findSchemasByFields(buildSchemaFieldQuery(queryParameters)); return WSUtils.respondEntities(schemaVersionKeys, Response.Status.OK); } catch (Exception ex) { LOG.error("Encountered error while finding schemas for given fields [{}]", queryParameters, ex); return WSUtils.respond(Response.Status.INTERNAL_SERVER_ERROR, CatalogResponse.ResponseMessage.EXCEPTION, ex.getMessage()); } }