@SuppressWarnings("Duplicates") @Nullable @Override public EmailAddress commitValue() throws MIWTException { EmailAddress result = super.commitValue(); if (result != null) { if (!_config.getIncludedFields().contains(EmailAddressField.category)) result.setCategory(_config.getDefaultContactDataCategory()); if (StringFactory.isEmptyString(result.getEmail())) result = null; } return result; }
@SuppressWarnings("Duplicates") @Nullable @Override public EmailAddress getUIValue(Level logErrorLevel) { EmailAddress result = super.getUIValue(logErrorLevel); if (result != null) { if (!_config.getIncludedFields().contains(EmailAddressField.category)) result.setCategory(_config.getDefaultContactDataCategory()); if (StringFactory.isEmptyString(result.getEmail())) result = null; } return result; }
@Override public void init() { super.init(); if (_config.getIncludedFields().contains(EmailAddressField.category)) addEditorForProperty(_config.getCategorySupplier(), "category"); if (_config.getIncludedFields().contains(EmailAddressField.dataVisibility)) addEditorForProperty(_config.getDataVisibilitySupplier(), "dataVisibility"); if (_config.getIncludedFields().contains(EmailAddressField.email)) addEditorForProperty(_config.getEmailSupplier(), "email"); }