use of com.developmentontheedge.be5.metadata.model.FreemarkerScript in project be5 by DevelopmentOnTheEdge.
the class ProjectFileSystem method isFromFreemarkerScripts.
private boolean isFromFreemarkerScripts(final FreemarkerScript freemarkerScript) {
final FreemarkerCatalog scripts = freemarkerScript.getModule().getFreemarkerScripts();
final boolean isFromFreemarkerScripts = scripts != null && scripts.getCompletePath().isAncestorOf(freemarkerScript.getCompletePath());
return isFromFreemarkerScripts;
}
use of com.developmentontheedge.be5.metadata.model.FreemarkerScript in project be5 by DevelopmentOnTheEdge.
the class ProjectFileSystem method isFromMacroCollection.
private boolean isFromMacroCollection(final FreemarkerScript freemarkerScript) {
final FreemarkerCatalog macros = freemarkerScript.getModule().getMacroCollection();
final boolean isFromMacroCollection = macros != null && macros.getCompletePath().isAncestorOf(freemarkerScript.getCompletePath());
return isFromMacroCollection;
}
use of com.developmentontheedge.be5.metadata.model.FreemarkerScript in project be5 by DevelopmentOnTheEdge.
the class ProjectGenerator method addFtlScripts.
private void addFtlScripts(final Project project) {
final FreemarkerCatalog scripts = project.getApplication().getFreemarkerScripts();
final FreemarkerScript securityScript = new FreemarkerScript("security", scripts);
securityScript.setSource("INSERT INTO users (user_name, user_pass) VALUES( '$LOGIN', '$PASSWORD' );\nINSERT INTO user_roles VALUES( '$LOGIN', '$ROLE' );\n".replace("$LOGIN", parameters.getTestUserLogin()).replace("$PASSWORD", parameters.getTestUserPassword()).replace("$ROLE", parameters.getTestUserRole()));
DataElementUtils.saveQuiet(securityScript);
final FreemarkerScript dictionariesScript = new FreemarkerScript("dictionaries", scripts);
final FreemarkerScript attributesScript = new FreemarkerScript("attributes", scripts);
dictionariesScript.setSource("");
attributesScript.setSource("");
DataElementUtils.saveQuiet(dictionariesScript);
DataElementUtils.saveQuiet(attributesScript);
}
Aggregations