Package de.dlr.proseo.procmgr.rest
Klasse ProcessorControllerImpl
java.lang.Object
de.dlr.proseo.procmgr.rest.ProcessorControllerImpl
- Alle implementierten Schnittstellen:
ProcessorController
Spring MVC controller for the prosEO Processor Manager; implements the services required to manage processor versions.
- Autor:
- Dr. Thomas Bassler
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungorg.springframework.http.ResponseEntity
<String> countProcessors
(String missionCode, String processorName, String processorVersion) Count the processors matching the specified mission, processor name, and processor version.org.springframework.http.ResponseEntity
<RestProcessor> createProcessor
(RestProcessor processor) Create a new processor (version)org.springframework.http.ResponseEntity
<?> Delete a processor by IDorg.springframework.http.ResponseEntity
<RestProcessor> getProcessorById
(Long id) Get a processor by IDorg.springframework.http.ResponseEntity
<List<RestProcessor>> getProcessors
(String mission, String processorName, String processorVersion, Integer recordFrom, Integer recordTo) Get processors by mission, name and version (user-defined version, not database version)org.springframework.http.ResponseEntity
<RestProcessor> modifyProcessor
(Long id, @Valid RestProcessor processor) Update a processor by ID
-
Konstruktordetails
-
ProcessorControllerImpl
public ProcessorControllerImpl()
-
-
Methodendetails
-
createProcessor
public org.springframework.http.ResponseEntity<RestProcessor> createProcessor(RestProcessor processor) Create a new processor (version)- Angegeben von:
createProcessor
in SchnittstelleProcessorController
- Parameter:
processor
- a Json representation of the new processor- Gibt zurück:
- HTTP status "CREATED" and a response containing a Json object corresponding to the processor 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
-
getProcessors
public org.springframework.http.ResponseEntity<List<RestProcessor>> getProcessors(String mission, String processorName, String processorVersion, Integer recordFrom, Integer recordTo) Get processors by mission, name and version (user-defined version, not database version)- Angegeben von:
getProcessors
in SchnittstelleProcessorController
- Parameter:
mission
- the mission codeprocessorName
- the name of the processor (class)processorVersion
- the processor 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 processors 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 processors matching the search criteria were found, or HTTP status "TOO MANY REQUESTS" if the result list exceeds a configured maximum
-
getProcessorById
Get a processor by ID- Angegeben von:
getProcessorById
in SchnittstelleProcessorController
- Parameter:
id
- the processor ID- Gibt zurück:
- HTTP status "OK" and a Json object corresponding to the processor found or HTTP status "BAD_REQUEST" and an error message, if no processor 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 processor with the given ID exists
-
modifyProcessor
public org.springframework.http.ResponseEntity<RestProcessor> modifyProcessor(Long id, @Valid @Valid RestProcessor processor) Update a processor by ID- Angegeben von:
modifyProcessor
in SchnittstelleProcessorController
- Parameter:
id
- the ID of the processor to updateprocessor
- 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 processor after modification (with ID and version for all contained objects) or HTTP status "NOT_FOUND" and an error message, if no processor 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 processor has been modified since retrieval by the client
-
deleteProcessorById
Delete a processor by ID- Angegeben von:
deleteProcessorById
in SchnittstelleProcessorController
- Parameter:
id
- the ID of the processor 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 processor 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
-
countProcessors
public org.springframework.http.ResponseEntity<String> countProcessors(String missionCode, String processorName, String processorVersion) Count the processors matching the specified mission, processor name, and processor version.- Angegeben von:
countProcessors
in SchnittstelleProcessorController
- Parameter:
missionCode
- the mission codeprocessorName
- the processor nameprocessorVersion
- the processor version- Gibt zurück:
- the number of matching processors as a String (may be zero) or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted
-