Search in sources :

Example 1 with ScanMapping

use of com.mercedesbenz.sechub.domain.scan.config.ScanMapping in project sechub by mercedes-benz.

the class ScanConfigTestJSONasNamePatternDialogAction method createScanConfig.

private ScanConfig createScanConfig(String json, MappingIdentifier identifier) {
    MappingData mappingData = MappingData.fromString(json);
    ScanMapping mapping = new ScanMapping(identifier.getId());
    mapping.setData(mappingData.toJSON());
    ScanConfig config = new ScanMappingToScanConfigTransformer().transform(Collections.singletonList(mapping));
    return config;
}
Also used : ScanMapping(com.mercedesbenz.sechub.domain.scan.config.ScanMapping) ScanConfig(com.mercedesbenz.sechub.domain.scan.config.ScanConfig) MappingData(com.mercedesbenz.sechub.sharedkernel.mapping.MappingData) ScanMappingToScanConfigTransformer(com.mercedesbenz.sechub.domain.scan.config.ScanMappingToScanConfigTransformer)

Example 2 with ScanMapping

use of com.mercedesbenz.sechub.domain.scan.config.ScanMapping in project sechub by mercedes-benz.

the class ScanMappingConfigurationTestJSONasNamePatternDialogAction method createScanConfig.

private ScanMappingConfiguration createScanConfig(String json, MappingIdentifier identifier) {
    MappingData mappingData = MappingData.fromString(json);
    ScanMapping mapping = new ScanMapping(identifier.getId());
    mapping.setData(mappingData.toJSON());
    ScanMappingConfiguration config = new ScanMappingToScanMappingConfigurationTransformer().transform(Collections.singletonList(mapping));
    return config;
}
Also used : ScanMapping(com.mercedesbenz.sechub.domain.scan.config.ScanMapping) MappingData(com.mercedesbenz.sechub.sharedkernel.mapping.MappingData) ScanMappingConfiguration(com.mercedesbenz.sechub.domain.scan.config.ScanMappingConfiguration) ScanMappingToScanMappingConfigurationTransformer(com.mercedesbenz.sechub.domain.scan.config.ScanMappingToScanMappingConfigurationTransformer)

Aggregations

ScanMapping (com.mercedesbenz.sechub.domain.scan.config.ScanMapping)2 MappingData (com.mercedesbenz.sechub.sharedkernel.mapping.MappingData)2 ScanConfig (com.mercedesbenz.sechub.domain.scan.config.ScanConfig)1 ScanMappingConfiguration (com.mercedesbenz.sechub.domain.scan.config.ScanMappingConfiguration)1 ScanMappingToScanConfigTransformer (com.mercedesbenz.sechub.domain.scan.config.ScanMappingToScanConfigTransformer)1 ScanMappingToScanMappingConfigurationTransformer (com.mercedesbenz.sechub.domain.scan.config.ScanMappingToScanMappingConfigurationTransformer)1