package de.ivu.elect.presentation;

import javax.enterprise.inject.Specializes;
import javax.inject.Inject;

import de.ivu.elect.presentation.replikation.ReplikationPresentationStatus;

/**
 *  on 17.11.2015.
 */
@Specializes
public class WasAppHeading extends AppHeading {

  private static final long serialVersionUID = 1L;

  @Inject
  private transient ReplikationPresentationStatus replikationPresentationStatus;

  @Override
  protected String appendSystemInfos(String heading) {
    String result = super.appendSystemInfos(heading);

    if (replikationPresentationStatus.isMaster()) {
      result += getSeparator();
      result += getMessage("replikation.header.master");
    }
    if (replikationPresentationStatus.isSlave()) {
      result += getSeparator();
      result += getMessage("replikation.header.slave");
    }
    
    return result;
  }
}
