com.atlassian.confluence.mail.archive
Class AbstractMailAccount

java.lang.Object
  extended by com.atlassian.confluence.mail.archive.AbstractMailAccount
All Implemented Interfaces:
MailAccount, Serializable
Direct Known Subclasses:
ImapMailAccount, PopMailAccount

public abstract class AbstractMailAccount
extends Object
implements MailAccount, Serializable

See Also:
Serialized Form

Field Summary
protected  String description
           
protected  boolean enabled
           
protected  String hostname
           
protected  int id
           
protected  String name
           
protected  String password
           
protected  int port
           
protected  boolean secure
           
protected  boolean status
           
protected  String username
           
 
Fields inherited from interface com.atlassian.confluence.mail.archive.MailAccount
DEFAULT_FOLDER, IMAP_PROTOCOL, POP_PROTOCOL, SECURE_IMAP_PROTOCOL, SECURE_POP_PROTOCOL
 
Constructor Summary
protected AbstractMailAccount()
           
protected AbstractMailAccount(int id, String name, String description, String hostname, String username, String password, int port, boolean secure)
           
 
Method Summary
 void disable()
          Prevent this account from retrieving mail in the future
 void enable()
          Set this account to be retrieving mail.
 String getDescription()
           
 String getHostname()
           
 int getId()
           
 String getName()
           
 String getPassword()
           
 int getPort()
           
 boolean getStatus()
          Returns the status of this mail account the last time an attempt was made to connect to it.
 String getUsername()
           
 boolean isDisabled()
          Should this account be used to retrieve mail?
 boolean isEnabled()
          Should this account be used to retrieve mail?
 boolean isSecure()
           
 String lockName()
          A lock identifier for ensuring Confluence only connects once to a given user/host/port combination.
 void setDescription(String description)
           
 void setEnabled(boolean b)
           
 void setHostname(String hostname)
           
 void setId(int id)
           
 void setName(String name)
           
 void setPassword(String password)
           
 void setPort(int port)
           
 void setSecure(boolean secure)
           
 void setStatus(boolean status)
           
 void setUsername(String username)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.atlassian.confluence.mail.archive.MailAccount
getFolderName, getProtocol
 

Field Detail

id

protected int id

name

protected String name

description

protected String description

hostname

protected String hostname

username

protected String username

password

protected String password

port

protected int port

secure

protected boolean secure

status

protected boolean status

enabled

protected boolean enabled
Constructor Detail

AbstractMailAccount

protected AbstractMailAccount()

AbstractMailAccount

protected AbstractMailAccount(int id,
                              String name,
                              String description,
                              String hostname,
                              String username,
                              String password,
                              int port,
                              boolean secure)
Method Detail

getId

public int getId()
Specified by:
getId in interface MailAccount

setId

public void setId(int id)
Specified by:
setId in interface MailAccount

getName

public String getName()
Specified by:
getName in interface MailAccount

setName

public void setName(String name)
Specified by:
setName in interface MailAccount

getDescription

public String getDescription()
Specified by:
getDescription in interface MailAccount

setDescription

public void setDescription(String description)
Specified by:
setDescription in interface MailAccount

getHostname

public String getHostname()
Specified by:
getHostname in interface MailAccount

setHostname

public void setHostname(String hostname)
Specified by:
setHostname in interface MailAccount

getUsername

public String getUsername()
Specified by:
getUsername in interface MailAccount

setUsername

public void setUsername(String username)
Specified by:
setUsername in interface MailAccount

getPassword

public String getPassword()
Specified by:
getPassword in interface MailAccount

setPassword

public void setPassword(String password)
Specified by:
setPassword in interface MailAccount

getPort

public int getPort()
Specified by:
getPort in interface MailAccount

setPort

public void setPort(int port)
Specified by:
setPort in interface MailAccount

isSecure

public boolean isSecure()
Specified by:
isSecure in interface MailAccount

setSecure

public void setSecure(boolean secure)
Specified by:
setSecure in interface MailAccount

getStatus

public boolean getStatus()
Description copied from interface: MailAccount
Returns the status of this mail account the last time an attempt was made to connect to it. To update this call MailAccountManager.updateStatus() on this mail account.

Specified by:
getStatus in interface MailAccount
Returns:
true if the last attempt to poll or check was successful, false otherwise

setStatus

public void setStatus(boolean status)
Specified by:
setStatus in interface MailAccount

enable

public void enable()
Description copied from interface: MailAccount
Set this account to be retrieving mail.

Specified by:
enable in interface MailAccount

disable

public void disable()
Description copied from interface: MailAccount
Prevent this account from retrieving mail in the future

Specified by:
disable in interface MailAccount

isEnabled

public boolean isEnabled()
Description copied from interface: MailAccount
Should this account be used to retrieve mail?

Specified by:
isEnabled in interface MailAccount
Returns:
true if the account is active and allowed to retrieve mail, false otherwise

setEnabled

public void setEnabled(boolean b)
Specified by:
setEnabled in interface MailAccount

isDisabled

public boolean isDisabled()
Description copied from interface: MailAccount
Should this account be used to retrieve mail?

Specified by:
isDisabled in interface MailAccount
Returns:
false if the account is active and allowed to retrieve mail, true otherwise

toString

public String toString()
Overrides:
toString in class Object

lockName

public String lockName()
A lock identifier for ensuring Confluence only connects once to a given user/host/port combination.

Specified by:
lockName in interface MailAccount


Copyright © 2003–2015 Atlassian. All rights reserved.