Klasse FacmgrManager

java.lang.Object
de.dlr.proseo.facmgr.rest.FacmgrManager

@Component @Transactional(isolation=REPEATABLE_READ) public class FacmgrManager extends Object
Service methods required to create, modify and delete processing facility in the prosEO database, and to query the database about such facilities
Autor:
Ranjitha Vignesh
  • Konstruktordetails

    • FacmgrManager

      public FacmgrManager()
  • Methodendetails

    • createFacility

      public RestProcessingFacility createFacility(RestProcessingFacility restFacility) throws IllegalArgumentException
      Create a processing facility with the specified attributes in the database.
      Parameter:
      restFacility - The ProcessingFacility to create in REST format
      Gibt zurück:
      The created RestProcessingFacility
      Löst aus:
      IllegalArgumentException - in case of invalid input data
    • getFacility

      public List<RestProcessingFacility> getFacility(String name) throws javax.persistence.NoResultException
      Retrieve a list of facilities filtered by mission and name.
      Parameter:
      name - the name of the facility
      Gibt zurück:
      a list of facilities matching mission and name
      Löst aus:
      javax.persistence.NoResultException - if no facilities matching the given search criteria could be found
    • getFacilityById

      public RestProcessingFacility getFacilityById(Long id) throws IllegalArgumentException, javax.persistence.NoResultException
      Find the facility with the given ID.
      Parameter:
      id - the ID to look for
      Gibt zurück:
      a Json object corresponding to the facility found
      Löst aus:
      IllegalArgumentException - if no facility ID was given
      javax.persistence.NoResultException - if no facility with the given ID exists
    • modifyFacility

      public RestProcessingFacility modifyFacility(Long id, RestProcessingFacility restFacility) throws IllegalArgumentException, javax.persistence.EntityNotFoundException, ConcurrentModificationException
      Update the facility with the given ID with the attribute values of the given Json object. Unchanged values must be provided, too, or they will be changed to null.
      Parameter:
      id - the ID of the facility to update
      restFacility - a Json object containing the modified and unmodified attributes
      Gibt zurück:
      a Json object corresponding to the facility after modification (with ID and version for all contained objects)
      Löst aus:
      javax.persistence.EntityNotFoundException - if no facility with the given ID exists
      IllegalArgumentException - if any of the input data was invalid
      ConcurrentModificationException - if the facility has been modified since retrieval by the client
    • deleteFacilityById

      public void deleteFacilityById(Long id) throws javax.persistence.EntityNotFoundException, IllegalArgumentException, RuntimeException
      Delete the facility with the given ID.
      Parameter:
      id - the ID of the facility to delete
      Löst aus:
      javax.persistence.EntityNotFoundException - if the facility to delete does not exist in the database
      IllegalArgumentException - if the facility to delete still has stored products
      RuntimeException - if the deletion was not performed as expected