@Override public Collection<SchemaBranch> getSchemaBranches(String schemaName) throws SchemaNotFoundException { return schemaRegistry.getSchemaBranches(schemaName); }
@GET @Path("/schemas/{name}/branches") @ApiOperation(value = "Get list of registered schema branches", response = SchemaBranch.class, responseContainer = "List", tags = OPERATION_GROUP_OTHER) @Timed @UnitOfWork public Response getAllBranches(@ApiParam(value = "Details about schema name",required = true) @PathParam("name") String schemaName, @Context UriInfo uriInfo) { try { Collection<SchemaBranch> schemaBranches = schemaRegistry.getSchemaBranches(schemaName); return WSUtils.respondEntities(schemaBranches, Response.Status.OK); } catch(SchemaNotFoundException e) { return WSUtils.respond(Response.Status.NOT_FOUND, CatalogResponse.ResponseMessage.ENTITY_NOT_FOUND, schemaName); } catch (Exception ex) { LOG.error("Encountered error while listing schema branches", ex); return WSUtils.respond(Response.Status.INTERNAL_SERVER_ERROR, CatalogResponse.ResponseMessage.EXCEPTION, ex.getMessage()); } }
@GET @Path("/schemas/{name}/branches") @ApiOperation(value = "Get list of registered schema branches", response = SchemaBranch.class, responseContainer = "List", tags = OPERATION_GROUP_OTHER) @Timed @UnitOfWork public Response getAllBranches(@ApiParam(value = "Details about schema name",required = true) @PathParam("name") String schemaName, @Context UriInfo uriInfo) { try { Collection<SchemaBranch> schemaBranches = schemaRegistry.getSchemaBranches(schemaName); return WSUtils.respondEntities(schemaBranches, Response.Status.OK); } catch(SchemaNotFoundException e) { return WSUtils.respond(Response.Status.NOT_FOUND, CatalogResponse.ResponseMessage.ENTITY_NOT_FOUND, schemaName); } catch (Exception ex) { LOG.error("Encountered error while listing schema branches", ex); return WSUtils.respond(Response.Status.INTERNAL_SERVER_ERROR, CatalogResponse.ResponseMessage.EXCEPTION, ex.getMessage()); } }