com.atlassian.jira.functest.framework.backdoor
Class MailServersControl

java.lang.Object
  extended by com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.RestApiClient<T>
      extended by com.atlassian.jira.functest.framework.backdoor.BackdoorControl<MailServersControl>
          extended by com.atlassian.jira.functest.framework.backdoor.MailServersControl
All Implemented Interfaces:
FuncTestLogger

public class MailServersControl
extends BackdoorControl<MailServersControl>

Use this class from func/selenium/page-object tests that need to manipulate Mail Servers. See MailServersBackdoor for the code this plugs into at the back-end.

Since:
v5.0

Nested Class Summary
 
Nested classes/interfaces inherited from class com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.RestApiClient
com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.RestApiClient.Method
 
Field Summary
static String DEFAULT_FROM_ADDRESS
           
static String DEFAULT_SUBJECT_PREFIX
           
 
Fields inherited from class com.atlassian.jira.functest.framework.backdoor.BackdoorControl
restPathRootLength
 
Fields inherited from class com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.RestApiClient
REST_VERSION
 
Constructor Summary
MailServersControl(com.atlassian.jira.webtests.util.JIRAEnvironmentData environmentData)
           
 
Method Summary
 void addImapServer(String name, int port)
          Adds an IMAP server with the specified parameters.
 void addPopServer(String name, int port)
          Adds a POP server with the specified parameters.
 void addPopServer(String name, String description, String protocol, String serverName, int port, String username, String password)
          Adds a POP/IMAP server with the specified parameters.
 void addSmtpServer(int port)
          Adds an SMTP server with default parameters and a specified port.
 void addSmtpServer(String from, String prefix, int port)
          Adds an SMTP server with the specified parameters.
 void addSmtpServer(String name, String description, String from, String prefix, String serverName, int port)
          Adds an SMTP server with the specified parameters.
 
Methods inherited from class com.atlassian.jira.functest.framework.backdoor.BackdoorControl
createResource, get, get, get, getId, log, log, post
 
Methods inherited from class com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.RestApiClient
anonymous, errorResponse, expanded, loginAs, loginAs, percentEncode, resourceRoot, setOf, toResponse, toResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FROM_ADDRESS

public static final String DEFAULT_FROM_ADDRESS
See Also:
Constant Field Values

DEFAULT_SUBJECT_PREFIX

public static final String DEFAULT_SUBJECT_PREFIX
See Also:
Constant Field Values
Constructor Detail

MailServersControl

public MailServersControl(com.atlassian.jira.webtests.util.JIRAEnvironmentData environmentData)
Method Detail

addSmtpServer

public void addSmtpServer(int port)
Adds an SMTP server with default parameters and a specified port. Deletes any existing SMTP servers first.

Parameters:
port - The SMTP port of your mail server.

addSmtpServer

public void addSmtpServer(String from,
                          String prefix,
                          int port)
Adds an SMTP server with the specified parameters. Deletes any existing SMTP servers first.

Parameters:
from - The default address this server will use to send emails from.
prefix - The prefix for all outgoing email subjects.
port - The SMTP port of your mail server.

addSmtpServer

public void addSmtpServer(String name,
                          String description,
                          String from,
                          String prefix,
                          String serverName,
                          int port)
Adds an SMTP server with the specified parameters. Deletes any existing SMTP servers first.

Parameters:
name - The name of this server within JIRA.
description - The description for this server.
from - The default address this server will use to send emails from.
prefix - The prefix for all outgoing email subjects.
serverName - The SMTP host name of your mail server.
port - The SMTP port of your mail server.

addPopServer

public void addPopServer(String name,
                         int port)
Adds a POP server with the specified parameters.

Parameters:
name - The name of this server within JIRA.
port - The POP port of your mail server.

addImapServer

public void addImapServer(String name,
                          int port)
Adds an IMAP server with the specified parameters.

Parameters:
name - The name of this server within JIRA.
port - The IMAP port of your mail server.

addPopServer

public void addPopServer(String name,
                         String description,
                         String protocol,
                         String serverName,
                         int port,
                         String username,
                         String password)
Adds a POP/IMAP server with the specified parameters.

Parameters:
name - The name of this server within JIRA.
description - The description for this server.
protocol - The server protocol (one of pop3, pop3s, imap, imaps).
serverName - The POP/IMAP host name of your mail server.
port - The POP/IMAP port of your mail server.
username - Username.
password - Password.


Copyright © 2002-2012 Atlassian. All Rights Reserved.