org.springframework.cloud.dataflow.server.controller

## Class AppRegistryController

- java.lang.Object
- - org.springframework.cloud.dataflow.server.controller.AppRegistryController

-     @RestController
       @RequestMapping(value="/apps")
       @ExposesResourceFor(value=AppRegistrationResource.class)
      public class AppRegistryController
      extends Object

  Handles all `DefaultAppRegistryService` related interactions.
  Author:
    Glenn Renfro, Mark Fisher, Gunnar Hillert, Eric Bottard, Gary Russell, Patrick Peralta, Thomas Risberg, Chris Schaefer

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AppRegistryController(Optional<StreamDefinitionRepository> streamDefinitionRepository, Optional<StreamService> streamService, AppRegistryService appRegistryService, ApplicationConfigurationMetadataResolver metadataResolver, ForkJoinPool forkJoinPool, StreamDefinitionService streamDefinitionService, AppRegistrationAssemblerProvider<? extends AppRegistrationResource> appRegistrationAssemblerProvider)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    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 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()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AppRegistryController

          public AppRegistryController(Optional<StreamDefinitionRepository> streamDefinitionRepository,
                                       Optional<StreamService> streamService,
                                       AppRegistryService appRegistryService,
                                       ApplicationConfigurationMetadataResolver metadataResolver,
                                       ForkJoinPool forkJoinPool,
                                       StreamDefinitionService streamDefinitionService,
                                       AppRegistrationAssemblerProvider<? extends AppRegistrationResource> appRegistrationAssemblerProvider)

  - ### Method Detail

    - #### list

          @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)

      List app registrations. Optional type and findByTaskNameContains parameters can be passed to do filtering. Search parameter only filters by `AppRegistration` name field.
      Parameters:
        `pageable` - Pagination information
        `pagedResourcesAssembler` - the resource assembler for app registrations
        `type` - the application type: source, sink, processor, task
        `version` - optional application version
        `search` - optional findByTaskNameContains parameter
      Returns:
        the list of registered applications

    - #### info

          @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)

      Retrieve detailed information about a particular application.
      Parameters:
        `type` - application type
        `name` - application name
        `version` - application version
        `exhaustive` - if set to true all properties are returned
      Returns:
        detailed application information

    - #### info

          @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)

      Deprecated.

    - #### register

          @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)

      Register a module name and type with its URI.
      Parameters:
        `type` - module type
        `name` - module name
        `version` - module version
        `uri` - URI for the module artifact (e.g. maven://group:artifact:version)
        `metadataUri` - URI for the metadata artifact
        `force` - if `true`, overwrites a pre-existing registration

    - #### register

          @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)

      Deprecated.

    - #### makeDefault

          @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)

      Set a module version as default
      Parameters:
        `type` - module type
        `name` - module name
        `version` - module version

    - #### unregister

          @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)

      Unregister an application by name and type. If the application does not exist, a `NoSuchAppRegistrationException` will be thrown.
      Parameters:
        `type` - the application type
        `name` - the application name
        `version` - application version

    - #### unregister

          @Deprecated
           @RequestMapping(value="/{type}/{name}",
                          method=DELETE)
           @ResponseStatus(value=OK)
          public void unregister(@PathVariable(value="type")
                                                                                                                                                ApplicationType type,
                                                                                                                                                @PathVariable(value="name")
                                                                                                                                                String name)

      Deprecated.

    - #### unregisterAll

          @RequestMapping(method=DELETE)
           @ResponseStatus(value=OK)
          public void unregisterAll()

    - #### registerAll

          @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)

      Register all applications listed in a properties file or provided as key/value pairs.
      Parameters:
        `pageable` - Pagination information
        `pagedResourcesAssembler` - the resource assembly for app registrations
        `uri` - URI for the properties file
        `apps` - key/value pairs representing applications, separated by newlines
        `force` - if `true`, overwrites any pre-existing registrations
      Returns:
        the collection of registered applications

Copyright © 2021 Pivotal Software, Inc.. All rights reserved.