use of com.mercedesbenz.sechub.domain.scan.TargetRegistry in project sechub by mercedes-benz.
the class AbstractInstallSetupProductExecutor method execute.
@Override
public final List<ProductResult> execute(SecHubExecutionContext context, ProductExecutorContext executorContext) throws SecHubExecutionException {
UUIDTraceLogID traceLogId = context.getTraceLogId();
LOG.debug("Executing {}", traceLogId);
SecHubConfiguration config = context.getConfiguration();
S setup = getInstallSetup();
TargetRegistry registry = createTargetRegistry();
List<URI> uris = resolveURIsForTarget(config);
registerURIs(traceLogId, setup, registry, uris);
List<InetAddress> inetAdresses = resolveInetAdressForTarget(config);
registerInetAdresses(traceLogId, setup, registry, inetAdresses);
customRegistration(traceLogId, setup, registry, config);
try {
return execute(context, executorContext, registry, setup);
} catch (SecHubExecutionException e) {
throw e;
} catch (Exception e) {
/*
* every other exception is wrapped to a SecHub execution exception which is
* handled
*/
throw new SecHubExecutionException(getIdentifier() + " execution failed." + traceLogId, e);
}
}
Aggregations