Package org.uengine.util

Examples of org.uengine.util.LocalFileSystem


    String writeFormPath = formName + "_write.jsp";
    String viewFormPath = formName + "_view.jsp";
    String viewFormHandlerPath = formName + "_formview.jsp";
    String printFormPath = formName + "_print.jsp";
   
    LocalFileSystem fileSystem = new LocalFileSystem();
   
    File srcFile = new File(formDir, htmlFormPath);
    File trgFile = new File(contextDir, toHtmlFormPath);   
    fileSystem.copyFile(srcFile, trgFile);   
    trgFile.setLastModified(srcFile.lastModified());
   
    if ( (new File(formDir, writeFormPath).exists()) ) {
      File srcWriteFile = new File(formDir, writeFormPath);
      File trgWriteFile = new File(contextDir, writeFormPath);
      fileSystem.copyFile(srcWriteFile, trgWriteFile);
      trgWriteFile.setLastModified(srcWriteFile.lastModified());     
    }
    if ( (new File(formDir, viewFormPath).exists()) ) {
      File srcViewFile = new File(formDir, viewFormPath);
      File trgViewFile = new File(contextDir, viewFormPath);
      fileSystem.copyFile(srcViewFile, trgViewFile);
      trgViewFile.setLastModified(srcViewFile.lastModified());
    }   
    if ( (new File(formDir, viewFormHandlerPath).exists()) ) {
      File srcViewFormHandlerPath = new File(formDir, viewFormHandlerPath);
      File trgViewFormHandlerPath = new File(contextDir, viewFormHandlerPath);
      fileSystem.copyFile(srcViewFormHandlerPath, trgViewFormHandlerPath);
      trgViewFormHandlerPath.setLastModified(srcViewFormHandlerPath.lastModified());
    }   
    if ( (new File(formDir, printFormPath).exists()) ) {
      File srcPrintForm = new File(formDir, printFormPath);
      File trgPrintForm = new File(contextDir, printFormPath);
      fileSystem.copyFile(srcPrintForm, trgPrintForm);
      trgPrintForm.setLastModified(srcPrintForm.lastModified());
   
   
    File formImgDir = new File(formDir, formName);
    if ( formImgDir.exists() ) {
      File contextImgDir = new File(contextDir, formName);
      if ( !contextImgDir.exists() ) contextImgDir.mkdir();
      String[] imgFileArray = formImgDir.list();
      for (int i=0; i<imgFileArray.length; i++) {
        if (logger.isInfoEnabled()) {
          logger
              .info("copyFile(File, File, String) - " + imgFileArray[i]); //$NON-NLS-1$
        }
        fileSystem.copyFile(new File(formDir, formName+"/"+imgFileArray[i]), new File(contextDir, formName+"/"+imgFileArray[i]));
      }
    }
   
  } 
View Full Code Here


    File contextFormDir = new File(contextDir, formName);
    if ( !contextFormDir.getParentFile().exists() ) contextFormDir.getParentFile().mkdirs();
   
    String submitFormPath = formName + "_submit.jsp";
   
    LocalFileSystem fileSystem = new LocalFileSystem();
   
    if ( (new File(formDir, submitFormPath).exists()) ) {
      fileSystem.copyFile(new File(formDir, submitFormPath), new File(contextDir, submitFormPath));
   
  } 
View Full Code Here

TOP

Related Classes of org.uengine.util.LocalFileSystem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.