@Test public void setDestinationFolderTest() throws KettleException, MessagingException { conn.setDestinationFolder( "a/b/c", true ); Assert.assertTrue( "Folder C created", conn.cCreated ); Assert.assertEquals( "Folder created with holds messages mode", Folder.HOLDS_MESSAGES, conn.mode.intValue() ); }
public void setDestinationFolder( String foldername, boolean createFolder ) throws KettleException { try { String[] folderparts = foldername.split( "/" ); Folder f = this.getStore().getDefaultFolder(); for ( int i = 0; i < folderparts.length; i++ ) { f = f.getFolder( folderparts[i] ); if ( !f.exists() ) { if ( createFolder ) { f.create( Folder.HOLDS_MESSAGES ); } else { throw new KettleException( BaseMessages.getString( PKG, "MailConnection.Error.FolderNotFound", foldername ) ); } } } this.destinationIMAPFolder = f; } catch ( Exception e ) { throw new KettleException( e ); } }
MailConnection { public void setDestinationFolder( String foldername, boolean createFolder ) throws KettleException { try { String[] folderparts = foldername.split( "/" ); Folder f = this.getStore().getDefaultFolder(); for ( int i = 0; i < folderparts.length; i++ ) { f = f.getFolder( folderparts[i] ); if ( !f.exists() ) { if ( createFolder ) { f.create( Folder.HOLDS_MESSAGES ); } else { throw new KettleException( BaseMessages.getString( PKG, "MailConnection.Error.FolderNotFound", foldername ) ); } } } this.destinationIMAPFolder = f; } catch ( Exception e ) { throw new KettleException( e ); } } }
MailConnection { public void setDestinationFolder( String foldername, boolean createFolder ) throws KettleException { try { String[] folderparts = foldername.split( "/" ); Folder f = this.getStore().getDefaultFolder(); for ( int i = 0; i < folderparts.length; i++ ) { f = f.getFolder( folderparts[i] ); if ( !f.exists() ) { if ( createFolder ) { f.create( Folder.HOLDS_MESSAGES ); } else { throw new KettleException( BaseMessages.getString( PKG, "MailConnection.Error.FolderNotFound", foldername ) ); } } } this.destinationIMAPFolder = f; } catch ( Exception e ) { throw new KettleException( e ); } } MailConnection( LogChannelInterface log, int protocol, String server, int port, String username,
    String password, boolean usessl, boolean useproxy, String proxyusername ); }
MailConnection { public void setDestinationFolder( String foldername, boolean createFolder ) throws KettleException { try { String[] folderparts = foldername.split( "/" ); Folder f = this.getStore().getDefaultFolder(); for ( int i = 0; i < folderparts.length; i++ ) { f = f.getFolder( folderparts[i] ); if ( !f.exists() ) { if ( createFolder ) { f.create( Folder.HOLDS_MESSAGES ); } else { throw new KettleException( BaseMessages.getString( PKG, "MailConnection.Error.FolderNotFound", foldername ) ); } } } this.destinationIMAPFolder = f; } catch ( Exception e ) { throw new KettleException( e ); } } MailConnection( LogChannelInterface log, int protocol, String server, int port, String username,
    String password, boolean usessl, boolean useproxy, String proxyusername ); boolean isConnected(); boolean isUseSSL(); boolean isUseProxy(); String getProxyUsername(); Store getStore(); Folder getFolder(); void connect(); void openFolder( boolean write ); void openFolder( String foldername, boolean write ); void openFolder( String foldername, boolean defaultFolder, boolean write ); void clearFilters(); void disconnect(); void closeFolder( boolean expunge ); SearchTerm getSearchTerm(); void setSubjectTerm( String subject, boolean notTerm ); void setBodyTerm( String bodyfilter, boolean notTerm ); void setSenderTerm( String sender, boolean notTerm ); void setReceipientTerm( String receipient ); void setReceivedDateTermEQ( Date receiveddate ); void setReceivedDateTermLT( Date futureDate ); void setReceivedDateTermGT( Date pastDate ); void setReceivedDateTermBetween( Date beginDate, Date endDate ); void setFlagTermNew(); void setFlagTermOld(); void setFlagTermRead(); void setFlagTermUnread(); void setFlagTermFlagged(); void setFlagTermNotFlagged(); void setFlagTermDraft(); void setFlagTermNotDraft(); void retrieveMessages(); void disconnect( boolean expunge ); void saveMessageContentToFile( String filename, String foldername ); void saveAttachedFiles( String foldername ); void saveAttachedFiles( String foldername, Pattern pattern ); void deleteMessage(); void setDestinationFolder( String foldername, boolean createFolder ); void moveMessage(); String getFolderName(); String getServer(); int getProtocol(); Message[] getMessages(); void fetchNext(); Message getMessage(); int getMessagesCount(); void updateSavedMessagesCounter(); int getSavedMessagesCounter(); int getSavedAttachedFilesCounter(); void updateSavedAttachedFilesCounter(); int getDeletedMessagesCounter(); int getMovedMessagesCounter(); void deleteMessages( boolean setCounter ); void moveMessages(); boolean folderExists( String foldername ); String[] returnAllFolders( Folder folder ); String[] returnAllFolders(); String[] returnAllFolders( String folder ); String getMessageBody(); String getMessageBody( Message m ); String getMessageBodyContentType( Message m ); boolean isMessageNew(); boolean isMessageNew( Message msg ); boolean isMessageRead(); boolean isMessageRead( Message msg ); boolean isMessageFlagged(); boolean isMessageFlagged( Message msg ); boolean isMessageDeleted(); boolean isMessageDeleted( Message msg ); boolean isMessageDraft(); boolean isMessageDraft( Message msg ); String toString(); int getAttachedFilesCount( Pattern pattern ); int getAttachedFilesCount( Message message, Pattern pattern ); }
MailConnection { public void setDestinationFolder( String foldername, boolean createFolder ) throws KettleException { try { String[] folderparts = foldername.split( "/" ); Folder f = this.getStore().getDefaultFolder(); for ( int i = 0; i < folderparts.length; i++ ) { f = f.getFolder( folderparts[i] ); if ( !f.exists() ) { if ( createFolder ) { f.create( Folder.HOLDS_MESSAGES ); } else { throw new KettleException( BaseMessages.getString( PKG, "MailConnection.Error.FolderNotFound", foldername ) ); } } } this.destinationIMAPFolder = f; } catch ( Exception e ) { throw new KettleException( e ); } } MailConnection( LogChannelInterface log, int protocol, String server, int port, String username,
    String password, boolean usessl, boolean useproxy, String proxyusername ); boolean isConnected(); boolean isUseSSL(); boolean isUseProxy(); String getProxyUsername(); Store getStore(); Folder getFolder(); void connect(); void openFolder( boolean write ); void openFolder( String foldername, boolean write ); void openFolder( String foldername, boolean defaultFolder, boolean write ); void clearFilters(); void disconnect(); void closeFolder( boolean expunge ); SearchTerm getSearchTerm(); void setSubjectTerm( String subject, boolean notTerm ); void setBodyTerm( String bodyfilter, boolean notTerm ); void setSenderTerm( String sender, boolean notTerm ); void setReceipientTerm( String receipient ); void setReceivedDateTermEQ( Date receiveddate ); void setReceivedDateTermLT( Date futureDate ); void setReceivedDateTermGT( Date pastDate ); void setReceivedDateTermBetween( Date beginDate, Date endDate ); void setFlagTermNew(); void setFlagTermOld(); void setFlagTermRead(); void setFlagTermUnread(); void setFlagTermFlagged(); void setFlagTermNotFlagged(); void setFlagTermDraft(); void setFlagTermNotDraft(); void retrieveMessages(); void disconnect( boolean expunge ); void saveMessageContentToFile( String filename, String foldername ); void saveAttachedFiles( String foldername ); void saveAttachedFiles( String foldername, Pattern pattern ); void deleteMessage(); void setDestinationFolder( String foldername, boolean createFolder ); void moveMessage(); String getFolderName(); String getServer(); int getProtocol(); Message[] getMessages(); void fetchNext(); Message getMessage(); int getMessagesCount(); void updateSavedMessagesCounter(); int getSavedMessagesCounter(); int getSavedAttachedFilesCounter(); void updateSavedAttachedFilesCounter(); int getDeletedMessagesCounter(); int getMovedMessagesCounter(); void deleteMessages( boolean setCounter ); void moveMessages(); boolean folderExists( String foldername ); String[] returnAllFolders( Folder folder ); String[] returnAllFolders(); String[] returnAllFolders( String folder ); String getMessageBody(); String getMessageBody( Message m ); String getMessageBodyContentType( Message m ); boolean isMessageNew(); boolean isMessageNew( Message msg ); boolean isMessageRead(); boolean isMessageRead( Message msg ); boolean isMessageFlagged(); boolean isMessageFlagged( Message msg ); boolean isMessageDeleted(); boolean isMessageDeleted( Message msg ); boolean isMessageDraft(); boolean isMessageDraft( Message msg ); String toString(); int getAttachedFilesCount( Pattern pattern ); int getAttachedFilesCount( Message message, Pattern pattern );  }