Search in sources :

Example 1 with Scan

use of com.hp.octane.integrations.services.vulnerabilities.fod.dto.pojos.Scan in project octane-ci-java-sdk by MicroFocus.

the class FODServiceImpl method scanIsCompleted.

private boolean scanIsCompleted(Long releaseId, Long scanId) {
    try {
        Scan completeScan = FODReleaseService.getCompleteScan(releaseId, scanId);
        if (completeScan == null) {
            return false;
        }
        logger.debug(configurer.octaneConfiguration.getLocationForLog() + "scan:" + scanId + " is:" + completeScan.status);
        if (completeScan.status == null) {
            return false;
        }
        // Scan that has not started, and not in progress is completed.
        return (!Scan.IN_PROGRESS.equals(completeScan.status) && !Scan.NOT_STARTED.equals(completeScan.status) && !Scan.QUEUED.equals(completeScan.status));
    } catch (PermanentException e) {
        throw e;
    } catch (TemporaryException e) {
        throw e;
    } catch (Exception e) {
        return false;
    }
}
Also used : TemporaryException(com.hp.octane.integrations.exceptions.TemporaryException) PermanentException(com.hp.octane.integrations.exceptions.PermanentException) Scan(com.hp.octane.integrations.services.vulnerabilities.fod.dto.pojos.Scan) TemporaryException(com.hp.octane.integrations.exceptions.TemporaryException) IOException(java.io.IOException) PermanentException(com.hp.octane.integrations.exceptions.PermanentException)

Aggregations

PermanentException (com.hp.octane.integrations.exceptions.PermanentException)1 TemporaryException (com.hp.octane.integrations.exceptions.TemporaryException)1 Scan (com.hp.octane.integrations.services.vulnerabilities.fod.dto.pojos.Scan)1 IOException (java.io.IOException)1