|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.cert.cc.jira.JIRAProxy
public final class JIRAProxy
JIRAProxy is the go between for some common JIRA operations.
© 2010 Carnegie Mellon University
Method Summary | |
---|---|
static GenericValue |
createIssue(MutableIssue issueData,
User authenticatedUser)
Creates a new JIRA issue |
static CustomField |
getCustomField(String identifier)
Returns the CustomField based on identifier . |
static Priority |
getDefaultSystemPriority()
Returns the default system Priority |
static IssueLinkType |
getIssueLinkType(String identifier)
Returns the IssueLinkType based on identifier . |
static IssueType |
getIssueType(String identifier)
Returns the IssueType based on identifier . |
static List<Priority> |
getPossiblePriorties()
Returns all of the possible Priority values |
static Priority |
getPriority(int id)
Returns the Priority based on its id value |
static Priority |
getPriority(String identifier)
Returns the Priority based on identifier . |
static Project |
getProject(String key)
Returns the Project based on the key. |
static GenericValue |
getProjectByName(String projectName)
Returns the Project based on the key. |
static 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. |
static User |
getUserByEmail(String address)
Returns the JIRA User based on their email address |
static User |
getUserByUsername(String username)
Returns the JIRA User based on their username |
static void |
indexIssue(GenericValue issue)
Indexes an issue . |
static void |
indexIssue(Issue issue)
Indexes an issue . |
static 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 |
Method Detail |
---|
public static GenericValue createIssue(MutableIssue issueData, User authenticatedUser) throws CreateException
issueData
- Issue to be createdauthenticatedUser
- Authorized UserException
creating the issue
GenericValue
CreateException
- If unable to create the issuepublic static void indexIssue(Issue issue)
issue
.
issue
- to be indexedpublic static void indexIssue(GenericValue issue)
issue
.
issue
- to be indexedpublic static IssueLinkType getIssueLinkType(String identifier)
IssueLinkType
based on identifier
. If identifier
is
a number IssueLinkType
is looked up by its id; otherwise; identifier
is matched to IssueLinkType#getName()
.
identifier
- IssueLinkType
identifier
IssueLinkType
public static Priority getDefaultSystemPriority()
Priority
public static IssueType getIssueType(String identifier)
IssueType
based on identifier
. If identifier
is
a number IssueType
is looked up by its id; otherwise; identifier
is matched to IssueType#getName()
.
identifier
- IssueType
identifier
IssueType
public static List<Priority> getPossiblePriorties()
Priority
values
public static Priority getPriority(String identifier)
Priority
based on identifier
. If identifier
is
a number Priority
is looked up by its id; otherwise; identifier
is matched to Priority#getName()
.
identifier
- Priority
identifier
Priority
public static Priority getPriority(int id)
Priority
based on its id value
id
- Integer value for the Priority
Priority
public static Project getProject(String key)
Project
based on the key. If no Project
is found, null
will be returned.
key
- Project
key
Project
public static GenericValue getProjectByName(String projectName) throws DataAccessException
projectName
- Project name
DataAccessException
- If unable to find the projectpublic static CustomField getCustomField(String identifier)
CustomField
based on identifier
. If identifier
is
a number CustomField
is looked up by its id; otherwise; identifier
is matched to CustomField#getName()
.
identifier
- CustomField
identifier
CustomField
public static 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.
identifier
- Identifier (username or email address)
User
EntityNotFoundException
- If no matching User
is foundpublic static User getUserByEmail(String address) throws EntityNotFoundException
User
based on their email address
address
- Email address
User
EntityNotFoundException
- If no User
matches the email addresspublic static User getUserByUsername(String username) throws EntityNotFoundException
User
based on their username
username
- JIRA username
User
EntityNotFoundException
- If no User
matches the usernamepublic static boolean isValidUser(String emailAddress)
emailAddress
is a valid JIRA user
emailAddress
- Email address
emailAddress
is a valid JIRA user
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |