use of org.parosproxy.paros.model.OptionsParam in project zaproxy by zaproxy.
the class OptionsLangPanel method saveParam.
@Override
public void saveParam(Object obj) throws Exception {
OptionsParam options = (OptionsParam) obj;
ViewLocale selectedLocale = (ViewLocale) localeSelect.getSelectedItem();
if (selectedLocale != null) {
options.getViewParam().setLocale(selectedLocale.getLocale());
}
}
use of org.parosproxy.paros.model.OptionsParam in project zaproxy by zaproxy.
the class OptionsLangPanel method initParam.
@Override
public void initParam(Object obj) {
OptionsParam options = (OptionsParam) obj;
ViewLocale locale = LocaleUtils.getViewLocale(options.getViewParam().getLocale());
localeSelect.setSelectedItem(locale);
}
use of org.parosproxy.paros.model.OptionsParam in project zaproxy by zaproxy.
the class OptionsLocalePanel method saveParam.
@Override
public void saveParam(Object obj) throws Exception {
OptionsParam options = (OptionsParam) obj;
ViewLocale selectedLocale = (ViewLocale) localeSelect.getSelectedItem();
if (selectedLocale != null) {
options.getViewParam().setLocale(selectedLocale.getLocale());
}
}
use of org.parosproxy.paros.model.OptionsParam in project zaproxy by zaproxy.
the class OptionsScannerPanel method initParam.
@Override
public void initParam(Object obj) {
OptionsParam options = (OptionsParam) obj;
ScannerParam param = options.getParamSet(ScannerParam.class);
getSliderHostPerScan().setValue(param.getHostPerScan());
getSliderThreadsPerHost().setValue(param.getThreadPerHost());
getSliderDelayInMs().setValue(param.getDelayInMs());
setLabelDelayInMsValue(param.getDelayInMs());
getSpinnerMaxResultsList().setValue(param.getMaxResultsToList());
getSpinnerMaxRuleDuration().setValue(param.getMaxRuleDurationInMins());
getSpinnerMaxScanDuration().setValue(param.getMaxScanDurationInMins());
getChkInjectPluginIdInHeader().setSelected(param.isInjectPluginIdInHeader());
getChkHandleAntiCSRFTokens().setSelected(param.getHandleAntiCSRFTokens());
getChkPromptInAttackMode().setSelected(param.isPromptInAttackMode());
getChkRescanInAttackMode().setSelected(param.isRescanInAttackMode());
getChkRescanInAttackMode().setEnabled(!getChkPromptInAttackMode().isSelected());
initPolicyPulldowns();
getDefaultAscanPolicyPulldown().setSelectedItem(param.getDefaultPolicy());
getDefaultAttackPolicyPulldown().setSelectedItem(param.getAttackPolicy());
getAllowAttackModeOnStart().setSelected(param.isAllowAttackOnStart());
getSpinnerMaxChartTime().setValue(param.getMaxChartTimeInMins());
}
use of org.parosproxy.paros.model.OptionsParam in project zaproxy by zaproxy.
the class OptionsScannerPanel method saveParam.
@Override
public void saveParam(Object obj) throws Exception {
OptionsParam options = (OptionsParam) obj;
ScannerParam param = options.getParamSet(ScannerParam.class);
param.setHostPerScan(getSliderHostPerScan().getValue());
param.setThreadPerHost(getSliderThreadsPerHost().getValue());
param.setDelayInMs(getDelayInMs());
param.setMaxResultsToList(this.getSpinnerMaxResultsList().getValue());
param.setMaxRuleDurationInMins(this.getSpinnerMaxRuleDuration().getValue());
param.setMaxScanDurationInMins(this.getSpinnerMaxScanDuration().getValue());
param.setInjectPluginIdInHeader(getChkInjectPluginIdInHeader().isSelected());
param.setHandleAntiCSRFTokens(getChkHandleAntiCSRFTokens().isSelected());
param.setPromptInAttackMode(getChkPromptInAttackMode().isSelected());
param.setRescanInAttackMode(getChkRescanInAttackMode().isSelected());
param.setDefaultPolicy((String) this.getDefaultAscanPolicyPulldown().getSelectedItem());
param.setAttackPolicy((String) this.getDefaultAttackPolicyPulldown().getSelectedItem());
param.setAllowAttackOnStart(this.getAllowAttackModeOnStart().isSelected());
param.setMaxChartTimeInMins(this.getSpinnerMaxChartTime().getValue());
}
Aggregations