package de.ivu.elect.presentation.email;

import javax.inject.Named;

import de.ivu.elect.business.email.entity.EmailLayout;
import de.ivu.elect.jee.presentation.dynamicform.FormBuilder;
import de.ivu.elect.jee.presentation.search.AbstractSearchParameters;
import de.ivu.elect.presentation.hilfe.OnlineHilfeId;
import de.ivu.elect.presentation.security.AbstractGebietSecurityFilter;

@Named(AbstractEmailLayoutSearchView.COMPONENT_NAME)
@OnlineHilfeId(value = "740", mehrfachVergebenOk = true)
public class EmailLayoutSearchView extends AbstractEmailLayoutSearchView {

  private static final long serialVersionUID = 1L;

  public EmailLayoutSearchView() {
    super();
  }

  @Override
  protected AbstractGebietSecurityFilter<EmailLayout> getGebietSecurityFilter() {
    return KEIN_GEBIET_SECURITY_FILTER;
  }

  @Override
  public void presetSearchParameters() {
    // Do nothing.
  }

  @Override
  public void addProperties(FormBuilder formBuilder) {
    String wildcardTooltip = getMessage(AbstractSearchParameters.WILDCARD_TOOLTIP_MSG_KEY);

    formBuilder.addProperty(getSearchParameters().getBezeichnungProperty()).withTooltip(wildcardTooltip).withRequired(false);
  }
}
