Esempio n. 1
0
 public void cancelEvent() {
   String fileOrDirAbsolutePath = MyFacesContextUtils.getEventTempDir(getFileBean().getTempId());
   if (getFileBean().getFileCount() > 0) {
     getFileBean().removeFileOrDir(fileOrDirAbsolutePath);
   }
   scheduleEventBean = new ScheduleEventBean();
   // fileBean = new FileBean();
 }
Esempio n. 2
0
 private boolean mergeTemp(FileType fileType) {
   String fileTypeString = File.separator + fileType.toString() + File.separator;
   String tempId = getFileBean().getTempId();
   String srcFileDir;
   if (tempId != null) {
     srcFileDir = MyFacesContextUtils.getEventTempDir(tempId) + fileTypeString;
   } else {
     return false;
   }
   String uuid = getFileBean().getUuid();
   String destFileDir;
   if (uuid != null) {
     destFileDir = MyFacesContextUtils.getResourcesEventDir() + uuid + fileTypeString;
   } else {
     return false;
   }
   // TODO: if overlay == false?
   Boolean overlay = true;
   return getFileBean().mergeFile(srcFileDir, destFileDir, overlay);
 }
Esempio n. 3
0
 private void updateSchedule() {
   NavigationScheduleBean navigationScheduleBean =
       (NavigationScheduleBean) MyFacesContextUtils.findBeanByName("navigationScheduleBean");
   // TODO: update process;
   navigationScheduleBean.initialize();
 }