@Controller @RequestMapping(value="/modules") @ExposesResourceFor(value=ModuleDefinitionResource.class) public class ModulesController extends java.lang.Object
Constructor and Description |
---|
ModulesController(ModuleDefinitionService moduleDefinitionService,
DetailedModuleDefinitionResourceAssembler detailedAssembler) |
Modifier and Type | Method and Description |
---|---|
ModuleDefinitionResource |
compose(ModuleType type,
java.lang.String name,
java.lang.String definition,
boolean force)
Create (install) a new module, by way of composition.
|
ModuleDefinitionResource |
compose(java.lang.String name,
java.lang.String definition,
boolean force)
Create (install) a new module, by way of composition.
|
void |
delete(ModuleType type,
java.lang.String name)
Delete a module.
|
DetailedModuleDefinitionResource |
info(ModuleType type,
java.lang.String name)
Retrieve detailed module definition about a particular module.
|
org.springframework.hateoas.PagedResources<? extends ModuleDefinitionResource> |
list(org.springframework.data.domain.Pageable pageable,
org.springframework.data.web.PagedResourcesAssembler<ModuleDefinition> assembler,
ModuleType type,
boolean detailed)
List Module definitions.
|
ModuleDefinitionResource |
upload(ModuleType type,
java.lang.String name,
boolean force,
byte[] bytes)
Create (install) a new module, by way of uploading a module archive.
|
@Autowired public ModulesController(ModuleDefinitionService moduleDefinitionService, DetailedModuleDefinitionResourceAssembler detailedAssembler)
@RequestMapping(value="", method=GET) @ResponseStatus(value=OK) @ResponseBody public org.springframework.hateoas.PagedResources<? extends ModuleDefinitionResource> list(org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<ModuleDefinition> assembler, @RequestParam(value="type",required=false) ModuleType type, @RequestParam(value="detailed",defaultValue="false") boolean detailed)
@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 compose(@RequestParam(value="name") java.lang.String name, @RequestParam(value="definition") java.lang.String definition, @RequestParam(value="force",defaultValue="false") boolean force)
name
- The name of the module to create (required)definition
- The module definition, expressed in the XD DSL (required)@RequestMapping(value="/{type}/{name}", method=POST, consumes="text/plain") @ResponseStatus(value=CREATED) @ResponseBody public ModuleDefinitionResource compose(@PathVariable(value="type") ModuleType type, @PathVariable(value="name") java.lang.String name, @RequestBody java.lang.String definition, @RequestParam(value="force",defaultValue="false") boolean force)
type
- The type of the module to create (required)name
- The name of the module to create (required)definition
- The module definition, expressed in the XD DSL (required)@RequestMapping(value="/{type}/{name}", method=POST, consumes="application/octet-stream") @ResponseStatus(value=CREATED) @ResponseBody public ModuleDefinitionResource upload(@PathVariable(value="type") ModuleType type, @PathVariable(value="name") java.lang.String name, @RequestParam(value="force",defaultValue="false") boolean force, @RequestBody byte[] bytes)
type
- The type of the module to create (required)name
- The name of the module to create (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)