@RestController @RequestMapping(value="/apps") @ExposesResourceFor(value=AppRegistrationResource.class) public class AppRegistryController extends Object
DefaultAppRegistryService
related interactions.Constructor and Description |
---|
AppRegistryController(Optional<StreamDefinitionRepository> streamDefinitionRepository,
Optional<StreamService> streamService,
AppRegistryService appRegistryService,
ApplicationConfigurationMetadataResolver metadataResolver,
ForkJoinPool forkJoinPool,
StreamDefinitionService streamDefinitionService,
AppRegistrationAssemblerProvider<? extends AppRegistrationResource> appRegistrationAssemblerProvider) |
Modifier and Type | Method and Description |
---|---|
DetailedAppRegistrationResource |
info(ApplicationType type,
String name,
boolean exhaustive)
Deprecated.
|
DetailedAppRegistrationResource |
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.
|
void |
makeDefault(ApplicationType type,
String name,
String version)
Set a module version as default
|
void |
register(ApplicationType type,
String name,
String bootVersion,
String uri,
String metadataUri,
boolean force)
Deprecated.
|
void |
register(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.
|
void |
unregister(ApplicationType type,
String name)
Deprecated.
|
void |
unregister(ApplicationType type,
String name,
String version)
Unregister an application by name and type.
|
void |
unregisterAll() |
public AppRegistryController(Optional<StreamDefinitionRepository> streamDefinitionRepository, Optional<StreamService> streamService, AppRegistryService appRegistryService, ApplicationConfigurationMetadataResolver metadataResolver, ForkJoinPool forkJoinPool, StreamDefinitionService streamDefinitionService, AppRegistrationAssemblerProvider<? extends AppRegistrationResource> appRegistrationAssemblerProvider)
@GetMapping @ResponseStatus(value=OK) public org.springframework.hateoas.PagedModel<? extends AppRegistrationResource> list(org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<AppRegistration> pagedResourcesAssembler, @RequestParam(value="type",required=false) ApplicationType type, @RequestParam(required=false) String search, @RequestParam(required=false) String version, @RequestParam(required=false) boolean defaultVersion)
AppRegistration
name field.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.@RequestMapping(value="/{type}/{name}/{version:.+}", method=GET) @ResponseStatus(value=OK) public DetailedAppRegistrationResource info(@PathVariable(value="type") ApplicationType type, @PathVariable(value="name") String name, @PathVariable(value="version") String version, @RequestParam(required=false,name="exhaustive") boolean exhaustive)
type
- application typename
- application nameversion
- application versionexhaustive
- if set to true all properties are returned@Deprecated @RequestMapping(value="/{type}/{name}", method=GET) @ResponseStatus(value=OK) public DetailedAppRegistrationResource info(@PathVariable(value="type") ApplicationType type, @PathVariable(value="name") String name, @RequestParam(required=false,name="exhaustive") boolean exhaustive)
@RequestMapping(value="/{type}/{name}/{version:.+}", method=POST) @ResponseStatus(value=CREATED) public void register(@PathVariable(value="type") ApplicationType type, @PathVariable(value="name") String name, @PathVariable(value="version") String version, @RequestParam(name="bootVersion",required=false) String bootVersion, @RequestParam(value="uri") String uri, @RequestParam(name="metadata-uri",required=false) String metadataUri, @RequestParam(value="force",defaultValue="false") boolean force)
type
- module typename
- module nameversion
- module versionbootVersion
- module boot version or null
to use the defaulturi
- URI for the module artifact (e.g. maven://group:artifact:version)metadataUri
- URI for the metadata artifactforce
- if true
, overwrites a pre-existing registration@Deprecated @RequestMapping(value="/{type}/{name}", method=POST) @ResponseStatus(value=CREATED) public void register(@PathVariable(value="type") ApplicationType type, @PathVariable(value="name") String name, @RequestParam(name="bootVersion",required=false) String bootVersion, @RequestParam(value="uri") String uri, @RequestParam(name="metadata-uri",required=false) String metadataUri, @RequestParam(value="force",defaultValue="false") boolean force)
@RequestMapping(value="/{type}/{name}/{version:.+}", method=PUT) @ResponseStatus(value=ACCEPTED) public void makeDefault(@PathVariable(value="type") ApplicationType type, @PathVariable(value="name") String name, @PathVariable(value="version") String version)
type
- module typename
- module nameversion
- module version@RequestMapping(value="/{type}/{name}/{version:.+}", method=DELETE) @ResponseStatus(value=OK) public void unregister(@PathVariable(value="type") ApplicationType type, @PathVariable(value="name") String name, @PathVariable(value="version") String version)
NoSuchAppRegistrationException
will be thrown.type
- the application typename
- the application nameversion
- application version@Deprecated @RequestMapping(value="/{type}/{name}", method=DELETE) @ResponseStatus(value=OK) public void unregister(@PathVariable(value="type") ApplicationType type, @PathVariable(value="name") String name)
@RequestMapping(method=DELETE) @ResponseStatus(value=OK) public void unregisterAll()
@RequestMapping(method=POST) @ResponseStatus(value=CREATED) public org.springframework.hateoas.PagedModel<? extends AppRegistrationResource> registerAll(org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<AppRegistration> pagedResourcesAssembler, @RequestParam(value="uri",required=false) String uri, @RequestParam(value="apps",required=false) String apps, @RequestParam(value="force",defaultValue="false") boolean force)
pageable
- Pagination informationpagedResourcesAssembler
- the resource assembly for app registrationsuri
- URI for the properties fileapps
- key/value pairs representing applications, separated by newlinesforce
- if true
, overwrites any pre-existing registrationsCopyright © 2023 Pivotal Software, Inc.. All rights reserved.