Package org.springframework.xd.rest.domain

Examples of org.springframework.xd.rest.domain.ModuleDefinitionResource


    return createResourceWithId(entity.getType() + "/" + entity.getName(), entity);
  }

  @Override
  protected ModuleDefinitionResource instantiateResource(ModuleDefinition entity) {
    return new ModuleDefinitionResource(entity.getName(), entity.getType().name(), entity.isComposed());
  }
View Full Code Here


  @ResponseStatus(HttpStatus.CREATED)
  @ResponseBody
  public ModuleDefinitionResource save(@RequestParam("name") String name,
      @RequestParam("definition") String definition) {
    ModuleDefinition moduleDefinition = moduleDefinitionService.compose(name, /*TODO*/null, definition);
    ModuleDefinitionResource resource = moduleDefinitionResourceAssembler.toResource(moduleDefinition);
    return resource;
  }
View Full Code Here

    assertThat(secondRow.getValue(3), equalTo(""));
  }


  private ModuleDefinitionResource resource(String name, String type, boolean composed) {
    return new ModuleDefinitionResource(name, type, composed);
  }
View Full Code Here

  @CliCommand(value = COMPOSE_MODULE, help = "Create a virtual module")
  public String createModule(
      @CliOption(mandatory = true, key = { "name", "" }, help = "the name to give to the module") String name,
      @CliOption(mandatory = true, key = "definition", optionContext = "completion-module disable-string-converter", help = "module definition using xd dsl") String dsl) {
    ModuleDefinitionResource composedModule = moduleOperations().composeModule(name, dsl);
    return String.format(("Successfully created module '%s' with type %s"), composedModule.getName(),
        composedModule.getType());
  }
View Full Code Here

TOP

Related Classes of org.springframework.xd.rest.domain.ModuleDefinitionResource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.