Klasse ConfigurationControllerImpl

java.lang.Object
de.dlr.proseo.procmgr.rest.ConfigurationControllerImpl
Alle implementierten Schnittstellen:
ConfigurationController

@Component public class ConfigurationControllerImpl extends Object implements ConfigurationController
Spring MVC controller for the prosEO Processor Manager; implements the services required to manage configuration versions.
Autor:
Dr. Thomas Bassler
  • Konstruktordetails

    • ConfigurationControllerImpl

      public ConfigurationControllerImpl()
  • Methodendetails

    • getConfigurations

      public org.springframework.http.ResponseEntity<List<RestConfiguration>> getConfigurations(String mission, String processorName, String configurationVersion, Integer recordFrom, Integer recordTo)
      Get configurations by mission, processor name and configuration version
      Angegeben von:
      getConfigurations in Schnittstelle ConfigurationController
      Parameter:
      mission - the mission code
      processorName - the name of the processor class this configuration belongs to
      configurationVersion - the configuration version
      recordFrom - first record of filtered and ordered result to return
      recordTo - last record of filtered and ordered result to return
      Gibt zurück:
      HTTP status "OK" and a list of JSON objects representing configurations satisfying the search criteria or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted, or HTTP status "NOT_FOUND" and an error message, if no configurations matching the search criteria were found, or HTTP status "TOO MANY REQUESTS" if the result list exceeds a configured maximum
    • createConfiguration

      public org.springframework.http.ResponseEntity<RestConfiguration> createConfiguration(@Valid @Valid RestConfiguration configuration)
      Create a new configuration
      Angegeben von:
      createConfiguration in Schnittstelle ConfigurationController
      Parameter:
      configuration - a Json representation of the new configuration
      Gibt zurück:
      HTTP status "CREATED" and a response containing a Json object corresponding to the configuration after persistence (with ID and version for all contained objects) or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted, or HTTP status "BAD_REQUEST", if any of the input data was invalid
    • getConfigurationById

      public org.springframework.http.ResponseEntity<RestConfiguration> getConfigurationById(Long id)
      Get a configuration by ID
      Angegeben von:
      getConfigurationById in Schnittstelle ConfigurationController
      Parameter:
      id - the configuration ID
      Gibt zurück:
      HTTP status "OK" and a Json object corresponding to the configuration found or HTTP status "BAD_REQUEST" and an error message, if no configuration ID was given, or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted, or HTTP status "NOT_FOUND" and an error message, if no configuration with the given ID exists, or HTTP status "TOO MANY REQUESTS" if the result list exceeds a configured maximum
    • modifyConfiguration

      public org.springframework.http.ResponseEntity<RestConfiguration> modifyConfiguration(Long id, @Valid @Valid RestConfiguration configuration)
      Update a configuration by ID
      Angegeben von:
      modifyConfiguration in Schnittstelle ConfigurationController
      Parameter:
      id - the ID of the configuration to update
      configuration - a Json object containing the modified (and unmodified) attributes
      Gibt zurück:
      HTTP status "OK" and a response containing a Json object corresponding to the configuration after modification (with ID and version for all contained objects) or HTTP status "NOT_MODIFIED" and the unchanged configuration, if no attributes were actually changed, or HTTP status "NOT_FOUND" and an error message, if no configuration with the given ID exists, or HTTP status "BAD_REQUEST" and an error message, if any of the input data was invalid, or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted, or HTTP status "CONFLICT" and an error message, if the configuration has been modified since retrieval by the client
    • deleteConfigurationById

      public org.springframework.http.ResponseEntity<?> deleteConfigurationById(Long id)
      Delete a configuration by ID
      Angegeben von:
      deleteConfigurationById in Schnittstelle ConfigurationController
      Parameter:
      id - the ID of the configuration to delete
      Gibt zurück:
      a response entity with HTTP status "NO_CONTENT", if the deletion was successful, or HTTP status "NOT_FOUND", if the configuration did not exist, or HTTP status "NOT_MODIFIED", if the deletion was unsuccessful HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted, or HTTP status "BAD_REQUEST", if the processor class ID was not given, or if dependent objects exist
    • countConfigurations

      public org.springframework.http.ResponseEntity<String> countConfigurations(String missionCode, String processorName, String configurationVersion)
      Count the configurations matching the specified mission, processor name, and configuration version.
      Angegeben von:
      countConfigurations in Schnittstelle ConfigurationController
      Parameter:
      missionCode - the mission code
      processorName - the name of the processor class this configuration belongs to
      configurationVersion - the configuration version
      Gibt zurück:
      the number of matching configurations as a String (may be zero) or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted