@GET @Path("/balancer") @Produces(MediaType.TEXT_HTML) public Response getBalancer() { String rendered = miruManageService.renderBalancer(); return Response.ok(rendered).build(); }
@GET @Path("/hosts/{logicalName}") @Produces(MediaType.TEXT_HTML) public Response getHostsWithFocus(@PathParam("logicalName") String logicalName) { String rendered = miruManageService.renderHostsWithFocus(new MiruHost(logicalName)); return Response.ok(rendered).build(); }
@GET @Path("/hosts") @Produces(MediaType.TEXT_HTML) public Response getHosts() { String rendered = miruManageService.renderHosts(); return Response.ok(rendered).build(); }
@POST @Path("/schema") @Produces(MediaType.TEXT_HTML) @Consumes(MediaType.APPLICATION_FORM_URLENCODED) public Response getSchemaWithLookup( @FormParam("tenantId") @DefaultValue("") String tenantId, @FormParam("lookupName") String lookupName, @FormParam("lookupVersion") @DefaultValue("-1") String lookupVersion, @FormParam("action") @DefaultValue("lookup") String action, @FormParam("upgradeOnMissing") @DefaultValue("false") boolean upgradeOnMissing, @FormParam("upgradeOnError") @DefaultValue("false") boolean upgradeOnError) { String rendered = miruManageService.renderSchema( new MiruSchemaRegion.SchemaInput( tenantId != null && !tenantId.trim().isEmpty() ? new MiruTenantId(tenantId.trim().getBytes(Charsets.UTF_8)) : null, lookupName != null && !lookupName.trim().isEmpty() ? lookupName.trim() : null, lookupVersion != null && !lookupVersion.trim().isEmpty() ? Integer.parseInt(lookupVersion.trim()) : -1, action, upgradeOnMissing, upgradeOnError)); return Response.ok(rendered).build(); }
@GET @Path("/tenants/{tenantId}") @Produces(MediaType.TEXT_HTML) public Response getTenantsForTenant(@PathParam("tenantId") String tenantId) { String rendered = miruManageService.renderTenantsWithFocus( new MiruTenantId(tenantId.getBytes(Charsets.UTF_8))); return Response.ok(rendered).build(); }
@GET @Path("/schema") @Produces(MediaType.TEXT_HTML) public Response getSchema() { String rendered = miruManageService.renderSchema( new MiruSchemaRegion.SchemaInput(null, null, -1, "lookup", false, false)); return Response.ok(rendered).build(); }