
package de.ivu.elect.presentation.exchange;

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

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

import de.ivu.elect.business.exchange.entity.DateiImportArt;
import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.jee.exchange.ImportOptions;

@Named(ImportDescriptionSelect.COMPONENT_NAME)
public class ImportDescriptionSelect implements ImportDescription {

  private static final long serialVersionUID = 1L;

  public static final String COMPONENT_NAME = "importDescriptionSelect";

  @Inject
  @ConversationGroup(ImportDescriptionConversationStore.class)
  protected transient ImportDescriptionConversationStore importDescriptionConversationStore;

  public ImportDescriptionSelect() {
    super();
  }

  public void close() {
    importDescriptionConversationStore.close();
  }

  public boolean isSelected() {
    return importDescriptionConversationStore.isSelected();
  }

  public ImportDescription getImportDescription() {
    return importDescriptionConversationStore.getImportDescription();
  }

  public void setImportDescription(ImportDescription importDescription) {
    importDescriptionConversationStore.setImportDescription(importDescription);
  }

  @Override
  public UseCasePermission getUseCasePermission() {
    return getImportDescription().getUseCasePermission();
  }

  @Override
  public boolean isSpecificPerWahlOrWahltermin() {
    return getImportDescription().isSpecificPerWahlOrWahltermin();
  }

  @Override
  public String getPageMenuComponentName() {
    return getImportDescription().getPageMenuComponentName();
  }

  @Override
  public DateiImportArt getDateiImportArt() {
    return getImportDescription().getDateiImportArt();
  }

  @Override
  public String getImportSearchViewId() {
    return getImportDescription().getImportSearchViewId();
  }

  @Override
  public String getImportFormatFestlegenViewId() {
    return getImportDescription().getImportFormatFestlegenViewId();
  }

  @Override
  public String getImportBestaetigenViewId() {
    return getImportDescription().getImportBestaetigenViewId();
  }

  @Override
  public boolean isConfirmationForImportNeeded() {
    return getImportDescription().isConfirmationForImportNeeded();
  }

  @Override
  public ImportOptions getDefaultImportOptions() {
    return getImportDescription().getDefaultImportOptions();
  }
}
