if (spec.getCopyFrom() != null && !spec.getCopyFrom().isEmpty()) {
throw new ExprValidationException("Copy-from types are not allowed with variant types");
}
boolean isAny = false;
ConfigurationVariantStream config = new ConfigurationVariantStream();
for (String typeName : spec.getTypes()) {
if (typeName.trim().equals("*")) {
isAny = true;
break;
}
config.addEventTypeName(typeName);
}
if (!isAny) {
config.setTypeVariance(ConfigurationVariantStream.TypeVariance.PREDEFINED);
}
else {
config.setTypeVariance(ConfigurationVariantStream.TypeVariance.ANY);
}
services.getValueAddEventService().addVariantStream(spec.getSchemaName(), config, services.getEventAdapterService(), services.getEventTypeIdGenerator());
eventType = services.getValueAddEventService().getValueAddProcessor(spec.getSchemaName()).getValueAddEventType();
}
}