Search in sources :

Example 1 with UseCaseAdminFetchesAutoCleanupConfiguration

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

the class AdministrationConfigService method fetchAutoCleanupConfiguration.

@UseCaseAdminFetchesAutoCleanupConfiguration(@Step(number = 2, name = "Fetches auto cleanup config", description = "Fetches auto cleanup configuration from database"))
public AdministrationAutoCleanupConfig fetchAutoCleanupConfiguration() {
    String cleanupConfigJson = getOrCreateConfig().autoCleanupConfiguration;
    AdministrationAutoCleanupConfig cleanupConfig = null;
    if (cleanupConfigJson == null) {
        cleanupConfig = new AdministrationAutoCleanupConfig();
    } else {
        cleanupConfig = AdministrationAutoCleanupConfig.fromString(cleanupConfigJson);
    }
    return cleanupConfig;
}
Also used : AdministrationAutoCleanupConfig(com.mercedesbenz.sechub.domain.administration.autocleanup.AdministrationAutoCleanupConfig) UseCaseAdminFetchesAutoCleanupConfiguration(com.mercedesbenz.sechub.sharedkernel.usecases.admin.config.UseCaseAdminFetchesAutoCleanupConfiguration)

Aggregations

AdministrationAutoCleanupConfig (com.mercedesbenz.sechub.domain.administration.autocleanup.AdministrationAutoCleanupConfig)1 UseCaseAdminFetchesAutoCleanupConfiguration (com.mercedesbenz.sechub.sharedkernel.usecases.admin.config.UseCaseAdminFetchesAutoCleanupConfiguration)1