use of org.parosproxy.paros.model.OptionsParam in project zaproxy by zaproxy.
the class DynamicSSLPanel method initParam.
@Override
public void initParam(Object obj) {
final OptionsParam options = (OptionsParam) obj;
final DynSSLParam param = options.getParamSet(DynSSLParam.class);
setRootca(param.getRootca());
}
use of org.parosproxy.paros.model.OptionsParam in project zaproxy by zaproxy.
the class EncodeDecodeParamPanel method saveParam.
@Override
public void saveParam(Object obj) throws Exception {
final OptionsParam options = (OptionsParam) obj;
final EncodeDecodeParam param = options.getParamSet(EncodeDecodeParam.class);
param.setBase64Charset((String) comboBoxBase64Charset.getSelectedItem());
param.setBase64DoBreakLines(checkBoxBase64DoBreakLines.isSelected());
}
use of org.parosproxy.paros.model.OptionsParam in project zaproxy by zaproxy.
the class OptionsExtensionPanel method saveParam.
@Override
public void saveParam(Object obj) throws Exception {
OptionsParam optionsParam = (OptionsParam) obj;
Map<String, Boolean> extensionsState = new HashMap<>();
List<Extension> exts = extensionModel.getExtensions();
for (Extension ext : exts) {
extensionsState.put(ext.getName(), ext.isEnabled());
}
optionsParam.getExtensionParam().setExtensionsState(extensionsState);
}
use of org.parosproxy.paros.model.OptionsParam in project zaproxy by zaproxy.
the class OptionsDialog method getExtraButtons.
@Override
public JButton[] getExtraButtons() {
if (extraButtons == null) {
JButton resetButton = new JButton(Constant.messages.getString("options.dialog.reset.button"));
resetButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if (View.getSingleton().showConfirmDialog(OptionsDialog.this, Constant.messages.getString("options.dialog.reset.warn")) == JOptionPane.OK_OPTION) {
try {
OptionsParam params = Model.getSingleton().getOptionsParam();
// Force the install files to be copied
Constant.getInstance().copyDefaultConfigs(new File(Constant.getInstance().FILE_CONFIG), true);
// Load them
params.load(Constant.getInstance().FILE_CONFIG);
// Force a reload in all of the option params
params.reloadConfigParamSets();
params.resetAll();
for (AbstractParamPanel panel : OptionsDialog.this.getPanels()) {
panel.reset();
}
// Reinit the dialog
OptionsDialog.this.initParam(params);
} catch (Exception e1) {
View.getSingleton().showWarningDialog(Constant.messages.getString("options.dialog.reset.error", e1.getMessage()));
}
}
}
});
extraButtons = new JButton[] { resetButton };
}
return extraButtons;
}
use of org.parosproxy.paros.model.OptionsParam in project zaproxy by zaproxy.
the class OptionsGlobalExcludeURLPanel method initParam.
@Override
public void initParam(Object obj) {
OptionsParam optionsParam = (OptionsParam) obj;
GlobalExcludeURLParam param = optionsParam.getGlobalExcludeURLParam();
getGlobalExcludeURLModel().setTokens(param.getTokens());
tokensOptionsPanel.setRemoveWithoutConfirmation(!param.isConfirmRemoveToken());
}
Aggregations