Search in sources :

Example 1 with OctaneIssueImpl

use of com.hp.octane.integrations.dto.securityscans.impl.OctaneIssueImpl in project octane-ci-java-sdk by MicroFocus.

the class SonarVulnerabilitiesServiceImpl method createClosedOctaneIssue.

private OctaneIssue createClosedOctaneIssue(String remoteId) {
    Entity closedListNodeEntity = SSCToOctaneIssueUtil.createListNodeEntity(ISSUE_STATE_CLOSED);
    OctaneIssueImpl octaneIssue = new OctaneIssueImpl();
    octaneIssue.setRemoteId(remoteId);
    octaneIssue.setState(closedListNodeEntity);
    return octaneIssue;
}
Also used : Entity(com.hp.octane.integrations.dto.entities.Entity) OctaneIssueImpl(com.hp.octane.integrations.dto.securityscans.impl.OctaneIssueImpl)

Example 2 with OctaneIssueImpl

use of com.hp.octane.integrations.dto.securityscans.impl.OctaneIssueImpl in project octane-ci-java-sdk by MicroFocus.

the class VulnerabilitiesGeneralUtils method createClosedOctaneIssue.

public static OctaneIssue createClosedOctaneIssue(String remoteId) {
    Entity closedListNodeEntity = createListNodeEntity(OctaneIssueConsts.ISSUE_STATE_CLOSED);
    OctaneIssueImpl octaneIssue = new OctaneIssueImpl();
    octaneIssue.setRemoteId(remoteId);
    octaneIssue.setState(closedListNodeEntity);
    return octaneIssue;
}
Also used : SSCToOctaneIssueUtil.createListNodeEntity(com.hp.octane.integrations.services.vulnerabilities.ssc.SSCToOctaneIssueUtil.createListNodeEntity) Entity(com.hp.octane.integrations.dto.entities.Entity) OctaneIssueImpl(com.hp.octane.integrations.dto.securityscans.impl.OctaneIssueImpl)

Example 3 with OctaneIssueImpl

use of com.hp.octane.integrations.dto.securityscans.impl.OctaneIssueImpl in project octane-ci-java-sdk by MicroFocus.

the class FODValuesConverter method createIssue.

private OctaneIssue createIssue(Vulnerability vulnerability, String remoteTag, VulnerabilityAllData vulnerabilityAllData, Date baselineDate) {
    OctaneIssue entity = new OctaneIssueImpl();
    entity.setCategory(vulnerability.category);
    if (vulnerability.introducedDate != null) {
        String dateAsString = getIntroducedDate(vulnerability.introducedDate, baselineDate);
        entity.setIntroducedDate(dateAsString);
    }
    setAdditionalData(vulnerability, entity, vulnerabilityAllData);
    entity.setLine(vulnerability.lineNumber);
    entity.setToolName(FODConstants.FODTool);
    entity.setPackage(vulnerability.packageValue);
    // entity.setPRid(vulnerability.);
    entity.setPrimaryLocationFull(vulnerability.primaryLocationFull);
    setStatus(entity, vulnerability.status);
    setSeverity(entity, vulnerability.severity);
    entity.setRemoteId(vulnerability.getRemoteId());
    if (vulnerabilityAllData != null) {
        setExternalLink(vulnerability, entity);
    }
    setAssignedUser(entity, vulnerability.assignedUser);
    setAnalysis(entity, vulnerability);
    entity.setRemoteTag(remoteTag);
    // setToolType(entity);
    return entity;
}
Also used : OctaneIssueImpl(com.hp.octane.integrations.dto.securityscans.impl.OctaneIssueImpl) OctaneIssue(com.hp.octane.integrations.dto.securityscans.OctaneIssue)

Aggregations

OctaneIssueImpl (com.hp.octane.integrations.dto.securityscans.impl.OctaneIssueImpl)3 Entity (com.hp.octane.integrations.dto.entities.Entity)2 OctaneIssue (com.hp.octane.integrations.dto.securityscans.OctaneIssue)1 SSCToOctaneIssueUtil.createListNodeEntity (com.hp.octane.integrations.services.vulnerabilities.ssc.SSCToOctaneIssueUtil.createListNodeEntity)1