public void setModelValue(Object model, Object value) throws Exception {
((HTTPDestination) model).setAcceptSelfSignedCertificates((Boolean) value);
}
};
BooleanEditor editor = new BooleanEditor();
FieldInfo fieldInfo = new FieldInfo(ACCEPTSELFSIGNEDCERTIFICATES_ATTR,
ACCEPTSELFSIGNEDCERTIFICATES_ATTR, modifier, editor);
addField(ACCEPTSELFSIGNEDCERTIFICATES_ATTR, fieldInfo);
}
{
ModelModifier modifier = new DefaultModelModifier() {
public Object getModelValue(Object model) throws Exception {
return ((HTTPDestination) model).getLogEnabled();
}
public void setModelValue(Object model, Object value) throws Exception {
((HTTPDestination) model).setLogEnabled((Boolean)value);
}
};
BooleanEditor editor = new BooleanEditor();
FieldInfo fieldInfo = new FieldInfo(LOG_ATTR,
LOG_ATTR, modifier, editor);
addField(LOG_ATTR, fieldInfo);
}
{
ModelModifier modifier = new DefaultModelModifier() {
public Object getModelValue(Object model) throws Exception {
return ((HTTPDestination) model).getResponseCodeCheckDisabled();
}
public void setModelValue(Object model, Object value) throws Exception {
((HTTPDestination) model).setResponseCodeCheckDisabled((Boolean)value);
}
};
BooleanEditor editor = new BooleanEditor();
FieldInfo fieldInfo = new FieldInfo(DISABLE_RESPONSE_CODE_CHECK_ATTR,
DISABLE_RESPONSE_CODE_CHECK_ATTR, modifier, editor);
addField(DISABLE_RESPONSE_CODE_CHECK_ATTR, fieldInfo);
}
addSimpleTextFieldForComponent(PATH_ATTR, PATH_ATTR, 40);
addSimpleTextFieldForComponent(NAME_ATTR, NAME_ATTR, 20);
addSimpleTextFieldForComponent(SOAPACTION_ATTR,SOAPACTION_ATTR, 40);
addSimpleTextFieldForComponent(CONTENT_TYPE_ATTR,CONTENT_TYPE_ATTR, 40);
{
//set unique id and description labelkey
String id = CHARSET_ATTR;
ModelModifier modifier = new DefaultModelModifier() {
public Object getModelValue(Object model) throws FailTransferException,
AbortTransferException {
String value = ((HTTPDestination) model).getData().getAttribute(
CHARSET_ATTR);
return value != null ? value : DEFAULT_CHARSET;
}
public void setModelValue(Object model, Object value)
throws FailTransferException, AbortTransferException {
((HTTPDestination) model).getData().setAttribute(
CHARSET_ATTR,
(String) value);
}
};
SelectEditor editor = new SelectEditor();
for(int i = 0; i < CHARSETS.length; i++)
editor.addOption(new DefaultSelectOption(CHARSETS[i], CHARSETS[i]));
//and finally create the configurationObject
FieldInfo fieldInfo = new FieldInfo(id, id, modifier, editor);
//add the configuration to the context for usage in the http-requests.
addField(id, fieldInfo);
}
{
ModelModifier modifier = new DefaultModelModifier() {
public Object getModelValue(Object model) throws Exception {
return ((HTTPDestination) model).getChosenResponseCharset();
}
public void setModelValue(Object model, Object value) throws Exception {
((HTTPDestination) model).setChosenResponseCharset((Boolean)value);
}
};
BooleanEditor editor = new BooleanEditor();
FieldInfo fieldInfo = new FieldInfo(CHOOSE_RESPONSE_CHARSET_ATTR,
CHOOSE_RESPONSE_CHARSET_ATTR, modifier, editor);
addField(CHOOSE_RESPONSE_CHARSET_ATTR, fieldInfo);
}
{
//set unique id and description labelkey
String id = RESPONSE_CHARSET_ATTR;
ModelModifier modifier = new DefaultModelModifier() {
public Object getModelValue(Object model) throws FailTransferException,
AbortTransferException {
String value = ((HTTPDestination) model).getData().getAttribute(
RESPONSE_CHARSET_ATTR);
return value != null ? value : DEFAULT_CHARSET;
}
public void setModelValue(Object model, Object value)
throws FailTransferException, AbortTransferException {
((HTTPDestination) model).getData().setAttribute(
RESPONSE_CHARSET_ATTR,
(String) value);
}
};
SelectEditor editor = new SelectEditor();
for(int i = 0; i < CHARSETS.length; i++)
editor.addOption(new DefaultSelectOption(CHARSETS[i], CHARSETS[i]));
//and finally create the configurationObject
FieldInfo fieldInfo = new FieldInfo(id, id, modifier, editor);
//add the configuration to the context for usage in the http-requests.