@RestController @RequestMapping(value="/apps") @ExposesResourceFor(value=AppRegistrationResource.class) public class AppRegistryController extends Object implements org.springframework.context.ResourceLoaderAware
AppRegistry
related interactions.Constructor and Description |
---|
AppRegistryController(AppRegistry appRegistry,
ApplicationConfigurationMetadataResolver metadataResolver,
ForkJoinPool forkJoinPool) |
Modifier and Type | Method and Description |
---|---|
DetailedAppRegistrationResource |
info(ApplicationType type,
String name)
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 |
register(ApplicationType type,
String name,
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 |
setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader) |
void |
unregister(ApplicationType type,
String name)
Unregister an application by name and type.
|
public AppRegistryController(AppRegistry appRegistry, ApplicationConfigurationMetadataResolver metadataResolver, ForkJoinPool forkJoinPool)
@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}", method=GET) @ResponseStatus(value=OK) public DetailedAppRegistrationResource info(@PathVariable(value="type") ApplicationType type, @PathVariable(value="name") String name)
type
- application typename
- application name@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)
type
- module typename
- module nameuri
- URI for the module artifact (e.g.
maven://group:artifact:version)metadataUri
- URI for the metadata artifactforce
- if true
, overwrites a pre-existing registration@RequestMapping(value="/{type}/{name}", method=DELETE) @ResponseStatus(value=OK) public void unregister(@PathVariable(value="type") ApplicationType type, @PathVariable(value="name") String name)
NoSuchAppRegistrationException
will be thrown.type
- the application typename
- the application 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 streampublic void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
setResourceLoader
in interface org.springframework.context.ResourceLoaderAware
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.