Class AppRegistryController
java.lang.Object
org.springframework.cloud.dataflow.server.controller.AppRegistryController
@RestController
@RequestMapping("/apps")
@ExposesResourceFor(AppRegistrationResource.class)
public class AppRegistryController
extends Object
Handles all
DefaultAppRegistryService related interactions.- Author:
- Glenn Renfro, Mark Fisher, Gunnar Hillert, Eric Bottard, Gary Russell, Patrick Peralta, Thomas Risberg, Chris Schaefer, Corneil du Plessis
-
Constructor Summary
ConstructorsConstructorDescriptionAppRegistryController(Optional<StreamDefinitionRepository> streamDefinitionRepository, Optional<StreamService> streamService, AppRegistryService appRegistryService, ApplicationConfigurationMetadataResolver metadataResolver, ForkJoinPool forkJoinPool, StreamDefinitionService streamDefinitionService, AppRegistrationAssemblerProvider<? extends AppRegistrationResource> appRegistrationAssemblerProvider) -
Method Summary
Modifier and TypeMethodDescriptioninfo(ApplicationType type, String name, boolean exhaustive) info(ApplicationType type, String name, String version, boolean exhaustive) Retrieve detailed information about a particular application.org.springframework.hateoas.PagedModel<? extends AppRegistrationResource>list(org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<AppRegistration> pagedResourcesAssembler, ApplicationType type, String search, String version, boolean defaultVersion) List app registrations.voidmakeDefault(ApplicationType type, String name, String version) Set a module version as defaultvoidregister(ApplicationType type, String name, String bootVersion, String uri, String metadataUri, boolean force) voidregister(ApplicationType type, String name, String version, String bootVersion, String uri, String metadataUri, boolean force) Register a module name and type with its URI.org.springframework.hateoas.PagedModel<? extends AppRegistrationResource>registerAll(org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<AppRegistration> pagedResourcesAssembler, String uri, String apps, boolean force) Register all applications listed in a properties file or provided as key/value pairs.voidunregister(ApplicationType type, String name) voidunregister(ApplicationType type, String name, String version) Unregister an application by name and type.void
-
Constructor Details
-
AppRegistryController
public AppRegistryController(Optional<StreamDefinitionRepository> streamDefinitionRepository, Optional<StreamService> streamService, AppRegistryService appRegistryService, ApplicationConfigurationMetadataResolver metadataResolver, ForkJoinPool forkJoinPool, StreamDefinitionService streamDefinitionService, AppRegistrationAssemblerProvider<? extends AppRegistrationResource> appRegistrationAssemblerProvider)
-
-
Method Details
-
list
@GetMapping @ResponseStatus(OK) public org.springframework.hateoas.PagedModel<? extends AppRegistrationResource> list(org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<AppRegistration> pagedResourcesAssembler, @RequestParam(required=false) ApplicationType type, @RequestParam(required=false) String search, @RequestParam(required=false) String version, @RequestParam(required=false) boolean defaultVersion) List app registrations. Optional type and findByTaskNameContains parameters can be passed to do filtering. Search parameter only filters byAppRegistrationname field.- Parameters:
pageable- Pagination informationpagedResourcesAssembler- the resource assembler for app registrationstype- the application type: source, sink, processor, taskversion- optional application versionsearch- optional findByTaskNameContains parameterdefaultVersion- Indicator to use default version.- Returns:
- the list of registered applications
-
info
@GetMapping("/{type}/{name}/{version:.+}") @ResponseStatus(OK) public DetailedAppRegistrationResource info(@PathVariable ApplicationType type, @PathVariable String name, @PathVariable String version, @RequestParam(required=false) boolean exhaustive) Retrieve detailed information about a particular application.- Parameters:
type- application typename- application nameversion- application versionexhaustive- if set to true all properties are returned- Returns:
- detailed application information
-
info
@GetMapping("/{type}/{name}") @ResponseStatus(OK) public DetailedAppRegistrationResource info(@PathVariable ApplicationType type, @PathVariable String name, @RequestParam(required=false) boolean exhaustive) -
register
@PostMapping("/{type}/{name}/{version:.+}") @ResponseStatus(CREATED) public void register(@PathVariable ApplicationType type, @PathVariable String name, @PathVariable String version, @RequestParam(required=false) @Deprecated String bootVersion, @RequestParam String uri, @RequestParam(name="metadata-uri",required=false) String metadataUri, @RequestParam(defaultValue="false") boolean force) Register a module name and type with its URI.- Parameters:
type- module typename- module nameversion- module versionbootVersion- module boot version ornullto use the default. Deprecated: bootVersion parameter is ignored.uri- URI for the module artifact (e.g. maven://group:artifact:version)metadataUri- URI for the metadata artifactforce- iftrue, overwrites a pre-existing registration
-
register
@PostMapping("/{type}/{name}") @ResponseStatus(CREATED) public void register(@PathVariable ApplicationType type, @PathVariable String name, @RequestParam(required=false) String bootVersion, @RequestParam String uri, @RequestParam(name="metadata-uri",required=false) String metadataUri, @RequestParam(defaultValue="false") boolean force) -
makeDefault
@PutMapping("/{type}/{name}/{version:.+}") @ResponseStatus(ACCEPTED) public void makeDefault(@PathVariable ApplicationType type, @PathVariable String name, @PathVariable String version) Set a module version as default- Parameters:
type- module typename- module nameversion- module version
-
unregister
@DeleteMapping("/{type}/{name}/{version:.+}") @ResponseStatus(OK) public void unregister(@PathVariable ApplicationType type, @PathVariable String name, @PathVariable String version) Unregister an application by name and type. If the application does not exist, aNoSuchAppRegistrationExceptionwill be thrown.- Parameters:
type- the application typename- the application nameversion- application version
-
unregister
@DeleteMapping("/{type}/{name}") @ResponseStatus(OK) public void unregister(@PathVariable ApplicationType type, @PathVariable String name) -
unregisterAll
-
registerAll
@PostMapping @ResponseStatus(CREATED) public org.springframework.hateoas.PagedModel<? extends AppRegistrationResource> registerAll(org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<AppRegistration> pagedResourcesAssembler, @RequestParam(required=false) String uri, @RequestParam(required=false) String apps, @RequestParam(defaultValue="false") boolean force) Register all applications listed in a properties file or provided as key/value pairs.- Parameters:
pageable- Pagination informationpagedResourcesAssembler- the resource assembly for app registrationsuri- URI for the properties fileapps- key/value pairs representing applications, separated by newlinesforce- iftrue, overwrites any pre-existing registrations- Returns:
- the collection of registered applications
-