
package de.ivu.elect.presentation.gebietsbaum.menu;

import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.presentation.menu.AbstractMenuItemEntry;

public abstract class AbstractGebietMenuItemEntry extends AbstractMenuItemEntry {

  private static final long serialVersionUID = 1L;

  public AbstractGebietMenuItemEntry() {
    super();
  }

  @Override
  public boolean isRendered() {
    return hasUseCasePermission(getUseCasePermission());
  }

  protected abstract UseCasePermission getUseCasePermission();

  @Override
  public boolean isDisabledInternal() {
    return !isGebietSelected();
  }

}
