Search in sources :

Example 1 with ImportConfigurationDto

use of cz.mzk.recordmanager.api.model.configurations.ImportConfigurationDto in project RecordManager2 by moravianlibrary.

the class ImportConfigurationServiceImpl method getConfigurations.

@Override
@Transactional(readOnly = true)
public List<ImportConfigurationDto> getConfigurations() {
    List<ImportConfiguration> configurations = importConfigurationDAO.findAll();
    List<ImportConfigurationDto> result = new ArrayList<ImportConfigurationDto>(configurations.size());
    for (ImportConfiguration configuration : configurations) {
        result.add(translator.translate(configuration));
    }
    return result;
}
Also used : ImportConfigurationDto(cz.mzk.recordmanager.api.model.configurations.ImportConfigurationDto) ArrayList(java.util.ArrayList) ImportConfiguration(cz.mzk.recordmanager.server.model.ImportConfiguration) Transactional(org.springframework.transaction.annotation.Transactional)

Example 2 with ImportConfigurationDto

use of cz.mzk.recordmanager.api.model.configurations.ImportConfigurationDto in project RecordManager2 by moravianlibrary.

the class Translator method translate.

public ImportConfigurationDto translate(ImportConfiguration configuration) {
    ImportConfigurationDto importConfigurationDto = new ImportConfigurationDto();
    importConfigurationDto.setId(configuration.getId());
    importConfigurationDto.setIdPrefix(configuration.getIdPrefix());
    importConfigurationDto.setLibrary(translate(configuration.getLibrary()));
    return importConfigurationDto;
}
Also used : DownloadImportConfigurationDto(cz.mzk.recordmanager.api.model.configurations.DownloadImportConfigurationDto) ImportConfigurationDto(cz.mzk.recordmanager.api.model.configurations.ImportConfigurationDto)

Aggregations

ImportConfigurationDto (cz.mzk.recordmanager.api.model.configurations.ImportConfigurationDto)2 DownloadImportConfigurationDto (cz.mzk.recordmanager.api.model.configurations.DownloadImportConfigurationDto)1 ImportConfiguration (cz.mzk.recordmanager.server.model.ImportConfiguration)1 ArrayList (java.util.ArrayList)1 Transactional (org.springframework.transaction.annotation.Transactional)1