Search in sources :

Example 1 with AbstractParamPanel

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"));
        }
    }
}
Also used : AbstractParamPanel(org.parosproxy.paros.view.AbstractParamPanel) ConfigurationException(org.apache.commons.configuration.ConfigurationException)

Aggregations

ConfigurationException (org.apache.commons.configuration.ConfigurationException)1 AbstractParamPanel (org.parosproxy.paros.view.AbstractParamPanel)1