
package de.ivu.elect.presentation.kandidatur;

import javax.inject.Inject;
import javax.inject.Named;

import org.apache.deltaspike.core.api.scope.ViewAccessScoped;

import de.ivu.elect.business.kandidatur.entity.Listenkandidatur;
import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.presentation.View;

@ViewAccessScoped
@View(viewId = ListenkandidaturPersonenregisterPersonendatenSelectionView.VIEW_ID, useCase = UseCasePermission.LISTENKANDIDATUR_CREATE)
@Named(ListenkandidaturPersonenregisterPersonendatenSelectionView.COMPONENT_NAME)
public class ListenkandidaturPersonenregisterPersonendatenSelectionView extends AbstractKandidaturPersonenregisterPersonendatenSelectionView<Listenkandidatur> {

  private static final long serialVersionUID = 1L;

  public static final String COMPONENT_NAME = "listenkandidaturPersonenregisterPersonendatenSelectionView";

  public static final String VIEW_ID = "/kandidatur/listenkandidatur-personenregister-personendaten-selection.xhtml";

  @Inject
  private transient ListenkandidaturCreateViewHelper listenkandidaturCreateViewHelper;

  public ListenkandidaturPersonenregisterPersonendatenSelectionView() {
    super();
  }

  @Override
  public String getViewId() {
    return VIEW_ID;
  }

  @Override
  public String getPageHeader() {
    return getMessage("listenkandidatur.create.page.header", getCreateViewHelper().getEntityEinzahlMessage(), getListeName(), getGebietName());
  }

  @Override
  protected ListenkandidaturCreateViewHelper getCreateViewHelper() {
    return listenkandidaturCreateViewHelper;
  }

  public String getListeName() {
    return getCreateViewHelper().getListeName();
  }
}
