Search in sources :

Example 6 with ProjectDefinition

use of com.walmartlabs.concord.project.model.ProjectDefinition 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);
}
Also used : ProcessDefinition(io.takari.bpm.model.ProcessDefinition) Imports(com.walmartlabs.concord.imports.Imports) YamlImportConverter.convertImports(com.walmartlabs.concord.project.yaml.YamlImportConverter.convertImports) Profile(com.walmartlabs.concord.project.model.Profile) YamlProfile(com.walmartlabs.concord.project.yaml.model.YamlProfile) ProjectDefinition(com.walmartlabs.concord.project.model.ProjectDefinition) Trigger(com.walmartlabs.concord.project.model.Trigger) Resources(com.walmartlabs.concord.project.model.Resources) FormDefinition(io.takari.bpm.model.form.FormDefinition)

Aggregations

ProjectDefinition (com.walmartlabs.concord.project.model.ProjectDefinition)6 ImportManager (com.walmartlabs.concord.imports.ImportManager)3 Imports (com.walmartlabs.concord.imports.Imports)2 Resources (com.walmartlabs.concord.project.model.Resources)2 URI (java.net.URI)2 Test (org.junit.jupiter.api.Test)2 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 GuavaModule (com.fasterxml.jackson.datatype.guava.GuavaModule)1 Jdk8Module (com.fasterxml.jackson.datatype.jdk8.Jdk8Module)1 AbstractModule (com.google.inject.AbstractModule)1 Guice (com.google.inject.Guice)1 Injector (com.google.inject.Injector)1 Module (com.google.inject.Module)1 TypeLiteral (com.google.inject.TypeLiteral)1 AbstractMatcher (com.google.inject.matcher.AbstractMatcher)1 TypeEncounter (com.google.inject.spi.TypeEncounter)1 TypeListener (com.google.inject.spi.TypeListener)1 ApiClient (com.walmartlabs.concord.ApiClient)1 ApiClientConfiguration (com.walmartlabs.concord.client.ApiClientConfiguration)1 ApiClientFactory (com.walmartlabs.concord.client.ApiClientFactory)1