Class MailAccount

java.lang.Object
com.jalios.jcms.mail.MailAccount

public class MailAccount extends Object
Author:
Jean-Philippe Encausse
  • Field Details

    • PROVIDER_NAME

      protected static final String PROVIDER_NAME
      See Also:
    • name

      protected String name
    • label

      protected String label
    • provider

      protected AbstractMailProvider provider
    • mbox

      protected String mbox
    • schedule

      protected String schedule
    • enabled

      protected boolean enabled
    • expunge

      protected boolean expunge
    • author

      protected Member author
    • ws

      protected Workspace ws
    • expungeSet

      protected Set<String> expungeSet
    • properties

      protected JProperties properties
    • fetchDate

      protected long fetchDate
    • fetchCount

      protected int fetchCount
  • Constructor Details

  • Method Details

    • getMailAccount

      public static MailAccount getMailAccount(String label, String name, LangProperties props, Map<String,AbstractMailProvider> providerMap)
    • getPropertyFile

      protected File getPropertyFile()
    • loadProperties

      protected void loadProperties()
    • saveProperties

      protected void saveProperties()
    • fetch

      public List<MailMessage> fetch(FetchMailTransaction mailTransaction) throws ServiceException
      Throws:
      ServiceException
    • expunge

      public void expunge(FetchMailTransaction mailTransaction) throws ServiceException
      Throws:
      ServiceException
    • startFetchTransaction

      public FetchMailTransaction startFetchTransaction() throws ServiceException
      Throws:
      ServiceException
    • endFetchTransaction

      public void endFetchTransaction(FetchMailTransaction mailTransaction) throws ServiceException
      Throws:
      ServiceException
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isEnabled

      public boolean isEnabled()
      Retuns true if this account is enable
      Returns:
      boolean
    • getDBMailMessageCount

      public int getDBMailMessageCount()
      Returns the count of DBMailMessage stored in DataBase for this account
      Returns:
      int DB count
    • getLastFetchDate

      public Date getLastFetchDate()
      Returns Date of latest fetch with this account
      Returns:
      Date last fetch
    • getLastFetchCount

      public int getLastFetchCount()
      Returns the number of mail fetched on latest fetch with this account
      Returns:
      int fetch count
    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getLabel

      public String getLabel()
    • setLabel

      public void setLabel(String label)
    • getAuthor

      public Member getAuthor()
    • setAuthor

      public void setAuthor(Member author)
    • getWorkspace

      public Workspace getWorkspace()
    • setWorkspace

      public void setWorkspace(Workspace ws)
    • getMbox

      public String getMbox()
    • setMbox

      public void setMbox(String mbox)
    • getSchedule

      public String getSchedule()
    • setSchedule

      public void setSchedule(String schedule)
    • isExpunged

      public boolean isExpunged()
    • setExpunge

      public void setExpunge(boolean expunge)
    • getProviderName

      public String getProviderName()
    • getProvider

      public AbstractMailProvider getProvider()