
package de.ivu.elect.business.dokumente.entity;

import static de.ivu.elect.business.dokumente.entity.DokumentGeneratorArt.OPEN_OFFICE_GENERATOR;
import static de.ivu.elect.business.dokumente.entity.DokumentGeneratorArt.PDF_GENERATOR;

import java.util.Collections;
import java.util.List;

public class DokumentKonverterResult {

  private final DokumentGeneratorArt dokumentGeneratorArt;

  private final List<Object> objects;

  public DokumentKonverterResult(List<Object> objects, DokumentGeneratorArt dokumentGeneratorArt) {
    super();

    this.objects = objects;
    this.dokumentGeneratorArt = dokumentGeneratorArt;
  }

  public List<Object> getObjects() {
    return objects;
  }

  public DokumentGeneratorArt getDokumentGeneratorArt() {
    return dokumentGeneratorArt;
  }

  public static DokumentKonverterResult openOfficeFromList(List<Object> objects) {
    return new DokumentKonverterResult(objects, OPEN_OFFICE_GENERATOR);
  }

  public static DokumentKonverterResult openOfficeFrom(Object o) {
    return openOfficeFromList(Collections.singletonList(o));
  }

  public static DokumentKonverterResult pdfFromList(List<Object> objects) {
    return new DokumentKonverterResult(objects, PDF_GENERATOR);
  }
}
