public static String getTempGeneratePath() { String tempGeneratePath = formatGeneratePath(System.getProperty("java.io.tmpdir")) + SkeletonConstant.SKELETON; return tempGeneratePath; } }
private String generateTemplatePath() { if (generatorClass != null) { return SkeletonConstant.FILE_SEPARATOR + (StringUtils.isNotEmpty(prefixTemplatePath) ? prefixTemplatePath + SkeletonConstant.FILE_SEPARATOR : "") + SkeletonUtil.formatGeneratePath(generatorClass, reducedTemplatePath); } return SkeletonConstant.FILE_SEPARATOR + SkeletonUtil.formatGeneratePath(baseTemplatePath) + (StringUtils.isNotEmpty(projectType) ? projectType : "") + SkeletonConstant.FILE_SEPARATOR + fileType; } }
public static String getOutputPath(String generatePath, String projectType, SkeletonProperties skeletonProperties) { return formatGeneratePath(generatePath) + (StringUtils.isNotEmpty(projectType) ? getBaseDirectoryName(projectType, skeletonProperties) + "/" : ""); }
public static String getCanonicalPath(String generatePath, String fileName, SkeletonProperties skeletonProperties) { return formatGeneratePath(generatePath) + getCanonicalFileName(fileName, skeletonProperties); }
@Override protected String getPath() throws SkeletonException { String fileName = null; String outputPath = null; Object dataModel = null; try { fileName = getFileName(); outputPath = getOutputPath(); dataModel = getDataModel(); } catch (Exception e) { throw new SkeletonException(e.getMessage(), e); } String fullPath = SkeletonUtil.formatGeneratePath(outputPath) + fileName; LOG.info("--------------- File Generator Information ---------------"); LOG.info("Template Path : {}", getSkeletonContext().getConfig().getTemplatePath() + SkeletonConstant.FILE_SEPARATOR + getTemplateName()); LOG.info("Output Path : {}", fullPath); LOG.info("Data Model : {}", dataModel); LOG.info("----------------------------------------------------------"); return fullPath; }
@Override protected String getPath() throws SkeletonException { String className = null; String packagePath = null; String outputPath = null; boolean isMainCode = true; Object dataModel = null; try { className = getClassName(); packagePath = getPackage(); outputPath = getOutputPath(); isMainCode = isMainCode(); dataModel = getDataModel(); } catch (Exception e) { throw new SkeletonException(e.getMessage(), e); } String fullPath = SkeletonUtil.formatGeneratePath(outputPath) + (isMainCode ? SkeletonConstant.MAIN_JAVA_CODE_PATH : SkeletonConstant.TEST_JAVA_CODE_PATH) + packagePath.replace(".", SkeletonConstant.FILE_SEPARATOR) + SkeletonConstant.FILE_SEPARATOR + className + "." + SkeletonConstant.JAVA; LOG.info("--------------- Java Generator Information ---------------"); LOG.info("Template Path : {}", getSkeletonContext().getConfig().getTemplatePath() + SkeletonConstant.FILE_SEPARATOR + getTemplateName()); LOG.info("Output Path : {}", fullPath); LOG.info("Package : {}", packagePath); LOG.info("Data Model : {}", dataModel); LOG.info("----------------------------------------------------------"); return fullPath; }