public interface RepositoryService
| Modifier and Type | Method and Description |
|---|---|
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.
|
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. |
boolean |
init(AphroditeConfig config)
Initiate this
RepositoryService using the supplied AphroditeConfig. |
boolean |
init(RepositoryConfig config)
Initiate this
RepositoryService using the supplied RepositoryConfig. |
boolean init(AphroditeConfig config)
RepositoryService using the supplied AphroditeConfig.
The first RepositoryConfig object found in AphroditeConfig object,
is used to initiate the service and is subsequently removed from the config to prevent the same
service being initiated twice.config - a AphroditeConfig object containing at least one
RepositoryConfig object.true if the service was initialised without errors, false otherwise.IllegalArgumentException - if no RepositoryConfig objects are present.boolean init(RepositoryConfig config)
RepositoryService using the supplied RepositoryConfig.config - a RepositoryConfig object containing all configuration information.true if the service was initialised without errors, false otherwise.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.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.List<Patch> getPatchesAssociatedWith(Issue issue) throws NotFoundException
Issue objectissue - the Issue object whose associated Patches should be returned.Patch objects, or an empty list if no patches can be found.NotFoundException - if the provided Repository cannot be found at the RepositoryService.List<Patch> getPatchesByStatus(Repository repository, PatchStatus status) throws NotFoundException
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.NotFoundException - if the provided Repository cannot be found at the RepositoryService.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.void addLabelToPatch(Patch patch, String labelName) throws NotFoundException
NotFoundException will be thrown. If the specified label is already
associated with the provided patch then no further action is taken.patch - the Patch to which the label will be applied.labelName - the name of the label to be applied.NotFoundException - if the specified labelName has not been defined at the remote repository.Copyright © 2016 JBoss by Red Hat. All rights reserved.