use of com.sequenceiq.flow.core.FlowEvent in project cloudbreak by hortonworks.
the class Flow2Config method flowConfigurationMap.
@Bean
public Map<String, FlowConfiguration<?>> flowConfigurationMap(List<FlowConfiguration<?>> flowConfigs) {
Map<String, FlowConfiguration<?>> flowConfigMap = new HashMap<>();
for (FlowConfiguration<?> flowConfig : flowConfigs) {
for (FlowEvent event : flowConfig.getInitEvents()) {
String key = event.event();
if (flowConfigMap.get(key) != null) {
throw new UnsupportedOperationException("Event already registered: " + key);
}
flowConfigMap.put(key, flowConfig);
}
}
return ImmutableMap.copyOf(flowConfigMap);
}
Aggregations