Class CliScanParser<T extends CliScanResponse>
- java.lang.Object
-
- com.synopsys.integration.polaris.common.cli.model.json.parser.CliScanParser<T>
-
- Direct Known Subclasses:
CliScanUnsupportedParser
,CliScanV1Parser
,CliScanV2Parser
public abstract class CliScanParser<T extends CliScanResponse> extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description CliScanParser(com.google.gson.Gson gson)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected CommonToolInfo
createCommonToolInfo(ToolInfoV1 toolInfoV1)
protected CliCommonResponseModel
createResponseModel(IssueSummaryV1 issueSummary, ProjectInfoV1 projectInfo, ScanInfoV1 scanInfo)
abstract CliCommonResponseModel
fromCliScan(com.google.gson.JsonObject versionlessModel)
protected T
fromJson(com.google.gson.JsonObject jsonObject)
abstract com.google.gson.reflect.TypeToken<T>
getTypeToken()
protected void
populateIssueSummary(IssueSummaryV1 issueSummaryV1, java.util.function.Consumer<CommonIssueSummary> consumer)
protected void
populateProjectInfo(ProjectInfoV1 projectInfoV1, java.util.function.Consumer<CommonProjectInfo> consumer)
protected void
populateScanInfo(ScanInfoV1 scanInfoV1, java.util.function.Consumer<CommonScanInfo> consumer)
-
-
-
Method Detail
-
getTypeToken
public abstract com.google.gson.reflect.TypeToken<T> getTypeToken()
-
fromCliScan
public abstract CliCommonResponseModel fromCliScan(com.google.gson.JsonObject versionlessModel) throws com.synopsys.integration.exception.IntegrationException
- Throws:
com.synopsys.integration.exception.IntegrationException
-
fromJson
protected T fromJson(com.google.gson.JsonObject jsonObject)
-
createResponseModel
protected CliCommonResponseModel createResponseModel(IssueSummaryV1 issueSummary, ProjectInfoV1 projectInfo, ScanInfoV1 scanInfo) throws com.synopsys.integration.exception.IntegrationException
- Throws:
com.synopsys.integration.exception.IntegrationException
-
populateScanInfo
protected void populateScanInfo(ScanInfoV1 scanInfoV1, java.util.function.Consumer<CommonScanInfo> consumer) throws com.synopsys.integration.exception.IntegrationException
- Throws:
com.synopsys.integration.exception.IntegrationException
-
populateProjectInfo
protected void populateProjectInfo(ProjectInfoV1 projectInfoV1, java.util.function.Consumer<CommonProjectInfo> consumer)
-
populateIssueSummary
protected void populateIssueSummary(IssueSummaryV1 issueSummaryV1, java.util.function.Consumer<CommonIssueSummary> consumer) throws com.synopsys.integration.exception.IntegrationException
- Throws:
com.synopsys.integration.exception.IntegrationException
-
createCommonToolInfo
protected CommonToolInfo createCommonToolInfo(ToolInfoV1 toolInfoV1) throws com.synopsys.integration.exception.IntegrationException
- Throws:
com.synopsys.integration.exception.IntegrationException
-
-