Package de.dlr.proseo.procmgr.rest
Class ProcessorClassControllerImpl
java.lang.Object
de.dlr.proseo.procmgr.rest.ProcessorClassControllerImpl
- All Implemented Interfaces:
ProcessorclassController
@Component
public class ProcessorClassControllerImpl
extends Object
implements ProcessorclassController
Spring MVC controller for the prosEO Processor Manager; implements the services required to manage processor classes.
- Author:
- Dr. Thomas Bassler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<String> countProcessorClasses(String missionCode, Long id, String[] productClass, String processorName) Count the processor classes matching the specified mission and processor name.org.springframework.http.ResponseEntity<RestProcessorClass> createProcessorClass(@Valid RestProcessorClass processorClass) Create a new processor classorg.springframework.http.ResponseEntity<?> Delete a processor class by IDorg.springframework.http.ResponseEntity<RestProcessorClass> Get a processor class by IDorg.springframework.http.ResponseEntity<List<RestProcessorClass>> getProcessorClasses(String mission, Long id, String[] productClass, String processorName, Integer recordFrom, Integer recordTo, String[] orderBy) Get processor classes by mission and nameorg.springframework.http.ResponseEntity<RestProcessorClass> modifyProcessorClass(Long id, @Valid RestProcessorClass processorClass) Update a processor class by ID
-
Constructor Details
-
ProcessorClassControllerImpl
public ProcessorClassControllerImpl()
-
-
Method Details
-
getProcessorClasses
public org.springframework.http.ResponseEntity<List<RestProcessorClass>> getProcessorClasses(String mission, Long id, String[] productClass, String processorName, Integer recordFrom, Integer recordTo, String[] orderBy) Get processor classes by mission and name- Specified by:
getProcessorClassesin interfaceProcessorclassController- Parameters:
mission- the mission code (optional)processorName- the processor name (optional)recordFrom- first record of filtered and ordered result to returnrecordTo- last record of filtered and ordered result to returnorderBy- an array of strings containing a column name and an optional sort direction (ASC/DESC), separated by white space- Returns:
- HTTP status "OK" and a list of Json objects representing processor classes 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 processor classes matching the search criteria were found HTTP status "TOO MANY REQUESTS" if the result list exceeds a configured maximum
-
createProcessorClass
public org.springframework.http.ResponseEntity<RestProcessorClass> createProcessorClass(@Valid @Valid RestProcessorClass processorClass) Create a new processor class- Specified by:
createProcessorClassin interfaceProcessorclassController- Parameters:
processorClass- a Json representation of the new processor class- Returns:
- HTTP status "CREATED" and a response containing a Json object corresponding to the processor class 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
-
getProcessorClassById
Get a processor class by ID- Specified by:
getProcessorClassByIdin interfaceProcessorclassController- Parameters:
id- the processor class ID- Returns:
- HTTP status "OK" and a Json object corresponding to the processor class found or HTTP status "BAD_REQUEST" and an error message, if no processor class 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 class with the given ID exists
-
modifyProcessorClass
public org.springframework.http.ResponseEntity<RestProcessorClass> modifyProcessorClass(Long id, @Valid @Valid RestProcessorClass processorClass) Update a processor class by ID- Specified by:
modifyProcessorClassin interfaceProcessorclassController- Parameters:
id- the ID of the processor class to updateprocessorClass- a Json object containing the modified (and unmodified) attributes- Returns:
- HTTP status "OK" and a response containing a Json object corresponding to the processor class after modification (with ID and version for all contained objects) or HTTP status "NOT_MODIFIED" and the unchanged product, if no attributes were actually changed, or HTTP status "NOT_FOUND" and an error message, if no processor class 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 class has been modified since retrieval by the client
-
deleteProcessorClassById
Delete a processor class by ID- Specified by:
deleteProcessorClassByIdin interfaceProcessorclassController- Parameters:
id- the ID of the processor class to delete- Returns:
- a response entity with HTTP status "NO_CONTENT", if the deletion was successful, or HTTP status "NOT_FOUND", if the processor class did not exist, or HTTP status "NOT_MODIFIED", if the deletion was unsuccessful, or 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
-
countProcessorClasses
public org.springframework.http.ResponseEntity<String> countProcessorClasses(String missionCode, Long id, String[] productClass, String processorName) Count the processor classes matching the specified mission and processor name.- Specified by:
countProcessorClassesin interfaceProcessorclassController- Parameters:
missionCode- the mission codeprocessorName- the processor name- Returns:
- 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
-