
br.com.softplan.security.zap.api.analysis.AnalyzerFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zap-client-api Show documentation
Show all versions of zap-client-api Show documentation
Java client API for the OWASP Zed Attack Proxy (ZAP), built on top of the official ZAP Java API
package br.com.softplan.security.zap.api.analysis;
import br.com.softplan.security.zap.api.model.AnalysisInfo;
import br.com.softplan.security.zap.zaproxy.clientapi.core.ClientApi;
/**
* Factory to create the correct {@link Analyzer} implementation based on the given {@link AnalysisInfo} instance.
*
* @author pdsec
*/
public final class AnalyzerFactory {
public static Analyzer makeAnalyzer(String apiKey, ClientApi api, AnalysisInfo analysisInfo) {
switch (analysisInfo.getAnalysisType()) {
case WITH_SPIDER: return new WithSpiderAnalyzer(apiKey, api);
case WITH_AJAX_SPIDER: return new WithAjaxSpiderAnalyzer(apiKey, api);
case ACTIVE_SCAN_ONLY: return new ActiveScanOnlyAnalyzer(apiKey, api);
case SPIDER_ONLY: return new SpiderOnlyAnalyzer(apiKey, api);
case SPIDER_AND_AJAX_SPIDER_ONLY: return new SpiderAndAjaxSpiderOnlyAnalyzer(apiKey, api);
default: return null;
}
}
private AnalyzerFactory() {}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy