org.cert.cc.jira.email.handler.mock
Class MockJIRAMediatorImpl

java.lang.Object
  extended by org.cert.cc.jira.email.handler.JIRAMediatorImpl
      extended by org.cert.cc.jira.email.handler.mock.MockJIRAMediatorImpl
All Implemented Interfaces:
JIRAMediator

public class MockJIRAMediatorImpl
extends JIRAMediatorImpl

© 2009 Carnegie Mellon University

Author:
Steve Scholnick

Field Summary
 
Fields inherited from class org.cert.cc.jira.email.handler.JIRAMediatorImpl
PARAMETER_ADD_CC_WATCHERS, PARAMETER_DEFAULT_ASSIGNEE, PARAMETER_DEFAULT_PRIORITY, PARAMETER_ISSUE_TYPE, PARAMETER_PROJECT, PARAMETER_REPORTER_IS_ASSIGNEE, PARAMETER_REPORTER_OVERRIDE, PARAMETER_REPORTER_USER, PARAMETER_SCAN_RECIPIENTS_FOR_ASSIGNEE, PARAMETER_SUPPRESS_CREATED
 
Constructor Summary
MockJIRAMediatorImpl(Map<String,String> parameters)
           
 
Method Summary
 Priority getDefaultSystemPriority()
          Returns the default system Priority
 IssueType getIssueType(String issueTypeId)
          Returns the IssueType based on its ID
 List<Priority> getPossiblePriorties()
          Returns all of the possible Priority values
 Priority getPriority(int id)
          Returns the Priority based on its id value
 Project getProject(String projectKey)
          Returns the Project based on the key.
 User getUserByEmail(String address)
          Returns the JIRA User based on their email address
 User getUserByUsername(String username)
          Returns the JIRA User based on their username
 boolean isValidUser(String emailAddress)
          Returns if the emailAddress is a valid JIRA user
 
Methods inherited from class org.cert.cc.jira.email.handler.JIRAMediatorImpl
calculateIssueType, calculatePriority, determineAssignee, getDescription, getParameterValue, getParameterValue, getPriorityComparator, getProjectByName, getUser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockJIRAMediatorImpl

public MockJIRAMediatorImpl(Map<String,String> parameters)
Method Detail

getDefaultSystemPriority

public Priority getDefaultSystemPriority()
Description copied from class: JIRAMediatorImpl
Returns the default system Priority

Specified by:
getDefaultSystemPriority in interface JIRAMediator
Overrides:
getDefaultSystemPriority in class JIRAMediatorImpl

getIssueType

public IssueType getIssueType(String issueTypeId)
Description copied from class: JIRAMediatorImpl
Returns the IssueType based on its ID

Specified by:
getIssueType in interface JIRAMediator
Overrides:
getIssueType in class JIRAMediatorImpl
Parameters:
issueTypeId - IssueType ID
Returns:
IssueType

getPossiblePriorties

public List<Priority> getPossiblePriorties()
Description copied from class: JIRAMediatorImpl
Returns all of the possible Priority values

Specified by:
getPossiblePriorties in interface JIRAMediator
Overrides:
getPossiblePriorties in class JIRAMediatorImpl

getPriority

public Priority getPriority(int id)
Description copied from class: JIRAMediatorImpl
Returns the Priority based on its id value

Specified by:
getPriority in interface JIRAMediator
Overrides:
getPriority in class JIRAMediatorImpl
Parameters:
id - Integer value for the Priority
Returns:
Priority

getProject

public Project getProject(String projectKey)
Description copied from class: JIRAMediatorImpl
Returns the Project based on the key. If no Project is found, null will be returned.

Specified by:
getProject in interface JIRAMediator
Overrides:
getProject in class JIRAMediatorImpl
Parameters:
projectKey - Project key
Returns:
Project

getUserByEmail

public User getUserByEmail(String address)
                    throws EntityNotFoundException
Description copied from class: JIRAMediatorImpl
Returns the JIRA User based on their email address

Specified by:
getUserByEmail in interface JIRAMediator
Overrides:
getUserByEmail in class JIRAMediatorImpl
Parameters:
address - Email address
Returns:
JIRA User
Throws:
EntityNotFoundException - If no User matches the email address

getUserByUsername

public User getUserByUsername(String username)
                       throws EntityNotFoundException
Description copied from class: JIRAMediatorImpl
Returns the JIRA User based on their username

Specified by:
getUserByUsername in interface JIRAMediator
Overrides:
getUserByUsername in class JIRAMediatorImpl
Parameters:
username - JIRA username
Returns:
JIRA User
Throws:
EntityNotFoundException - If no User matches the username

isValidUser

public boolean isValidUser(String emailAddress)
Description copied from class: JIRAMediatorImpl
Returns if the emailAddress is a valid JIRA user

Specified by:
isValidUser in interface JIRAMediator
Overrides:
isValidUser in class JIRAMediatorImpl
Parameters:
emailAddress - Email address
Returns:
If the emailAddress is a valid JIRA user


Copyright © 2012 Carnegie Mellon University