templateContext.put("componentId", componentId);
String componentClass = findComponentFQCN(component, selectedVersion);
templateContext.put("componentClass", componentClass);
UIPrompt prompt = context.getPrompt();
if (!prompt.promptBoolean("File '" + outputFilePath + "' already exists. Do you want to overwrite it?")) {
return Results.fail("File '" + outputFilePath + "' already exists.");
}
fileResource.createNewFile();
fileResource.setContents(template.process(templateContext));