Klasse ProductClassControllerImpl

java.lang.Object
de.dlr.proseo.prodclmgr.rest.ProductClassControllerImpl
Alle implementierten Schnittstellen:
ProductclassController

@Component public class ProductClassControllerImpl extends Object implements ProductclassController
Spring MVC controller for the prosEO Ingestor; implements the services required to manage product classes and their selection rules
Autor:
Dr. Thomas Bassler
  • 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 Schnittstelle ProductclassController
      Parameter:
      mission - the mission code
      productType - 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 Schnittstelle ProductclassController
      Parameter:
      mission - the mission code
      productType - 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 classes
      level - the required level of processing for the retrieved product classes
      visibility - 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 Schnittstelle ProductclassController
      Parameter:
      mission - the mission code
      productType - 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 classes
      level - the required level of processing for the retrieved product classes
      visibility - the visibility of products from the retrieved product classes to external users
      recordFrom - the first result to return
      recordTo - the last result to return
      orderBy - 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 Schnittstelle ProductclassController
      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

      public org.springframework.http.ResponseEntity<RestProductClass> getRestProductClassById(Long id)
      Get a product class by ID
      Angegeben von:
      getRestProductClassById in Schnittstelle ProductclassController
      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 Schnittstelle ProductclassController
      Parameter:
      id - the database ID of the product class to update
      productClass - 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

      public org.springframework.http.ResponseEntity<?> deleteProductclassById(Long id)
      Delete a product class by ID (with all its selection rules)
      Angegeben von:
      deleteProductclassById in Schnittstelle ProductclassController
      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 Schnittstelle ProductclassController
      Parameter:
      id - the database ID of the product class to get the selection rule from
      sourceClass - 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 Schnittstelle ProductclassController
      Parameter:
      id - the database ID of the product class
      selectionRuleStrings - 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 Schnittstelle ProductclassController
      Parameter:
      ruleid - the database ID of the simple selection rule to read
      id - 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 Schnittstelle ProductclassController
      Parameter:
      ruleid - the database ID of the simple selection rule to update
      id - the database ID of the product class
      selectionRuleString - 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

      public org.springframework.http.ResponseEntity<?> deleteSelectionrule(Long ruleid, Long id)
      Delete a selection rule
      Angegeben von:
      deleteSelectionrule in Schnittstelle ProductclassController
      Parameter:
      ruleid - the database ID of the simple selection rule to delete
      id - 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 Schnittstelle ProductclassController
      Parameter:
      configuredProcessor - the name of the configured processor to add to the selection rule
      ruleid - the database ID of the simple selection rule
      id - 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 Schnittstelle ProductclassController
      Parameter:
      configuredProcessor - the name of the configured processor to remove from the selection rule
      ruleid - the database ID of the simple selection rule
      id - 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