Package de.dlr.proseo.procmgr.rest
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
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungorg.springframework.http.ResponseEntity
<String> countConfigurations
(String missionCode, String processorName, String configurationVersion) Count the configurations matching the specified mission, processor name, and configuration version.org.springframework.http.ResponseEntity
<RestConfiguration> createConfiguration
(@Valid RestConfiguration configuration) Create a new configurationorg.springframework.http.ResponseEntity
<?> Delete a configuration by IDorg.springframework.http.ResponseEntity
<RestConfiguration> Get a configuration by IDorg.springframework.http.ResponseEntity
<List<RestConfiguration>> getConfigurations
(String mission, String processorName, String configurationVersion, Integer recordFrom, Integer recordTo) Get configurations by mission, processor name and configuration versionorg.springframework.http.ResponseEntity
<RestConfiguration> modifyConfiguration
(Long id, @Valid RestConfiguration configuration) Update a configuration by ID
-
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 SchnittstelleConfigurationController
- Parameter:
mission
- the mission codeprocessorName
- the name of the processor class this configuration belongs toconfigurationVersion
- the configuration versionrecordFrom
- first record of filtered and ordered result to returnrecordTo
- 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 SchnittstelleConfigurationController
- 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
Get a configuration by ID- Angegeben von:
getConfigurationById
in SchnittstelleConfigurationController
- 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 SchnittstelleConfigurationController
- Parameter:
id
- the ID of the configuration to updateconfiguration
- 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
Delete a configuration by ID- Angegeben von:
deleteConfigurationById
in SchnittstelleConfigurationController
- 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 SchnittstelleConfigurationController
- Parameter:
missionCode
- the mission codeprocessorName
- the name of the processor class this configuration belongs toconfigurationVersion
- 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
-