Пример #1
0
 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;
 }
Пример #2
0
 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;
 }