Package com.cubusmail.mail.exceptions

Examples of com.cubusmail.mail.exceptions.MailFolderException


        Folder newFolder = this.store.getFolder( newFolderName );
        if ( !newFolder.exists() ) {
          sourceFolder.renameTo( newFolder );
        }
        else {
          throw new MailFolderException( IErrorCodes.EXCEPTION_FOLDER_ALREADY_EXIST, null, sourceFolder );
        }
        loadMailFolder();
      }
    }
    catch (MessagingException e) {
      throw new MailFolderException( IErrorCodes.EXCEPTION_FOLDER_MOVE, e, sourceFolder );
    }
  }
View Full Code Here


      Folder newFolder = this.store.getFolder( newName );
      if ( !newFolder.exists() ) {
        folder.renameTo( newFolder );
      }
      else {
        throw new MailFolderException( IErrorCodes.EXCEPTION_FOLDER_ALREADY_EXIST, null,
            createMailFolder( newFolder ) );
      }
      loadMailFolder();
    }
    catch (MessagingException ex) {
      throw new MailFolderException( IErrorCodes.EXCEPTION_FOLDER_RENAME, ex, folder );
    }
  }
View Full Code Here

        }
      }
      folder.close( true );
    }
    catch (MessagingException ex) {
      throw new MailFolderException( IErrorCodes.EXCEPTION_FOLDER_EMPTY, ex, folder );
    }
  }
View Full Code Here

        if ( folder.delete( true ) ) {
          loadMailFolder();
          setCurrentFolder( getInboxFolder() );
        }
        else {
          throw new MailFolderException( IErrorCodes.EXCEPTION_FOLDER_DELETE, null, folder );
        }
      }
    }
    catch (MessagingException ex) {
      throw new MailFolderException( IErrorCodes.EXCEPTION_FOLDER_DELETE, ex, folder );
    }
  }
View Full Code Here

      if ( !newFolder.exists() ) {
        logger.debug( "Createing folder... " + newFolderName );
        newFolder.create( Folder.HOLDS_MESSAGES );
      }
      else {
        throw new MailFolderException( IErrorCodes.EXCEPTION_FOLDER_ALREADY_EXIST, null );
      }
      loadMailFolder();

      return createMailFolder( newFolder );
    }
    catch (MessagingException ex) {
      throw new MailFolderException( IErrorCodes.EXCEPTION_FOLDER_CREATE, ex );
    }
  }
View Full Code Here

TOP

Related Classes of com.cubusmail.mail.exceptions.MailFolderException

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.