Exemple #1
0
 public void createFolder() throws Exception {
   Folder f = getFolder();
   try {
     if (!f.exists()) {
       f.create(Folder.HOLDS_MESSAGES);
       f.setSubscribed(true);
     } else {
       if (!f.isSubscribed()) {
         f.setSubscribed(true);
       }
     }
   } catch (MessagingException e) {
     log.warn("Could not create folder: " + f.getName());
   }
 }
Exemple #2
0
 /** @param newName */
 public void renameFolder(String newName) throws Exception {
   Folder fOld = getFolder();
   Folder fNew = handler.getStore().getFolder(profile.getFolderNameSpace() + newName);
   closeFolder(fOld);
   fOld.renameTo(fNew);
   fNew.setSubscribed(true);
 }
Exemple #3
0
 public void deleteFolder() throws Exception {
   Folder f = getFolder();
   f.setSubscribed(false);
   closeFolder(f);
   f.delete(true);
 }