com.atlassian.confluence.mail.importers
Class MboxImporter

java.lang.Object
  extended bycom.atlassian.core.task.longrunning.AbstractLongRunningTask
      extended bycom.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask
          extended bycom.atlassian.confluence.mail.importers.MboxImporter
All Implemented Interfaces:
LongRunningTask, Runnable

public class MboxImporter
extends ConfluenceAbstractLongRunningTask


Field Summary
 
Fields inherited from class com.atlassian.core.task.longrunning.AbstractLongRunningTask
progress
 
Constructor Summary
MboxImporter()
           
 
Method Summary
 String getName()
           
 void importMbox()
           
 void run()
          Perform the import.
 void setFile(File file)
          Set the file the mail will be read from.
 void setInputStream(InputStream input)
          You don't need to set the input stream if you've already set a File
 void setMailContentManager(MailContentManager mailContentManager)
          Provided by Spring
 void setSessionFactory(net.sf.hibernate.SessionFactory sessionFactory)
          Provided by Spring
 void setSpace(Space space)
          Set the space the mails will be added to.
 void setTransactionManager(org.springframework.orm.hibernate.HibernateTransactionManager transactionManager)
           
 
Methods inherited from class com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask
getResourceBundle
 
Methods inherited from class com.atlassian.core.task.longrunning.AbstractLongRunningTask
getCurrentStatus, getElapsedTime, getEstimatedTimeRemaining, getNameKey, getPercentageComplete, getPrettyElapsedTime, getPrettyTimeRemaining, isComplete, isSuccessful
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MboxImporter

public MboxImporter()
Method Detail

setSpace

public void setSpace(Space space)
Set the space the mails will be added to.

Parameters:
space - the space the mails will be added to

setFile

public void setFile(File file)
Set the file the mail will be read from. Reading from a file is preferred as we can pre-scan it to determine the total number of mails to import

Parameters:
file - the file the mails will be read from

setInputStream

public void setInputStream(InputStream input)
You don't need to set the input stream if you've already set a File

Parameters:
input - the input stream to read the mail from

setSessionFactory

public void setSessionFactory(net.sf.hibernate.SessionFactory sessionFactory)
Provided by Spring


setMailContentManager

public void setMailContentManager(MailContentManager mailContentManager)
Provided by Spring


setTransactionManager

public void setTransactionManager(org.springframework.orm.hibernate.HibernateTransactionManager transactionManager)

run

public void run()
Perform the import. You must have both space and one of File or input set before running this method.


importMbox

public void importMbox()
                throws IOException
Throws:
IOException

getName

public String getName()


Confluence is developed by Atlassian.