Package de.dlr.proseo.procmgr.rest
Klasse ConfigurationManager
java.lang.Object
de.dlr.proseo.procmgr.rest.ConfigurationManager
@Component
@Transactional(isolation=REPEATABLE_READ)
public class ConfigurationManager
extends Object
Service methods required to manage configuration versions.
- Autor:
- Dr. Thomas Bassler
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibung(Package privat) ProcessorManagerConfigurationThe processor manager configuration -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungcountConfigurations(String missionCode, Long id, String[] processorName, String configurationVersion, String[] productQuality, String[] processingMode) Count the configurations matching the specified mission, processorName, or configurationVersioncreateConfiguration(@Valid RestConfiguration configuration) Create a new configurationvoidDelete a configuration by IDGet a configuration by IDgetConfigurations(String mission, Long id, String[] processorName, String configurationVersion, String[] productQuality, String[] processingMode, Integer recordFrom, Integer recordTo, String[] orderBy) Get configurations by mission, processor name and configuration versionmodifyConfiguration(Long id, @Valid RestConfiguration configuration) Update a configuration by ID
-
Felddetails
-
config
The processor manager configuration
-
-
Konstruktordetails
-
ConfigurationManager
public ConfigurationManager()
-
-
Methodendetails
-
getConfigurations
public List<RestConfiguration> getConfigurations(String mission, Long id, String[] processorName, String configurationVersion, String[] productQuality, String[] processingMode, Integer recordFrom, Integer recordTo, String[] orderBy) throws javax.persistence.NoResultException, SecurityException Get configurations by mission, processor name and configuration version- Parameter:
mission- the mission codeprocessorName- the name of the processor class this configuration belongs toconfigurationVersion- 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 space- Gibt zurück:
- a list of Json objects representing configurations 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
-
createConfiguration
public RestConfiguration createConfiguration(@Valid @Valid RestConfiguration configuration) throws IllegalArgumentException, SecurityException Create a new configuration- Parameter:
configuration- a Json representation of the new configuration- Gibt zurück:
- a Json representation of the configuration 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
-
getConfigurationById
public RestConfiguration getConfigurationById(Long id) throws IllegalArgumentException, javax.persistence.NoResultException, SecurityException Get a configuration by ID- Parameter:
id- the configuration ID- Gibt zurück:
- a Json object corresponding to the configuration found
- Löst aus:
IllegalArgumentException- if no configuration ID was givenjavax.persistence.NoResultException- if no configuration with the given ID existsSecurityException- if a cross-mission data access was attempted
-
modifyConfiguration
public RestConfiguration modifyConfiguration(Long id, @Valid @Valid RestConfiguration configuration) throws javax.persistence.EntityNotFoundException, IllegalArgumentException, SecurityException, ConcurrentModificationException Update a configuration by ID- Parameter:
id- the ID of the configuration to updateconfiguration- a Json object containing the modified (and unmodified) attributes- Gibt zurück:
- a response containing a Json object corresponding to the configuration after modification (with ID and version for all contained objects)
- Löst aus:
javax.persistence.EntityNotFoundException- if no configuration with the given ID existsIllegalArgumentException- if any of the input data was invalidConcurrentModificationException- if the configuration has been modified since retrieval by the clientSecurityException- if a cross-mission data access was attempted
-
deleteConfigurationById
public void deleteConfigurationById(Long id) throws javax.persistence.EntityNotFoundException, RuntimeException, IllegalArgumentException, SecurityException Delete a configuration by ID- Parameter:
id- the ID of the configuration to delete- Löst aus:
javax.persistence.EntityNotFoundException- if the configuration 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
-
countConfigurations
public String countConfigurations(String missionCode, Long id, String[] processorName, String configurationVersion, String[] productQuality, String[] processingMode) Count the configurations matching the specified mission, processorName, or configurationVersion- Parameter:
missionCode- the mission codeprocessorName- the name of the processor class this configuration belongs toconfigurationVersion- the configuration version- Gibt zurück:
- the number of configurations found as string
- Löst aus:
SecurityException- if a cross-mission data access was attempted
-