@SuppressWarnings({"unchecked", "rawtypes"}) public static String getErrorView(String macroId, String errorId) { Map contextMap = MacroUtils.defaultVelocityContext(); contextMap.put("macroId", macroId); contextMap.put("errorId", errorId); return VelocityUtils.getRenderedTemplate( "/templates/livingdoc/confluence/macros/livingDocMacros-error.vm", contextMap); }
@Override @SuppressWarnings({"unchecked", "rawtypes"}) public String execute(Map parameters, String body, RenderContext renderContext) throws MacroException { try { Map contextMap = MacroUtils.defaultVelocityContext(); contextMap.put(IMPORTS_PARAM, getImportList(parameters)); return VelocityUtils.getRenderedTemplate( "/templates/livingdoc/confluence/macros/livingDocImport.vm", contextMap); } catch (Exception e) { return getErrorView("livingdoc.import.macroid", e.getMessage()); } }