com.appperfect.devcommon.script
Interface IEmailValidationHandler


public interface IEmailValidationHandler

IEmailValidationHandler is created to set the enail configuration and to fetch basic information from mailbox.


Method Summary
 int getMessageCount(java.lang.String uniqueId, java.lang.String mailbox)
 To get the messages count for specified mail box
 int getMessageCount(java.lang.String uniqueId, java.lang.String mailbox, java.lang.String subject)
 To get the messages count for specified mail box with specified subject line
 int getNewMessageCount(java.lang.String uniqueId, java.lang.String mailbox)
 To get the new messages count for specified mail box
 boolean hasNewMessages(java.lang.String uniqueId, java.lang.String mailbox)
 To check whether the specified mail box has new messages
 boolean isEmailConnectionValid(java.lang.String uniqueId)
 To check if email connection specified by uniqueId is valid
 boolean isMailBoxExists(java.lang.String uniqueId, java.lang.String mailbox)
 To check if specified mail box exists
 boolean setEmailConnection(java.lang.String uniqueId, java.lang.String protocol, java.lang.String host, java.lang.String userName, java.lang.String password)
 To register or configure a email connection with TestStudio.
 

Method Detail

getMessageCount

int getMessageCount(java.lang.String uniqueId,
                    java.lang.String mailbox)
To get the messages count for specified mail box

Parameters:
uniqueId - unique id referring to the email configuration
mailbox - name of the mail box
Returns:
number of messages in the mailbox

getMessageCount

int getMessageCount(java.lang.String uniqueId,
                    java.lang.String mailbox,
                    java.lang.String subject)
To get the messages count for specified mail box with specified subject line

Parameters:
uniqueId - unique id referring to the email configuration
mailbox - name of the mail box
subject - subject line to look for while searching messages in the mailbox
Returns:
number of messages in the mailbox with specified subject line

getNewMessageCount

int getNewMessageCount(java.lang.String uniqueId,
                       java.lang.String mailbox)
To get the new messages count for specified mail box

Parameters:
uniqueId - unique id referring to the email configuration
mailbox - name of the mail box
Returns:
number of new messages in the mailbox

hasNewMessages

boolean hasNewMessages(java.lang.String uniqueId,
                       java.lang.String mailbox)
To check whether the specified mail box has new messages

Parameters:
uniqueId - unique id referring to the email configuration
mailbox - name of the mail box
Returns:
true if has new messages, false otherwise

isEmailConnectionValid

boolean isEmailConnectionValid(java.lang.String uniqueId)
To check if email connection specified by uniqueId is valid

Parameters:
uniqueId - unique id referring to the email configuration to test
Returns:
true if connection is valid, false otherwise

isMailBoxExists

boolean isMailBoxExists(java.lang.String uniqueId,
                        java.lang.String mailbox)
To check if specified mail box exists

Parameters:
uniqueId - unique id referring to the email configuration
mailbox - name of the mail box to check for existence
Returns:
true if mail box exists, false otherwise

setEmailConnection

boolean setEmailConnection(java.lang.String uniqueId,
                           java.lang.String protocol,
                           java.lang.String host,
                           java.lang.String userName,
                           java.lang.String password)
To register or configure a email connection with TestStudio.

Parameters:
uniqueId - unique id which should be allocated for each email configuration. This id is used to refer to the concerned email connection for doing any email specific action.
protocol - protocol to be used for accessing email account, for eg. SMTP or POP
host - host where the mail server resides
userName - user name for accessing email account
password - password for accessing email account
Returns:
true if successfully configured, false otherwise


Copyright © 2003-2016 AppPerfect Corporation. All Rights Reserved.