
package de.ivu.elect.presentation.personenregister;

import de.ivu.elect.business.exchange.control.WebServiceErreichbarStatus;
import de.ivu.elect.business.exchange.control.WebServiceStatus;
import de.ivu.elect.business.personenregister.entity.PersonenregisterSource;
import de.ivu.elect.jee.presentation.dynamicform.AdvancedDynaFormModel;
import de.ivu.elect.jee.presentation.dynamicform.FormBuilder;
import de.ivu.elect.jee.presentation.dynamicform.Property;

import java.util.List;

public interface PersonenregisterStatusTestInterface {

  String getTitle();

  PersonenregisterSource getSource();

  WebServiceStatus getWebServiceStatus();

  WebServiceErreichbarStatus getErreichbarStatus();

  List<Property> getProperties();

  default AdvancedDynaFormModel getModel() {
    FormBuilder formBuilder = new FormBuilder();
    getProperties().forEach(formBuilder::addProperty);

    return formBuilder.createModel();
  }

  String getInvocationExceptionMessage();

  String getInvocationExceptionCauses();

  Exception getInvocationException();
}
