private List<String> toJsp(DesignDefination design, File targetProject) throws IOException { List<String> fileList = new ArrayList<String>(); for (String mvcName : design.getMvcs().keySet()) { File mvcDir = new File( targetProject, "designFiles/mvcs/" + design.getProjectName() + "/" + design.getMvc(mvcName).getDirectoryName()); FileUtil.mkdir(mvcDir); fileList.addAll(generateJsps(design.getMvc(mvcName), mvcDir)); } return fileList; }
private List<String> toMvc(DesignDefination design, File targetProject) throws IOException { List<String> fileList = new ArrayList<String>(); for (String mvcName : design.getMvcs().keySet()) { File mvcDir = new File( targetProject, "designFiles/mvcs/" + design.getProjectName() + "/" + design.getMvc(mvcName).getDirectoryName()); FileUtil.mkdir(mvcDir); File mvcFile = new File(mvcDir, append(mvcName, ".mvc")); if (mvcFile.exists()) { log(mvcFile, true); } else { writeToFile(design.getMvc(mvcName).toXml(), mvcFile); fileList.add(log(mvcFile)); } } return fileList; }