xdRuntime.add(entityLinks.linkFor(JobExecutionInfoResource.class).withRel("jobs/executions"));
xdRuntime.add(entityLinks.linkFor(JobInstanceInfoResource.class).withRel("jobs/instances"));
// Maybe https://github.com/spring-projects/spring-hateoas/issues/169 will help eventually
TemplateVariable start = new TemplateVariable("start", VariableType.REQUEST_PARAM);
TemplateVariable lod = new TemplateVariable("detailLevel", VariableType.REQUEST_PARAM_CONTINUED);
TemplateVariables vars = new TemplateVariables(start, lod);
for (CompletionKind k : CompletionKind.values()) {
Object mi = ControllerLinkBuilder.methodOn(CompletionsController.class).completions(k, "", 42);
Link link = ControllerLinkBuilder.linkTo(mi).withRel(String.format("completions/%s", k));
String href = link.getHref().substring(0, link.getHref().lastIndexOf('?'));