Package de.dlr.proseo.procmgr.rest
Klasse ProcessorManager
java.lang.Object
de.dlr.proseo.procmgr.rest.ProcessorManager
Service methods required to manage processor versions.
- Autor:
- Dr. Thomas Bassler
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungcountProcessors(Long id, String missionCode, String processorName, String processorVersion) Count the processors matching the specified mission, processorName, or processorVersioncreateProcessor(RestProcessor processor) Create a new processor (version)voidDelete a processor by IDgetProcessorById(Long id) Get a processor by IDgetProcessors(Long id, String mission, String processorName, String processorVersion, Integer recordFrom, Integer recordTo, String[] orderBy) Get processors by mission, name and version (user-defined version, not database version)modifyProcessor(Long id, @Valid RestProcessor processor) Update a processor by ID
-
Konstruktordetails
-
ProcessorManager
public ProcessorManager()
-
-
Methodendetails
-
createProcessor
public RestProcessor createProcessor(RestProcessor processor) throws IllegalArgumentException, SecurityException Create a new processor (version)- Parameter:
processor- a Json representation of the new processor- Gibt zurück:
- a Json representation of the processor after creation (with ID and version number)
- Löst aus:
IllegalArgumentException- if any of the input data was invalidSecurityException- if a cross-mission data access was attempted
-
getProcessors
public List<RestProcessor> getProcessors(Long id, String mission, String processorName, String processorVersion, Integer recordFrom, Integer recordTo, String[] orderBy) throws javax.persistence.NoResultException, SecurityException Get processors by mission, name and version (user-defined version, not database version)- Parameter:
mission- the mission codeprocessorName- the name of the processor (class)processorVersion- the processor versionrecordFrom- 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- Gibt zurück:
- a list of Json objects representing processors satisfying the search criteria
- Löst aus:
javax.persistence.NoResultException- if no processors matching the given search criteria could be foundSecurityException- if a cross-mission data access was attempted
-
getProcessorById
public RestProcessor getProcessorById(Long id) throws IllegalArgumentException, javax.persistence.NoResultException, SecurityException Get a processor by ID- Parameter:
id- the processor ID- Gibt zurück:
- a Json object corresponding to the processor found
- Löst aus:
IllegalArgumentException- if no processor ID was givenjavax.persistence.NoResultException- if no processor with the given ID existsSecurityException- if a cross-mission data access was attempted
-
modifyProcessor
public RestProcessor modifyProcessor(Long id, @Valid @Valid RestProcessor processor) throws javax.persistence.EntityNotFoundException, IllegalArgumentException, SecurityException, ConcurrentModificationException Update a processor by ID- Parameter:
id- the ID of the processor to updateprocessor- a Json object containing the modified (and unmodified) attributes- Gibt zurück:
- a response containing a Json object corresponding to the processor after modification (with ID and version for all contained objects)
- Löst aus:
javax.persistence.EntityNotFoundException- if no processor with the given ID existsIllegalArgumentException- if any of the input data was invalidSecurityException- if a cross-mission data access was attemptedConcurrentModificationException- if the processor has been modified since retrieval by the client
-
deleteProcessorById
public void deleteProcessorById(Long id) throws javax.persistence.EntityNotFoundException, RuntimeException, IllegalArgumentException, SecurityException Delete a processor by ID- Parameter:
id- the ID of the processor to delete- Löst aus:
javax.persistence.EntityNotFoundException- if the processor to delete does not exist in the databaseRuntimeException- if the deletion was not performed as expectedIllegalArgumentException- if the ID of the processor to delete was not given, or if dependent objects existSecurityException- if a cross-mission data access was attempted
-
countProcessors
public String countProcessors(Long id, String missionCode, String processorName, String processorVersion) Count the processors matching the specified mission, processorName, or processorVersion- Parameter:
missionCode- the mission codeprocessorName- the processor nameprocessorVersion- the processor version- Gibt zurück:
- the number of processors found as string
- Löst aus:
SecurityException- if a cross-mission data access was attempted
-