
package de.ivu.elect.exchange;

import javax.annotation.Nullable;

import de.ivu.elect.business.datei.entity.Datei;
import de.ivu.elect.business.exchange.control.FileFormat;
import de.ivu.elect.jee.presentation.dynamicform.FormBuilder;

public interface ExchangeMapper<C> {

  int DEFAULT_PRIORITY = 0;

  int HIGHER_PRIORITY = 100;

  int LOWER_PRIORITY = -1100;

  FileFormat getFileFormat();

  boolean isAcceptContext(C context);

  default int getPriority() {
    return DEFAULT_PRIORITY;
  }

  default void addProperties(FormBuilder formBuilder, C context, @Nullable Datei datei) {
    // To be overridden, cf. WosGebietDTOMapper#addProperties...
  }
}
