Esempio n. 1
0
 /**
  * Signals that a harvest of a Data Source finished. RepoxManager will store synchronization dates
  *
  * @param date
  * @throws Exception
  */
 public void signalSynchronizationFinished(Date date) throws IOException {
   File dataSourceSyncDateFile = getSyncDateFile();
   RepoxConfiguration configuration = RepoxContextUtil.getRepoxManager().getConfiguration();
   File syncDateFile =
       new File(configuration.getRepositoryPath(), "synchronization-date-global.txt");
   String dateAsString = DateUtil.date2String(date, TimeUtil.SHORT_DATE_FORMAT);
   FileUtil.writeToFile(dataSourceSyncDateFile, dateAsString);
   FileUtil.writeToFile(syncDateFile, dateAsString);
 }
Esempio n. 2
0
 public File getDataSourceDir(String dataSourceId) {
   RepoxConfiguration configuration = RepoxContextUtil.getRepoxManager().getConfiguration();
   File dataSourceDir = new File(configuration.getRepositoryPath(), dataSourceId);
   dataSourceDir.mkdir();
   return dataSourceDir;
 }