use of com.walmartlabs.concord.project.model.Trigger in project concord by walmartlabs.
the class YamlProjectConverter method convert.
public static ProjectDefinition convert(YamlProject project) throws YamlConverterException {
Map<String, ProcessDefinition> flows = convertFlows(project.getFlows());
Set<String> publicFlows = project.getPublicFlows();
Map<String, FormDefinition> forms = convertForms(project.getForms());
Map<String, Object> cfg = project.getConfiguration();
Map<String, Profile> profiles = convertProfiles(project.getProfiles());
List<Trigger> triggers = YamlTriggersConverter.convert(project.getTriggers());
Imports imports = convertImports(project.getImports());
Resources resources = convertResources(project.getResources());
return new ProjectDefinition(flows, publicFlows, forms, cfg, profiles, triggers, imports, resources);
}
use of com.walmartlabs.concord.project.model.Trigger in project concord by walmartlabs.
the class YamlTriggersConverter method convert.
public static List<Trigger> convert(List<YamlTrigger> triggers) {
if (triggers == null || triggers.isEmpty()) {
return null;
}
List<Trigger> result = new ArrayList<>();
for (YamlTrigger t : triggers) {
TriggerConverter converter = converters.getOrDefault(t.getEventSource(), defaultConverter);
result.add(converter.convert(t));
}
return result;
}
Aggregations