@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) |
| 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)
List app registrations.
|
void |
makeDefault(ApplicationType type,
String name,
String version)
Set a module version as default
|
void |
register(ApplicationType type,
String name,
String uri,
String metadataUri,
boolean force)
Deprecated.
|
void |
register(ApplicationType type,
String name,
String version,
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)
@RequestMapping(method=GET) @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)
AppRegistration name field.pageable - Pagination informationpagedResourcesAssembler - the resource assembler for app registrationstype - the application type: source, sink, processor, tasksearch - optional findByTaskNameContains parameter@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(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 versionuri - 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(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) throws IOException
pageable - Pagination informationpagedResourcesAssembler - the resource asembly for app registrationsuri - URI for the properties fileapps - key/value pairs representing applications, separated by newlinesforce - if true, overwrites any pre-existing registrationsIOException - if can't store the Properties object to byte output streamCopyright © 2020 Pivotal Software, Inc.. All rights reserved.