@Controller @RequestMapping(value="/modules") @ExposesResourceFor(value=ModuleDefinitionResource.class) public class ModulesController extends java.lang.Object
| Constructor and Description |
|---|
ModulesController(CompositeModuleDefinitionService compositeModuleDefinitionService,
DetailedModuleDefinitionResourceAssembler detailedAssembler) |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(ModuleType type,
java.lang.String name)
Delete a (composite) module.
|
org.springframework.core.io.Resource |
downloadDefinition(ModuleType type,
java.lang.String name)
Retrieve the configuration file for the provided module information.
|
DetailedModuleDefinitionResource |
info(ModuleType type,
java.lang.String name)
Retrieve detailed module definition about a particular module.
|
org.springframework.hateoas.PagedResources<ModuleDefinitionResource> |
list(org.springframework.data.domain.Pageable pageable,
org.springframework.data.web.PagedResourcesAssembler<ModuleDefinition> assembler,
ModuleType type)
List Module definitions.
|
ModuleDefinitionResource |
save(java.lang.String name,
java.lang.String definition)
Create a new composite Module.
|
@Autowired public ModulesController(CompositeModuleDefinitionService compositeModuleDefinitionService, DetailedModuleDefinitionResourceAssembler detailedAssembler)
@RequestMapping(value="",
method=GET)
@ResponseStatus(value=OK)
@ResponseBody
public org.springframework.hateoas.PagedResources<ModuleDefinitionResource> list(org.springframework.data.domain.Pageable pageable,
org.springframework.data.web.PagedResourcesAssembler<ModuleDefinition> assembler,
@RequestParam(value="type",required=false)
ModuleType type)
@RequestMapping(value="/{type}/{name}",
method=GET)
@ResponseStatus(value=OK)
@ResponseBody
public DetailedModuleDefinitionResource info(@PathVariable(value="type")
ModuleType type,
@PathVariable(value="name")
java.lang.String name)
@RequestMapping(value="",
method=POST)
@ResponseStatus(value=CREATED)
@ResponseBody
public ModuleDefinitionResource save(@RequestParam(value="name")
java.lang.String name,
@RequestParam(value="definition")
java.lang.String definition)
name - The name of the module to create (required)definition - The module definition, expressed in the XD DSL (required)@RequestMapping(value="/{type}/{name}",
method=DELETE)
@ResponseStatus(value=OK)
public void delete(@PathVariable(value="type")
ModuleType type,
@PathVariable(value="name")
java.lang.String name)
@RequestMapping(value="/{type}/{name}/definition",
method=GET,
produces="application/xml")
@ResponseStatus(value=OK)
@ResponseBody
public org.springframework.core.io.Resource downloadDefinition(@PathVariable(value="type")
ModuleType type,
@PathVariable(value="name")
java.lang.String name)
name - the name of an existing resource (required)type - the type of the module (required)