package de.ivu.elect.presentation.email.form;

import de.ivu.elect.business.email.entity.EmailConstants;
import de.ivu.elect.business.email.entity.EmailVorgang;
import de.ivu.elect.jee.presentation.dynamicform.AbstractStringProperty;

public class EmailVorgangEmpfaengerAdresseManuellProperty extends AbstractStringProperty {

  private final EmailVorgang entity;

  public EmailVorgangEmpfaengerAdresseManuellProperty(EmailVorgang entity) {
    super();
    this.entity = entity;
  }

  @Override
  public String getValue() {
    return entity.getEmpfaengerAdresseManuell();
  }

  @Override
  public void setValue(String s) {
    entity.setEmpfaengerAdresseManuell(s);
  }

  @Override
  public int getDefaultMaxLength() {
    return 255;
  }

  @Override
  public String getDefaultLabel() {
    return getMessage(EmailConstants.MESSAGE_KEY_EMPFAENGER_EINZAHL);
  }

  @Override
  public boolean getDefaultRequired() {
    return true;
  }
}
