Search in sources :

Example 1 with UseCaseAdminCreatesExecutorConfiguration

use of com.mercedesbenz.sechub.sharedkernel.usecases.admin.config.UseCaseAdminCreatesExecutorConfiguration in project sechub by mercedes-benz.

the class CreateProductExecutorConfigService method createProductExecutorConfig.

/* @formatter:off */
@UseCaseAdminCreatesExecutorConfiguration(@Step(number = 2, name = "Service call", description = "Service creates a new product executor configuration"))
public /* @formatter:on */
String createProductExecutorConfig(ProductExecutorConfig configFromUser) {
    assertValid(configFromUser, validation);
    auditLogService.log("Wants to create product execution configuration '{}', enabled: {} for executor:{}, V{}", configFromUser.getName(), configFromUser.getEnabled(), configFromUser.getProductIdentifier(), configFromUser.getExecutorVersion());
    resetFieldsNeverFromUser(configFromUser);
    ProductExecutorConfig stored = repository.save(configFromUser);
    UUID uuid = stored.getUUID();
    LOG.info("Created product execution configuration '{}', enabled={}, with uuidD={} for executor:{}, V{}", stored.getName(), configFromUser.getEnabled(), uuid, stored.getProductIdentifier(), stored.getExecutorVersion());
    return uuid.toString();
}
Also used : UUID(java.util.UUID) UseCaseAdminCreatesExecutorConfiguration(com.mercedesbenz.sechub.sharedkernel.usecases.admin.config.UseCaseAdminCreatesExecutorConfiguration)

Aggregations

UseCaseAdminCreatesExecutorConfiguration (com.mercedesbenz.sechub.sharedkernel.usecases.admin.config.UseCaseAdminCreatesExecutorConfiguration)1 UUID (java.util.UUID)1