@RestController @RequestMapping(value="/apps") @ExposesResourceFor(value=AppRegistrationResource.class) public class SkipperAppRegistryController extends Object
DefaultAppRegistryService
related interactions.Constructor and Description |
---|
SkipperAppRegistryController(StreamDefinitionRepository streamDefinitionRepository,
StreamService streamService,
AppRegistryService appRegistryService,
ApplicationConfigurationMetadataResolver metadataResolver,
ForkJoinPool forkJoinPool,
org.springframework.cloud.deployer.resource.maven.MavenProperties mavenProperties) |
Modifier and Type | Method and Description |
---|---|
DetailedAppRegistrationResource |
info(ApplicationType type,
String name)
Deprecated.
|
DetailedAppRegistrationResource |
info(ApplicationType type,
String name,
String version)
Retrieve detailed information about a particular application.
|
org.springframework.hateoas.PagedResources<? 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.PagedResources<? extends AppRegistrationResource> |
registerAll(org.springframework.data.domain.Pageable pageable,
org.springframework.data.web.PagedResourcesAssembler<AppRegistration> pagedResourcesAssembler,
String uri,
Properties 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.
|
public SkipperAppRegistryController(StreamDefinitionRepository streamDefinitionRepository, StreamService streamService, AppRegistryService appRegistryService, ApplicationConfigurationMetadataResolver metadataResolver, ForkJoinPool forkJoinPool, org.springframework.cloud.deployer.resource.maven.MavenProperties mavenProperties)
@RequestMapping(method=GET) @ResponseStatus(value=OK) public org.springframework.hateoas.PagedResources<? 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.pagedResourcesAssembler
- the resource assembler for app registrationstype
- the application type: source, sink, processor, tasksearch
- optional findByNameLike 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)
type
- application typename
- application nameversion
- application version@Deprecated @RequestMapping(value="/{type}/{name}", method=GET) @ResponseStatus(value=OK) public DetailedAppRegistrationResource info(@PathVariable(value="type") ApplicationType type, @PathVariable(value="name") String name)
@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=POST) @ResponseStatus(value=CREATED) public org.springframework.hateoas.PagedResources<? 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) Properties apps, @RequestParam(value="force",defaultValue="false") boolean force) throws IOException
pagedResourcesAssembler
- 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 © 2018 Pivotal Software, Inc.. All rights reserved.