use of org.parosproxy.paros.view.AbstractParamPanel in project zaproxy by zaproxy.
the class ExtensionActiveScan method showPolicyDialog.
protected void showPolicyDialog(PolicyManagerDialog parent, String name) throws ConfigurationException {
ScanPolicy policy;
if (name != null) {
policy = this.getPolicyManager().getPolicy(name);
} else {
policy = this.getPolicyManager().getTemplatePolicy();
}
PolicyDialog dialog = new PolicyDialog(this, parent, policy);
dialog.initParam(getModel().getOptionsParam());
for (AbstractParamPanel panel : policyPanels) {
dialog.addPolicyPanel(panel);
}
int result = dialog.showDialog(true);
if (result == JOptionPane.OK_OPTION) {
try {
getModel().getOptionsParam().getConfig().save();
} catch (ConfigurationException ce) {
logger.error(ce.getMessage(), ce);
getView().showWarningDialog(Constant.messages.getString("scanner.save.warning"));
}
}
}
Aggregations