Package de.dlr.proseo.facmgr.rest
Klasse FacmgrManager
java.lang.Object
de.dlr.proseo.facmgr.rest.FacmgrManager
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
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungcreateFacility
(RestProcessingFacility restFacility) Create a processing facility with the specified attributes in the database.void
Delete the facility with the given ID.getFacility
(String name) Retrieve a list of facilities filtered by mission and name.getFacilityById
(Long id) Find the facility with the given ID.modifyFacility
(Long id, RestProcessingFacility restFacility) Update the facility with the given ID with the attribute values of the given Json object.
-
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 givenjavax.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 updaterestFacility
- 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 existsIllegalArgumentException
- if any of the input data was invalidConcurrentModificationException
- 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 databaseIllegalArgumentException
- if the facility to delete still has stored productsRuntimeException
- if the deletion was not performed as expected
-