public void setModelValue(Object model, Object value) throws Exception {
((Pipe) model).setLoggingVerbosityLevel(((Integer) value).intValue());
}
};
SelectEditor editor = new SelectEditor();
editor.addOption(new DefaultSelectOption(
new Integer(MessageLogger.LOG_ERROR),
"log_errors"));
editor.addOption(new DefaultSelectOption(
new Integer(MessageLogger.LOG_WARNING),
"log_warnings"));
editor.addOption(new DefaultSelectOption(
new Integer(MessageLogger.LOG_DEBUG),
"log_debug"));
editor.addOption(new DefaultSelectOption(
new Integer(MessageLogger.LOG_DYNAMIC),
"log_dynamic"));
editor.setFormatter(new IntegerFormatter());
generalFieldsContext.addFieldInfo(new FieldInfo(id, id, modifier, editor));
}
{
// -------------------------
// Transfer log notification level drop down
// -------------------------
String id = NOTIFICATION_LEVEL;
ModelModifier modifier = new DefaultModelModifier() {
public Object getModelValue(Object model) throws Exception {
return new Integer(((Pipe) model).getTransferLogNotificationLevel());
}
public void setModelValue(Object model, Object value) throws Exception {
((Pipe) model).setTransferLogNotificationLevel(((Integer) value).intValue());
}
};
SelectEditor editor = new SelectEditor();
editor.addOption(new DefaultSelectOption(
new Integer(MessageLogger.MAIL_ERROR),
"log_errors"));
editor.addOption(new DefaultSelectOption(
new Integer(MessageLogger.MAIL_WARNING),
"log_warnings"));
editor.addOption(new DefaultSelectOption(
new Integer(MessageLogger.MAIL_DEBUG),
"log_debug"));
editor.addOption(new DefaultSelectOption(
new Integer(MessageLogger.MAIL_NONE),
"mail_none"));
editor.setFormatter(new IntegerFormatter());
generalFieldsContext.addFieldInfo(new FieldInfo(id, id, modifier, editor));
}{
// ----------
// Mail server field
// ----------
String id = MAIL_HOST;
ModelModifier modifier = new DefaultModelModifier() {
public Object getModelValue(Object model) throws Exception {
return ((Pipe) model).getMailHost();
}
public void setModelValue(Object model, Object value) throws Exception {
((Pipe) model).setMailHost((String) value);
}
};
TextEditor editor = new TextEditor();
editor.setSize(25);
editor.setFormatter(new NullHidingFormatter());
generalFieldsContext.addFieldInfo(new FieldInfo(id, id, modifier, editor));
}{
// ----------
// Recipient name field
// ----------
String id = RECIPIENT;
ModelModifier modifier = new DefaultModelModifier() {
public Object getModelValue(Object model) throws Exception {
return ((Pipe) model).getRecipientAddress();
}
public void setModelValue(Object model, Object value) throws Exception {
((Pipe) model).setRecipientAddress((String) value);
}
};
TextEditor editor = new TextEditor();
editor.setSize(25);
editor.setFormatter(new NullHidingFormatter());
generalFieldsContext.addFieldInfo(new FieldInfo(id, id, modifier, editor));
}{
// ----------
// Send-mail-when-pipe-aborts checkbox
// ----------