private void copyMissingLogs(
     JwList<String> missingFilenames, String targetPath, String sourcePath) {
   for (String e : missingFilenames) {
     String sourceFilename = JwUtility.joinPath(sourcePath, e);
     String targetFilename = JwUtility.joinPath(targetPath, e);
     File sourceFile = new File(sourceFilename);
     File targetFile = new File(targetFilename);
     JwUtility.copyFile(sourceFile, targetFile);
   }
 }
 private void ftpMissingLogs(
     JwList<String> missingFilenames, String targetPath, String sourcePath) {
   JwFtpClient logFtpClient = null;
   try {
     logFtpClient = AcFtpClient.getLogFtpClient();
     for (String e : missingFilenames) {
       String sourceFilename = JwUtility.joinPath(sourcePath, e);
       String targetFilename = JwUtility.joinPath(targetPath, e);
       logFtpClient.put(targetFilename, sourceFilename);
     }
   } finally {
     if (logFtpClient != null) logFtpClient.close();
   }
 }
Ejemplo n.º 3
0
  public void move(AcLockingFileWrapper wrapper, String directoryPath) {
    String oldPath = wrapper.getCurrentPath();
    String newPath = JwUtility.joinPath(directoryPath, wrapper.getFilename());

    move(oldPath, newPath);
    wrapper.setDirectoryPath(directoryPath);
  }
 private String getTargetLogPath() {
   return JwUtility.joinPath(getTargetRootPath(), getLocalHostname());
 }