use of io.automatiko.engine.codegen.process.augmentors.GcpPubSubModelAugmentor in project automatiko-engine by automatiko-io.
the class InputModelClassGenerator method generate.
public ModelMetaData generate() {
// create model class for all variables
String packageName = workFlowProcess.getPackageName();
modelMetaData = new ModelMetaData(workflowType, workFlowProcess.getId(), CodegenUtils.version(workFlowProcess.getVersion()), packageName, className, workFlowProcess.getVisibility(), VariableDeclarations.ofInput((VariableScope) ((io.automatiko.engine.workflow.base.core.Process) workFlowProcess).getDefaultContext(VariableScope.VARIABLE_SCOPE)), true, ProcessToExecModelGenerator.isServerlessWorkflow(workFlowProcess) ? "/class-templates/JsonModelTemplate.java" : "/class-templates/ModelNoIDTemplate.java", "Input data model for " + workFlowProcess.getName(), "Describes input data model expected by " + workFlowProcess.getName());
modelMetaData.setSupportsValidation(context.getBuildContext().isValidationSupported());
modelMetaData.setSupportsOpenApi(context.getBuildContext().isOpenApiSupported());
if (context.getApplicationProperty("quarkus.automatiko.target-deployment").orElse("unknown").equals("gcp-pubsub")) {
modelMetaData.addAugmentor(new GcpPubSubModelAugmentor());
}
if (context.getBuildContext().isGraphQLSupported()) {
modelMetaData.addAugmentor(new GraphQLModelAugmentor(true, null, context));
}
modelFileName = modelMetaData.getModelClassName().replace('.', '/') + ".java";
return modelMetaData;
}
use of io.automatiko.engine.codegen.process.augmentors.GcpPubSubModelAugmentor in project automatiko-engine by automatiko-io.
the class ModelClassGenerator method generate.
public ModelMetaData generate() {
// create model class for all variables
modelMetaData = execModelGenerator.generateModel(workFlowProcess);
modelFileName = modelMetaData.getModelClassName().replace('.', '/') + ".java";
modelMetaData.setSupportsValidation(context.getBuildContext().isValidationSupported());
modelMetaData.setSupportsOpenApi(context.getBuildContext().isOpenApiSupported());
modelMetaData.setAsEntity(context.getBuildContext().isEntitiesSupported(), context.getBuildContext().config().persistence().database().removeAtCompletion().orElse(false));
if (context.getApplicationProperty("quarkus.automatiko.target-deployment").orElse("unknown").equals("gcp-pubsub")) {
modelMetaData.addAugmentor(new GcpPubSubModelAugmentor());
}
return modelMetaData;
}
Aggregations