Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #234 from derms/dev
Browse files Browse the repository at this point in the history
added additional loadModelDefinition method
  • Loading branch information
rjrudin authored Jan 25, 2018
2 parents 72094bd + 2fc4bf1 commit 17cd923
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ public void execute(CommandContext context) {
}

protected GeneratedCode loadModelDefinition(AppConfig appConfig, File f, EntityServicesManager mgr) {
return loadModelDefinition(buildCodeGenerationRequest(appConfig),f,mgr);
}

protected GeneratedCode loadModelDefinition(CodeGenerationRequest codeGenerationRequest, File f, EntityServicesManager mgr) {
String name = f.getName();
String modelDefinition = null;
try {
Expand All @@ -65,7 +69,7 @@ protected GeneratedCode loadModelDefinition(AppConfig appConfig, File f, EntityS
throw new RuntimeException("Unable to read model definition from file: " + f.getAbsolutePath(), e);
}
String modelUri = mgr.loadModel(name, modelDefinition);
return mgr.generateCode(modelUri, buildCodeGenerationRequest(appConfig));
return mgr.generateCode(modelUri, codeGenerationRequest);
}

protected CodeGenerationRequest buildCodeGenerationRequest(AppConfig appConfig) {
Expand Down

0 comments on commit 17cd923

Please sign in to comment.