Examples of MailFolderException


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

Examples of com.cubusmail.mail.exceptions.MailFolderException

      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

Examples of com.cubusmail.mail.exceptions.MailFolderException

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

Examples of com.cubusmail.mail.exceptions.MailFolderException

        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

Examples of com.cubusmail.mail.exceptions.MailFolderException

      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

Examples of com.cubusmail.server.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();

        return createMailFolder( newFolder );
      }
    }
    catch (MessagingException e) {
      throw new MailFolderException( IErrorCodes.EXCEPTION_FOLDER_MOVE, e, sourceFolder );
    }

    return null;
  }
View Full Code Here

Examples of com.cubusmail.server.mail.exceptions.MailFolderException

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

Examples of com.cubusmail.server.mail.exceptions.MailFolderException

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

Examples of com.cubusmail.server.mail.exceptions.MailFolderException

        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

Examples of com.cubusmail.server.mail.exceptions.MailFolderException

      Folder newFolder = this.store.getFolder( newFolderName );
      if ( !newFolder.exists() ) {
        log.debug( "Creating folder... " + newFolderName );
        boolean success = newFolder.create( Folder.HOLDS_MESSAGES );
        if ( !success ) {
          throw new MailFolderException( IErrorCodes.EXCEPTION_FOLDER_CREATE, null );
        }
        newFolder.setSubscribed( true );
      }
      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
Copyright © 2018 www.massapi.com. 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.