public class Aphrodite extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
FILE_PROPERTY |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addCommentToIssue(Collection<Issue> issues,
Comment comment)
Adds the
Comment to all of the provided Issue objects. |
boolean |
addCommentToIssue(Issue issue,
Comment comment)
Adds a new comment to the specified issue.
|
boolean |
addCommentToIssue(Map<Issue,Comment> commentMap)
Adds the
Comment to the associated Issue object for all Issue/Comment
pairs in the Map. |
void |
addCommentToPatch(Patch patch,
String comment)
Add a
Comment to the specified Patch object, and propagate the changes
to the remote repository. |
void |
addLabelToPatch(Patch patch,
String labelName)
Attach a label to the specified patch.
|
Issue |
getIssue(URL url)
Retrieve an issue object associated with the given
URL. |
List<Issue> |
getIssues(Collection<URL> urls)
Retrieve all issues associated with the provided URLs.
|
List<Issue> |
getIssuesAssociatedWith(Patch patch)
Retrieve all Issues associated with the provided patch object.
|
Patch |
getPatch(URL url)
Get the
Patch located at the provided URL. |
List<Patch> |
getPatchesAssociatedWith(Issue issue)
Retrieve all Patches associated with the provided
Issue object |
List<Patch> |
getPatchesByStatus(Repository repository,
PatchStatus status)
Retrieve all Patches associated with the provided
Repository object, which have a
status that matches the provided PatchStatus object. |
Repository |
getRepository(URL url)
Get the repository located at the provided
URL. |
static Aphrodite |
instance()
Get an instance of the Aphrodite service.
|
static Aphrodite |
instance(AphroditeConfig config)
Get an instance of the Aphrodite service.
|
List<Issue> |
searchIssues(SearchCriteria searchCriteria)
Return all issues, across all Issue Trackers, which match the passed
SearchCriteria. |
List<Issue> |
searchIssuesByFilter(URL filterUrl)
Return all issues which match the provided filter.
|
boolean |
updateIssue(Issue issue)
Update a specific
Issue at the remote issue tracker service. |
public static final String FILE_PROPERTY
public static Aphrodite instance() throws AphroditeException
AphroditeException - if the specified configuration file cannot be opened.public static Aphrodite instance(AphroditeConfig config) throws AphroditeException
IllegalStateException is thrown if a different AphroditeConfig object is passed.config - an AphroditeConfig object containing all configuration data.AphroditeExceptionIllegalStateException - if an Aphrodite service has already been initialised.public Issue getIssue(URL url) throws NotFoundException
URL.url - the URL of the issue to be retrieved.Issue associated with the provided URK.NotFoundException - if the provided URL is not associated with an issue at any of the active issue
trackers.public List<Issue> getIssues(Collection<URL> urls)
IssueTrackerServer. If the provided URLs
collection is empty, or no issues are found, then an empty List is returned.urls - a collection of issue URLs.Issue objects associated with the provided urls.public List<Issue> searchIssues(SearchCriteria searchCriteria)
SearchCriteria.searchCriteria - all set fields will be search for.Issue objects which match the specified searchCriteria,
or an empty list if no issues match the searched criteria.public List<Issue> searchIssuesByFilter(URL filterUrl) throws NotFoundException
filterUrl - the url of the issue tracker filtered to be applied.Issue objects which are returned by the provided filter.NotFoundException - if the filterURL is not associated with any filters at any of the Issue Trackers.public boolean updateIssue(Issue issue) throws NotFoundException, AphroditeException
Issue at the remote issue tracker service.
Note, this does not update issue comments or an issues description.
To add a new comment, use addCommentToIssue(Issue, Comment)issue - the issue to be updated at the associated IssueTrackerServiceNotFoundException - if the provided Issue cannot be found at the IssueTracker.AphroditeException - if the user credentials supplied for this issue track do not have
permission to update this issue, or a field within this issue.public boolean addCommentToIssue(Issue issue, Comment comment)
issue - the issue to add a new comment to.comment - the comment to be added to the issue.public boolean addCommentToIssue(Map<Issue,Comment> commentMap)
Comment to the associated Issue object for all Issue/Comment
pairs in the Map. Null comments are ignored.commentMap - the map containing all Issues that are to be updated and the associated comments.public boolean addCommentToIssue(Collection<Issue> issues, Comment comment)
Comment to all of the provided Issue objects.issues - a collection of all issues that the comment should be added to.comment - the comment to be added to all issues.public List<Issue> getIssuesAssociatedWith(Patch patch)
patch - the Patch object whoms associated Issues should be returned.Issue objects, or an empty list if no issues can be found.public Repository getRepository(URL url) throws NotFoundException
URL.url - the URL of the repository to be retrieved.Repository object.NotFoundException - if a Repository cannot be found at the provided base url.public List<Patch> getPatchesAssociatedWith(Issue issue)
Issue objectissue - the Issue object whose associated Patches should be returned.Patch objects, or an empty list if no patches can be found.public List<Patch> getPatchesByStatus(Repository repository, PatchStatus status)
Repository object, which have a
status that matches the provided PatchStatus object.repository - the Repository object whose associated Patches should be returned.status - the PatchStatus which the returned Patch objects must have.Patch objects, or an empty list if no patches can be found.public Patch getPatch(URL url) throws NotFoundException
Patch located at the provided URL.url - the URL of the patch to be retrieved.Patch object.NotFoundException - if a Patch cannot be found at the provided base url.public void addCommentToPatch(Patch patch, String comment) throws NotFoundException
Comment to the specified Patch object, and propagate the changes
to the remote repository.patch - the Patch on which the comment will be made.comment - the new Comment.NotFoundException - if the Patch cannot be found at the remote repository.public void addLabelToPatch(Patch patch, String labelName)
patch - the Patch to which the label will be applied.labelName - the name of the label to be applied.Copyright © 2016 JBoss by Red Hat. All rights reserved.