public abstract class AbstractIssueTracker extends Object implements IssueTrackerService
| Modifier and Type | Field and Description |
|---|---|
protected URL |
baseUrl |
protected IssueTrackerConfig |
config |
protected ExecutorService |
executorService |
protected TrackerType |
TRACKER_TYPE |
static Pattern |
URL_REGEX |
| Constructor and Description |
|---|
AbstractIssueTracker(TrackerType TRACKER_TYPE) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCommentToIssue(Issue issue,
Comment comment)
Adds a new comment to the specified issue.
|
protected void |
checkHost(URL url) |
static String |
convertToTrackerID(URL url) |
protected Collection<Issue> |
filterIssuesByHost(Collection<Issue> issues) |
protected Map<Issue,Comment> |
filterIssuesByHost(Map<Issue,Comment> commentMap) |
protected Collection<URL> |
filterUrlsByHost(Collection<URL> urls) |
List<Issue> |
getIssuesAssociatedWith(PullRequest pullRequest)
Retrieve all Issues associated with the provided pullRequest object.
|
protected abstract org.apache.commons.logging.Log |
getLog() |
String |
getTrackerID()
Return string format of tracker id, this value, can be used as key/index and compared to
AbstractIssueTracker#convertToTrackerID(). |
boolean |
init(AphroditeConfig aphroditeConfig)
Initiate this
IssueTrackerService using the supplied AphroditeConfig. |
boolean |
init(IssueTrackerConfig config)
Initiate this
IssueTrackerService using the supplied IssueTrackerConfig. |
boolean |
urlExists(URL url)
Checks whether the provided
URL is on the same host as this service. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddCommentToIssue, addCommentToIssue, destroy, getIssue, getIssues, searchIssues, searchIssuesByFilter, updateIssuepublic static final Pattern URL_REGEX
protected final TrackerType TRACKER_TYPE
protected ExecutorService executorService
protected IssueTrackerConfig config
protected URL baseUrl
public AbstractIssueTracker(TrackerType TRACKER_TYPE)
protected abstract org.apache.commons.logging.Log getLog()
public boolean init(AphroditeConfig aphroditeConfig)
IssueTrackerServiceIssueTrackerService using the supplied AphroditeConfig.
The first IssueTrackerConfig object found in the AphroditeConfig object,
is used to initiate the service and is subsequently removed from the config to prevent the same
service being initiated twice.init in interface IssueTrackerServiceaphroditeConfig - a AphroditeConfig object containing at least one
IssueTrackerConfig object.true if the service was initialised without errors, false otherwise.public boolean init(IssueTrackerConfig config)
IssueTrackerServiceIssueTrackerService using the supplied IssueTrackerConfig.init in interface IssueTrackerServiceconfig - a IssueTrackerConfig object containing all configuration information.true if the service was initialised without errors, false otherwise.public List<Issue> getIssuesAssociatedWith(PullRequest pullRequest)
IssueTrackerServicegetIssuesAssociatedWith in interface IssueTrackerServicepullRequest - the PullRequest object whoms associated Issues should be returned.Issue objects, or an empty list if no issues can be found.public void addCommentToIssue(Issue issue, Comment comment) throws NotFoundException
IssueTrackerServiceaddCommentToIssue in interface IssueTrackerServiceissue - the issue to add a new comment to.comment - the comment to be added to the issue.NotFoundException - if the provided Issue cannot be found at the IssueTracker.protected void checkHost(URL url) throws NotFoundException
NotFoundExceptionpublic boolean urlExists(URL url)
IssueTrackerServiceURL is on the same host as this service.urlExists in interface IssueTrackerServiceurl - the URL to check.URL has the same host as this service, otherwise false.public String getTrackerID()
IssueTrackerServiceAbstractIssueTracker#convertToTrackerID().getTrackerID in interface IssueTrackerServiceprotected Collection<Issue> filterIssuesByHost(Collection<Issue> issues)
protected Collection<URL> filterUrlsByHost(Collection<URL> urls)
Copyright © 2017 JBoss by Red Hat. All rights reserved.