Package de.dlr.proseo.procmgr.rest
Class ConfiguredProcessorManager
java.lang.Object
de.dlr.proseo.procmgr.rest.ConfiguredProcessorManager
@Component
@Transactional(isolation=REPEATABLE_READ)
public class ConfiguredProcessorManager
extends Object
Service methods required to manage configured processor versions.
- Author:
- Dr. Thomas Bassler
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) ProcessorManagerConfigurationThe processor manager configuration -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncountConfiguredProcessors(String mission, Long id, String identifier, String[] processorClass, String processorVersion, String configurationVersion, String[] enabled) Count the configuredProcessors matching the specified mission, processorName, processorVersion, configuration versioncreateConfiguredProcessor(@Valid RestConfiguredProcessor configuredProcessor) Create a new configured processorvoidDelete a configured processor by IDGet a configured processor by IDgetConfiguredProcessors(String mission, Long id, String identifier, String[] processorClass, String processorVersion, String configurationVersion, String[] enabled, Integer recordFrom, Integer recordTo, String[] orderBy) Get configured processors, filtered by mission, identifier, processor name, processor version and/or configuration versionmodifyConfiguredProcessor(Long id, @Valid RestConfiguredProcessor configuredProcessor) Update a configured processor by ID
-
Field Details
-
config
The processor manager configuration
-
-
Constructor Details
-
ConfiguredProcessorManager
public ConfiguredProcessorManager()
-
-
Method Details
-
getConfiguredProcessors
public List<RestConfiguredProcessor> getConfiguredProcessors(String mission, Long id, String identifier, String[] processorClass, String processorVersion, String configurationVersion, String[] enabled, Integer recordFrom, Integer recordTo, String[] orderBy) throws jakarta.persistence.NoResultException, SecurityException Get configured processors, filtered by mission, identifier, processor name, processor version and/or configuration version- Parameters:
mission- the mission codeidentifier- the identifier for the configured processorprocessorVersion- the processor versionconfigurationVersion- the configuration 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 spaceprocessorName- the processor nameuuid- the UUID of the configured processor- Returns:
- a list of Json objects representing configured processors satisfying the search criteria
- Throws:
jakarta.persistence.NoResultException- if no configured processors matching the given search criteria could be foundSecurityException- if a cross-mission data access was attempted
-
createConfiguredProcessor
public RestConfiguredProcessor createConfiguredProcessor(@Valid @Valid RestConfiguredProcessor configuredProcessor) throws IllegalArgumentException, SecurityException Create a new configured processor- Parameters:
configuredProcessor- a Json representation of the new configured processor- Returns:
- a Json representation of the configured processor after creation (with ID and version number)
- Throws:
IllegalArgumentException- if any of the input data was invalidSecurityException- if a cross-mission data access was attempted
-
getConfiguredProcessorById
public RestConfiguredProcessor getConfiguredProcessorById(Long id) throws IllegalArgumentException, jakarta.persistence.NoResultException, SecurityException Get a configured processor by ID- Parameters:
id- the configured processor ID- Returns:
- a Json object corresponding to the configured processor found
- Throws:
IllegalArgumentException- if no configured processor ID was givenjakarta.persistence.NoResultException- if no configured processor with the given ID existsSecurityException- if a cross-mission data access was attempted
-
modifyConfiguredProcessor
public RestConfiguredProcessor modifyConfiguredProcessor(Long id, @Valid @Valid RestConfiguredProcessor configuredProcessor) throws jakarta.persistence.EntityNotFoundException, IllegalArgumentException, SecurityException, ConcurrentModificationException Update a configured processor by ID- Parameters:
id- the ID of the configured processor to updateconfiguredProcessor- a Json object containing the modified (and unmodified) attributes- Returns:
- a response containing a Json object corresponding to the configured processor after modification (with ID and version for all contained objects)
- Throws:
jakarta.persistence.EntityNotFoundException- if no configured processor with the given ID existsIllegalArgumentException- if any of the input data was invalidSecurityException- if a cross-mission data access was attemptedConcurrentModificationException- if the configured processor has been modified since retrieval by the client
-
deleteConfiguredProcessorById
public void deleteConfiguredProcessorById(Long id) throws jakarta.persistence.EntityNotFoundException, SecurityException, RuntimeException Delete a configured processor by ID- Parameters:
id- the ID of the configured processor to delete- Throws:
jakarta.persistence.EntityNotFoundException- if the configured processor to delete does not exist in the databaseSecurityException- if a cross-mission data access was attemptedRuntimeException- if the deletion was not performed as expected
-
countConfiguredProcessors
public String countConfiguredProcessors(String mission, Long id, String identifier, String[] processorClass, String processorVersion, String configurationVersion, String[] enabled) Count the configuredProcessors matching the specified mission, processorName, processorVersion, configuration version- Parameters:
processorVersion- the processor versionconfigurationVersion- the configuration versionmissionCode- the mission codeprocessorName- the processor name- Returns:
- the number of configuredProcessors found as string
- Throws:
SecurityException- if a cross-mission data access was attempted
-