return GlobalAdministrationConfiguration.class;
}
@Override
protected GlobalAdministrationConfiguration createInstance() throws Exception {
GlobalAdministrationConfiguration globalAdministrationConfiguration = new GlobalAdministrationConfiguration();
ProblemReporter problemReporter = failFastReporter();
for (ConfigurationUnits configurationUnits : domainTypeConfigurationUnits) {
if (nonPersistentEntityType(configurationUnits.getDomainType())) {
problemReporter.error(new DomainConfigurationProblem(configurationUnits, format("Administration of non-persistent type %s is not supported.", configurationUnits.getDomainType().getSimpleName())));
continue;
}
configurationUnits = preprocessConfigurationUnits(configurationUnits);
configurationUnitsValidator.validate(configurationUnits, problemReporter);
DomainTypeAdministrationConfiguration domainTypeAdministrationConfiguration = domainTypeAdministrationConfigurationFactory.createAdministrationConfiguration(configurationUnits);
globalAdministrationConfiguration.registerDomainTypeConfiguration(domainTypeAdministrationConfiguration);
registerAssociationDomainTypeConfigurations(domainTypeAdministrationConfiguration, globalAdministrationConfiguration);
}
return globalAdministrationConfiguration;