|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cert.cc.jira.email.handler.JIRAMediatorImpl
public class JIRAMediatorImpl
JIRAMediatorImpl is the go between for most JIRA operations.
© 2009 Carnegie Mellon University
| Field Summary | |
|---|---|
protected static String |
PARAMETER_ADD_CC_WATCHERS
add CC users configuration key |
protected static String |
PARAMETER_DEFAULT_ASSIGNEE
default assignee key |
protected static String |
PARAMETER_DEFAULT_PRIORITY
priority configuration key |
protected static String |
PARAMETER_ISSUE_TYPE
issue type configuration key |
protected static String |
PARAMETER_PROJECT
project configuration key |
protected static String |
PARAMETER_REPORTER_IS_ASSIGNEE
reporter always as assignee configuration key |
protected static String |
PARAMETER_REPORTER_OVERRIDE
reporter override |
protected static String |
PARAMETER_REPORTER_USER
report user key |
protected static String |
PARAMETER_SCAN_RECIPIENTS_FOR_ASSIGNEE
scan recipinet list for assigniee configuration key |
protected static String |
PARAMETER_SUPPRESS_CREATED
suppress the created by configuration key |
| Constructor Summary | |
|---|---|
JIRAMediatorImpl(Map<String,String> parameters)
Constructs a new JIRAMediatorImpl |
|
| Method Summary | |
|---|---|
IssueType |
calculateIssueType(Message message)
Calculates and returns the JIRA IssueType |
Priority |
calculatePriority(Message message)
Calculates and returns the JIRA issue Priority |
User |
determineAssignee(Message message,
Project project,
User reporter)
Calculates and returns the issue assignee. |
Priority |
getDefaultSystemPriority()
Returns the default system Priority |
String |
getDescription(Message message)
Returns the description |
IssueType |
getIssueType(String issueTypeId)
Returns the IssueType based on its ID |
String |
getParameterValue(Message message,
String key,
String xHeaderName)
Returns a parameter value or an X-Header value. |
String |
getParameterValue(String key)
Returns a parameter value based on the key |
List<Priority> |
getPossiblePriorties()
Returns all of the possible Priority values |
Priority |
getPriority(int id)
Returns the Priority based on its id value |
Comparator<Priority> |
getPriorityComparator()
Returns a Comparator for Prioritys |
Project |
getProject(String projectKey)
Returns the Project based on the key. |
GenericValue |
getProjectByName(String projectName)
Returns the Project based on the key. |
User |
getUser(String identifier)
Returns the JIRA User based on:
If the identifier has an @, check to see the email address corresponds to a user.
If the identifier does not have a @, check for username only. |
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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String PARAMETER_PROJECT
protected static final String PARAMETER_DEFAULT_PRIORITY
protected static final String PARAMETER_ADD_CC_WATCHERS
protected static final String PARAMETER_ISSUE_TYPE
protected static final String PARAMETER_REPORTER_OVERRIDE
protected static final String PARAMETER_REPORTER_IS_ASSIGNEE
protected static final String PARAMETER_DEFAULT_ASSIGNEE
protected static final String PARAMETER_REPORTER_USER
protected static final String PARAMETER_SCAN_RECIPIENTS_FOR_ASSIGNEE
protected static final String PARAMETER_SUPPRESS_CREATED
| Constructor Detail |
|---|
public JIRAMediatorImpl(Map<String,String> parameters)
parameters - Handler parameters| Method Detail |
|---|
public final User determineAssignee(Message message,
Project project,
User reporter)
throws MessagingException
determineAssignee in interface JIRAMediatormessage - Email Messageproject - JIRA Projectreporter - Who is reporting this issue
MessagingException - If unable to interrogate the Message
public final IssueType calculateIssueType(Message message)
throws MessagingException
IssueType
calculateIssueType in interface JIRAMediatormessage - Email Message
IssueType
MessagingException - If unable to interrogate the Message
public final Priority calculatePriority(Message message)
throws MessagingException
Priority
calculatePriority in interface JIRAMediatormessage - Email Message
Priority
MessagingException - If unable to interrogate the Messagepublic Priority getPriority(int id)
Priority based on its id value
getPriority in interface JIRAMediatorid - Integer value for the Priority
Prioritypublic IssueType getIssueType(String issueTypeId)
IssueType based on its ID
getIssueType in interface JIRAMediatorissueTypeId - IssueType ID
IssueTypepublic List<Priority> getPossiblePriorties()
Priority values
getPossiblePriorties in interface JIRAMediatorpublic Project getProject(String projectKey)
Project based on the key. If no Project is found, null
will be returned.
getProject in interface JIRAMediatorprojectKey - Project key
Project
public GenericValue getProjectByName(String projectName)
throws DataAccessException
getProjectByName in interface JIRAMediatorprojectName - Project name
DataAccessException - If unable to find the projectpublic Priority getDefaultSystemPriority()
Priority
getDefaultSystemPriority in interface JIRAMediator
public final User getUser(String identifier)
throws EntityNotFoundException
User based on:
identifier has an @, check to see the email address corresponds to a user.identifier does not have a @, check for username only. identifier has an @ and the email address is invalid, check the username part only of the email address.
getUser in interface JIRAMediatoridentifier - Identifier (username or email address)
User
EntityNotFoundException - If no matching User is found
public User getUserByEmail(String address)
throws EntityNotFoundException
User based on their email address
getUserByEmail in interface JIRAMediatoraddress - Email address
User
EntityNotFoundException - If no User matches the email address
public User getUserByUsername(String username)
throws EntityNotFoundException
User based on their username
getUserByUsername in interface JIRAMediatorusername - JIRA username
User
EntityNotFoundException - If no User matches the usernamepublic boolean isValidUser(String emailAddress)
emailAddress is a valid JIRA user
isValidUser in interface JIRAMediatoremailAddress - Email address
emailAddress is a valid JIRA user
public String getDescription(Message message)
throws MessagingException
getDescription in interface JIRAMediatormessage - Email Message
MessagingException - If unable to interrogate the Messagepublic final String getParameterValue(String key)
key
getParameterValue in interface JIRAMediator
public final String getParameterValue(Message message,
String key,
String xHeaderName)
throws MessagingException
getParameterValue in interface JIRAMediatormessage - Email Messagekey - Parameter keyxHeaderName - X-Header name
MessagingException - If unable to interrogate the Messagepublic Comparator<Priority> getPriorityComparator()
Comparator for Prioritys
getPriorityComparator in interface JIRAMediator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||