
package de.ivu.elect.jee.presentation.dynamicform;

import de.ivu.elect.jee.security.LoginService;

public abstract class AbstractPasswordProperty extends AbstractStringProperty {

  private final String pattern;

  private final String patternDescription;

  public AbstractPasswordProperty(Long mandantenNummer, LoginService loginService) {
    this(loginService.getPasswortFormatPattern(mandantenNummer), loginService.getPasswortFormatBeschreibung(mandantenNummer));
  }

  public AbstractPasswordProperty(String pattern, String patternDescription) {
    super();

    this.pattern = pattern;
    this.patternDescription = patternDescription;
  }

  @Override
  public PropertyType getDefaultType() {
    return PropertyType.INPUT_PASSWORD;
  }

  public String getPattern() {
    return pattern;
  }

  public String getPatternDescription() {
    return patternDescription;
  }

  public boolean isFeedback() {
    return true;
  }

  public boolean isRedisplay() {
    return false;
  }
}
