@RestController @RequestMapping(value="/apps") @ExposesResourceFor(value=AppRegistrationResource.class) public class AppRegistryController extends Object
AppRegistry related interactions.| Constructor and Description |
|---|
AppRegistryController(AppRegistry appRegistry,
ApplicationConfigurationMetadataResolver metadataResolver) |
| 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.web.PagedResourcesAssembler<AppRegistration> pagedResourcesAssembler,
ApplicationType type,
boolean detailed)
List app registrations.
|
void |
register(ApplicationType type,
String name,
String uri,
boolean force)
Register a module name and type with its URI.
|
org.springframework.hateoas.PagedResources<? extends AppRegistrationResource> |
registerAll(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)
Unregister an application by name and type.
|
public AppRegistryController(AppRegistry appRegistry, ApplicationConfigurationMetadataResolver metadataResolver)
@RequestMapping(method=GET) @ResponseStatus(value=OK) public org.springframework.hateoas.PagedResources<? extends AppRegistrationResource> list(org.springframework.data.web.PagedResourcesAssembler<AppRegistration> pagedResourcesAssembler, @RequestParam(value="type",required=false) ApplicationType type, @RequestParam(value="detailed",defaultValue="false") boolean detailed)
@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(value="force",defaultValue="false") boolean force)
type - module typename - module nameuri - URI for the module artifact (e.g. maven://group:artifact:version)force - 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.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)
uri - URI for the properties fileapps - key/value pairs representing applications, separated by newlinesforce - if true, overwrites any pre-existing registrationsCopyright © 2016 Pivotal Software, Inc.. All rights reserved.