Search in sources :

Example 1 with PomTemplate

use of org.eclipse.vorto.codegen.bosch.things.javaclient.templates.PomTemplate in project vorto by eclipse.

the class JavaClientTask method generate.

@Override
public void generate(InformationModel element, InvocationContext context, IGeneratedWriter writer) {
    ChainedCodeGeneratorTask<InformationModel> generator = new ChainedCodeGeneratorTask<InformationModel>();
    generator.addTask(new GeneratorTaskFromFileTemplate<>(new PomTemplate()));
    generator.addTask(new GeneratorTaskFromFileTemplate<>(new LogbackTemplate()));
    generator.addTask(new ThingsClientGeneratorTask());
    generator.addTask(new ThingsIntegrationUtilGeneratorTask());
    generator.generate(element, context, writer);
    for (FunctionblockProperty fbProperty : element.getProperties()) {
        if (context.getConfigurationProperties().getOrDefault(CONFIG_PARAM_SKIP_CLIENT, "false").equalsIgnoreCase("false")) {
            new GeneratorTaskFromFileTemplate<>(new FunctionblockTemplate()).generate(fbProperty.getType(), context, writer);
        }
    }
}
Also used : PomTemplate(org.eclipse.vorto.codegen.bosch.things.javaclient.templates.PomTemplate) LogbackTemplate(org.eclipse.vorto.codegen.bosch.things.javaclient.templates.LogbackTemplate) ThingsClientGeneratorTask(org.eclipse.vorto.codegen.bosch.things.javaclient.tasks.ThingsClientGeneratorTask) InformationModel(org.eclipse.vorto.core.api.model.informationmodel.InformationModel) ChainedCodeGeneratorTask(org.eclipse.vorto.codegen.api.ChainedCodeGeneratorTask) FunctionblockProperty(org.eclipse.vorto.core.api.model.informationmodel.FunctionblockProperty) ThingsIntegrationUtilGeneratorTask(org.eclipse.vorto.codegen.bosch.things.javaclient.tasks.ThingsIntegrationUtilGeneratorTask) FunctionblockTemplate(org.eclipse.vorto.codegen.bosch.things.javaclient.templates.FunctionblockTemplate)

Aggregations

ChainedCodeGeneratorTask (org.eclipse.vorto.codegen.api.ChainedCodeGeneratorTask)1 ThingsClientGeneratorTask (org.eclipse.vorto.codegen.bosch.things.javaclient.tasks.ThingsClientGeneratorTask)1 ThingsIntegrationUtilGeneratorTask (org.eclipse.vorto.codegen.bosch.things.javaclient.tasks.ThingsIntegrationUtilGeneratorTask)1 FunctionblockTemplate (org.eclipse.vorto.codegen.bosch.things.javaclient.templates.FunctionblockTemplate)1 LogbackTemplate (org.eclipse.vorto.codegen.bosch.things.javaclient.templates.LogbackTemplate)1 PomTemplate (org.eclipse.vorto.codegen.bosch.things.javaclient.templates.PomTemplate)1 FunctionblockProperty (org.eclipse.vorto.core.api.model.informationmodel.FunctionblockProperty)1 InformationModel (org.eclipse.vorto.core.api.model.informationmodel.InformationModel)1