Package de.dlr.proseo.procmgr.rest
Klasse ProcessorClassManager
java.lang.Object
de.dlr.proseo.procmgr.rest.ProcessorClassManager
@Component
@Transactional(isolation=REPEATABLE_READ)
public class ProcessorClassManager
extends Object
Service methods required to manage processor classes.
- Autor:
- Dr. Thomas Bassler
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibung(Package privat) ProcessorManagerConfigurationThe processor manager configuration -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungcountProcessorClasses(String missionCode, Long id, String[] productClasses, String processorName) Count the processor classes matching the specified mission or processorName.createProcessorClass(@Valid RestProcessorClass processorClass) Create a new processor classvoidDelete a processor class by IDGet a processor class by IDgetProcessorClasses(String mission, Long id, String[] productClasses, String processorName, Integer recordFrom, Integer recordTo, String[] orderBy) Get processor classes by mission and namemodifyProcessorClass(Long id, @Valid RestProcessorClass processorClass) Update a processor class by ID
-
Felddetails
-
config
The processor manager configuration
-
-
Konstruktordetails
-
ProcessorClassManager
public ProcessorClassManager()
-
-
Methodendetails
-
getProcessorClasses
public List<RestProcessorClass> getProcessorClasses(String mission, Long id, String[] productClasses, String processorName, Integer recordFrom, Integer recordTo, String[] orderBy) throws javax.persistence.NoResultException, SecurityException Get processor classes by mission and name- Parameter:
mission- the mission code (optional)processorName- the processor name (optional)recordFrom- 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 processor classes satisfying the search criteria
- Löst aus:
javax.persistence.NoResultException- if no processor classes matching the given search criteria could be foundSecurityException- if a cross-mission data access was attempted
-
createProcessorClass
public RestProcessorClass createProcessorClass(@Valid @Valid RestProcessorClass processorClass) throws IllegalArgumentException, SecurityException Create a new processor class- Parameter:
processorClass- a Json representation of the new processor class- Gibt zurück:
- a Json representation of the processor class 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
-
getProcessorClassById
public RestProcessorClass getProcessorClassById(Long id) throws IllegalArgumentException, javax.persistence.NoResultException, SecurityException Get a processor class by ID- Parameter:
id- the processor class ID- Gibt zurück:
- a Json object corresponding to the processor class found
- Löst aus:
IllegalArgumentException- if no processor class ID was givenjavax.persistence.NoResultException- if no processor class with the given ID existsSecurityException- if a cross-mission data access was attempted
-
modifyProcessorClass
public RestProcessorClass modifyProcessorClass(Long id, @Valid @Valid RestProcessorClass processorClass) throws javax.persistence.EntityNotFoundException, IllegalArgumentException, SecurityException, ConcurrentModificationException Update a processor class by ID- Parameter:
id- the ID of the processor class to updateprocessorClass- a Json object containing the modified (and unmodified) attributes- Gibt zurück:
- a response containing a Json object corresponding to the processor class after modification (with ID and version for all contained objects)
- Löst aus:
javax.persistence.EntityNotFoundException- if no processor class with the given ID existsIllegalArgumentException- if any of the input data was invalidSecurityException- if a cross-mission data access was attemptedConcurrentModificationException- if the processor class has been modified since retrieval by the client
-
deleteProcessorClassById
public void deleteProcessorClassById(Long id) throws javax.persistence.EntityNotFoundException, RuntimeException, IllegalArgumentException, SecurityException Delete a processor class by ID- Parameter:
id- the ID of the processor class to delete- Löst aus:
javax.persistence.EntityNotFoundException- if the processor class to delete does not exist in the databaseRuntimeException- if the deletion was not performed as expectedIllegalArgumentException- if the ID of the processor class to delete was not given, or if dependent objects existSecurityException- if a cross-mission data access was attempted
-
countProcessorClasses
public String countProcessorClasses(String missionCode, Long id, String[] productClasses, String processorName) Count the processor classes matching the specified mission or processorName.- Parameter:
missionCode- the mission codeprocessorName- the processor name- Gibt zurück:
- the number of processor classes found as string
- Löst aus:
SecurityException- if a cross-mission data access was attempted
-