Package de.dlr.proseo.prodclmgr.rest
Klasse ProductClassControllerImpl
java.lang.Object
de.dlr.proseo.prodclmgr.rest.ProductClassControllerImpl
- Alle implementierten Schnittstellen:
ProductclassController
Spring MVC controller for the prosEO Ingestor; implements the services required to manage product classes and their selection
rules
- Autor:
- Dr. Thomas Bassler
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungorg.springframework.http.ResponseEntity
<SelectionRuleString> addProcessorToRule
(String configuredProcessor, Long ruleid, Long id) Add the configured processor to the selection rule (if it is not already part of the selection rule)org.springframework.http.ResponseEntity
<String> countProductClasses
(String mission, String[] productType, String[] processorClass, String level, String visibility) Get product classes, optionally filtered by mission, product type, processor class, processing level or visibilityorg.springframework.http.ResponseEntity
<RestProductClass> createRestProductClass
(RestProductClass productClass) Create a new product classorg.springframework.http.ResponseEntity
<RestProductClass> createSelectionRuleString
(Long id, @Valid List<SelectionRuleString> selectionRuleStrings) Create a selection rule using Rule Languageorg.springframework.http.ResponseEntity
<?> Delete a product class by ID (with all its selection rules)org.springframework.http.ResponseEntity
<?> deleteSelectionrule
(Long ruleid, Long id) Delete a selection rulegetProductClassNames
(String mission, String productType) Get product classes, optionally filtered by mission and/or product typeorg.springframework.http.ResponseEntity
<List<RestProductClass>> getRestProductClass
(String mission, String[] productType, String[] processorClass, String level, String visibility, Integer recordFrom, Integer recordTo, String[] orderBy) Get product classes, optionally filtered by mission, product type, processor class, processing level or visibilityorg.springframework.http.ResponseEntity
<RestProductClass> Get a product class by IDorg.springframework.http.ResponseEntity
<SelectionRuleString> getSelectionRuleString
(Long ruleid, Long id) Get a selection rule by IDorg.springframework.http.ResponseEntity
<List<SelectionRuleString>> getSelectionRuleStrings
(Long id, String sourceClass) Get the simple selection rules as formatted string, optionally selected by source classorg.springframework.http.ResponseEntity
<RestProductClass> modifyRestProductClass
(Long id, RestProductClass productClass) Update a product class by ID (does not update its selection rules)org.springframework.http.ResponseEntity
<SelectionRuleString> modifySelectionRuleString
(Long ruleid, Long id, SelectionRuleString selectionRuleString) Update a selection rule using Rule Languageorg.springframework.http.ResponseEntity
<SelectionRuleString> removeProcessorFromRule
(String configuredProcessor, Long ruleid, Long id) Remove the configured processor from the selection rule (the selection rule will be disconnected from the configured processor)
-
Konstruktordetails
-
ProductClassControllerImpl
public ProductClassControllerImpl()
-
-
Methodendetails
-
getProductClassNames
public org.springframework.http.ResponseEntity<List<String>> getProductClassNames(String mission, String productType) Get product classes, optionally filtered by mission and/or product type- Angegeben von:
getProductClassNames
in SchnittstelleProductclassController
- Parameter:
mission
- the mission codeproductType
- a product type as agreed in the mission specification documents (e. g. L2_CLOUD___)- Gibt zurück:
- HTTP status "OK" and a list of Json objects representing product 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 product classes matching the search criteria were found
-
countProductClasses
public org.springframework.http.ResponseEntity<String> countProductClasses(String mission, String[] productType, String[] processorClass, String level, String visibility) Get product classes, optionally filtered by mission, product type, processor class, processing level or visibility- Angegeben von:
countProductClasses
in SchnittstelleProductclassController
- Parameter:
mission
- the mission codeproductType
- a list of product types as agreed in the mission specification documents (e. g. L2_CLOUD___)processorClass
- a list of processor types capable of producing products from the retrieved product classeslevel
- the required level of processing for the retrieved product classesvisibility
- the visibility of products from the retrieved product classes to external users- Gibt zurück:
- HTTP status "OK" and a list of Json objects representing product 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 product classes matching the search criteria were found
-
getRestProductClass
public org.springframework.http.ResponseEntity<List<RestProductClass>> getRestProductClass(String mission, String[] productType, String[] processorClass, String level, String visibility, Integer recordFrom, Integer recordTo, String[] orderBy) Get product classes, optionally filtered by mission, product type, processor class, processing level or visibility- Angegeben von:
getRestProductClass
in SchnittstelleProductclassController
- Parameter:
mission
- the mission codeproductType
- a list of product types as agreed in the mission specification documents (e. g. L2_CLOUD___)processorClass
- a list of processor types capable of producing products from the retrieved product classeslevel
- the required level of processing for the retrieved product classesvisibility
- the visibility of products from the retrieved product classes to external usersrecordFrom
- the first result to returnrecordTo
- the last result to returnorderBy
- an array of strings containing a column name and an optional sort direction (ASC/DESC), separated by white space- Gibt zurück:
- HTTP status "OK" and a list of Json objects representing product 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 product classes matching the search criteria were found HTTP status "TOO MANY REQUESTS" if the result list exceeds a configured maximum
-
createRestProductClass
public org.springframework.http.ResponseEntity<RestProductClass> createRestProductClass(RestProductClass productClass) Create a new product class- Angegeben von:
createRestProductClass
in SchnittstelleProductclassController
- Parameter:
productClass
- a Json object describing the new product class- Gibt zurück:
- HTTP status "CREATED" and a response containing a Json object corresponding to the product 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
-
getRestProductClassById
Get a product class by ID- Angegeben von:
getRestProductClassById
in SchnittstelleProductclassController
- Parameter:
id
- the database ID of the product class- Gibt zurück:
- HTTP status "OK" and a Json object corresponding to the product class found or HTTP status "BAD_REQUEST" and an error message, if no product 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 product class with the given ID exists
-
modifyRestProductClass
public org.springframework.http.ResponseEntity<RestProductClass> modifyRestProductClass(Long id, RestProductClass productClass) Update a product class by ID (does not update its selection rules)- Angegeben von:
modifyRestProductClass
in SchnittstelleProductclassController
- Parameter:
id
- the database ID of the product class to updateproductClass
- a Json object describing the modified product class- Gibt zurück:
- HTTP status "OK" and a response containing a Json object corresponding to the product class after modification (with ID and version for all contained objects) or HTTP status "NOT_FOUND" and an error message, if no product 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 product class has been modified since retrieval by the client
-
deleteProductclassById
Delete a product class by ID (with all its selection rules)- Angegeben von:
deleteProductclassById
in SchnittstelleProductclassController
- Parameter:
id
- the database ID of the product class 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 product 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 product class ID was not given, or if dependent objects exist
-
getSelectionRuleStrings
public org.springframework.http.ResponseEntity<List<SelectionRuleString>> getSelectionRuleStrings(Long id, String sourceClass) Get the simple selection rules as formatted string, optionally selected by source class- Angegeben von:
getSelectionRuleStrings
in SchnittstelleProductclassController
- Parameter:
id
- the database ID of the product class to get the selection rule fromsourceClass
- the prosEO product type of the source class, from which the product class can be generated (may be null)- Gibt zurück:
- HTTP status "OK" and a list of strings describing the selection rules for all configured processors 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 selection rules matching the search criteria were found
-
createSelectionRuleString
public org.springframework.http.ResponseEntity<RestProductClass> createSelectionRuleString(Long id, @Valid @Valid List<SelectionRuleString> selectionRuleStrings) Create a selection rule using Rule Language- Angegeben von:
createSelectionRuleString
in SchnittstelleProductclassController
- Parameter:
id
- the database ID of the product classselectionRuleStrings
- Json representation of a selection rule in Rule Language- Gibt zurück:
- HTTP status "CREATED" and a response containing a Json object corresponding to the selection rule 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
-
getSelectionRuleString
public org.springframework.http.ResponseEntity<SelectionRuleString> getSelectionRuleString(Long ruleid, Long id) Get a selection rule by ID- Angegeben von:
getSelectionRuleString
in SchnittstelleProductclassController
- Parameter:
ruleid
- the database ID of the simple selection rule to readid
- the database ID of the product class- Gibt zurück:
- HTTP status "OK" and a Json object corresponding to the simple selection rule in Rule Language or HTTP status "BAD_REQUEST" and an error message, if no simple selection rule 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 simple selection rule with the given ID exists
-
modifySelectionRuleString
public org.springframework.http.ResponseEntity<SelectionRuleString> modifySelectionRuleString(Long ruleid, Long id, SelectionRuleString selectionRuleString) Update a selection rule using Rule Language- Angegeben von:
modifySelectionRuleString
in SchnittstelleProductclassController
- Parameter:
ruleid
- the database ID of the simple selection rule to updateid
- the database ID of the product classselectionRuleString
- a Json object representing the simple selection rule in Rule Language- Gibt zurück:
- HTTP status "OK" and a response containing a Json object corresponding to the modified simple selection rule in Rule Language (with ID and version for all contained objects) or HTTP status "NOT_FOUND" and an error message, if if the rule ID is invalid or the rule does not belong to the given product class, 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 simple selection rule has been modified since retrieval by the client
-
deleteSelectionrule
Delete a selection rule- Angegeben von:
deleteSelectionrule
in SchnittstelleProductclassController
- Parameter:
ruleid
- the database ID of the simple selection rule to deleteid
- the database ID of the product class- Gibt zurück:
- a response entity with HTTP status "NO_CONTENT", if the deletion was successful, or HTTP status "NOT_FOUND", if the if the selection rule to delete or the product class do not exist in the database, or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted, or HTTP status "BAD_REQUEST", if the ID of the product class or the selection rule was not given, or the rule cannot be deleted due to existing product queries
-
addProcessorToRule
public org.springframework.http.ResponseEntity<SelectionRuleString> addProcessorToRule(String configuredProcessor, Long ruleid, Long id) Add the configured processor to the selection rule (if it is not already part of the selection rule)- Angegeben von:
addProcessorToRule
in SchnittstelleProductclassController
- Parameter:
configuredProcessor
- the name of the configured processor to add to the selection ruleruleid
- the database ID of the simple selection ruleid
- the database ID of the product class- Gibt zurück:
- HTTP status "OK" and a response containing a Json object corresponding to the modified simple selection rule in Rule Language, if the addition was successful, or HTTP status "NOT_FOUND", if no configured processor with the given name or no selection rule or product class with the given ID exist, or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted, or HTTP status "BAD_REQUEST", if the product class ID, the selection rule ID or the name of the configured processor were not given
-
removeProcessorFromRule
public org.springframework.http.ResponseEntity<SelectionRuleString> removeProcessorFromRule(String configuredProcessor, Long ruleid, Long id) Remove the configured processor from the selection rule (the selection rule will be disconnected from the configured processor)- Angegeben von:
removeProcessorFromRule
in SchnittstelleProductclassController
- Parameter:
configuredProcessor
- the name of the configured processor to remove from the selection ruleruleid
- the database ID of the simple selection ruleid
- the database ID of the product class- Gibt zurück:
- HTTP status "OK" and a response containing a Json object corresponding to the modified simple selection rule in Rule Language, if the removal was successful, or HTTP status "NOT_FOUND", if no configured processor with the given name or no selection rule or product class with the given ID exist, or HTTP status "FORBIDDEN" and an error message, if a cross-mission data access was attempted, or HTTP status "BAD_REQUEST", if the product class ID, the selection rule ID or the name of the configured processor were not given
-