|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IssueProvider
Represents the provider of issues from the issues-tracking system (ITS). This interface is intended to be implemented by TeamCity plugins (Jira, Charisma, Bugzilla, etc).
In general the plugin implementing this interface is responsible to:
Issue provider can have any properties, but some of them can be recognized by server and treated specially:
Issue provider should be thread-safe (see setProperties(java.util.Map) method).
IssueProviderFactory| Field Summary | |
|---|---|
static java.lang.String |
SECURE_PROPERTY_PREFIX
This prefix means that the property is secure, and should be scrambled upon save. |
| Method Summary | |
|---|---|
void |
dispose()
Disposes the provider (releases all necessary resources, dumps caches on disk, etc). |
IssueData |
findIssueById(java.lang.String id)
Returns the issue by the specified id. |
CommentTransformationHelper |
getCommentTransformationHelper()
Returns the instance of helper class to support comment transformation (i.e. |
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
Returns the map of provider properties. |
java.util.Collection<IssueMention> |
getRelatedIssues(java.lang.String comment)
Returns the collection of issues related, or mentioned in the comment. |
java.util.Collection<IssueMention> |
getRelatedIssues(VcsModification modification)
Returns the collection of issues related to a modification. |
java.lang.String |
getType()
Returns the type of this provider (the type of the corresponding factory). |
boolean |
isHasRelatedIssues(java.lang.String comment)
Returns whether there are related issues in the specified comment. |
boolean |
isHasRelatedIssues(VcsModification modification)
Returns whether there are related issues in the specified modification. |
void |
setProperties(java.util.Map<java.lang.String,java.lang.String> map)
Sets the provider properties (see getProperties() method for the details). |
| Field Detail |
|---|
@NonNls static final java.lang.String SECURE_PROPERTY_PREFIX
| Method Detail |
|---|
@NotNull java.lang.String getType()
@NotNull
java.util.Collection<IssueMention> getRelatedIssues(@NotNull
java.lang.String comment)
comment
contains the substring that matches a certain pattern), or by any way the plugin chooses.
comment - the comment
isHasRelatedIssues(String)
boolean isHasRelatedIssues(@NotNull
java.lang.String comment)
comment.
The relation can be defined by a mention in the text (a mention means that comment
contains the substring that matches a certain pattern), or by any way the plugin chooses.
comment - the comment
getRelatedIssues(String)
@NotNull
java.util.Collection<IssueMention> getRelatedIssues(@NotNull
VcsModification modification)
modification - VCS modification
isHasRelatedIssues(jetbrains.buildServer.vcs.VcsModification)
boolean isHasRelatedIssues(@NotNull
VcsModification modification)
modification.
In most cases the relation is defined via mentioning the issue id in the modification comment,
but could also be some extra field in VCS commit.
provider - issue providermodification - a VCS modification
getRelatedIssues(jetbrains.buildServer.vcs.VcsModification)
@Nullable
IssueData findIssueById(@NotNull
java.lang.String id)
The implementors are encouraged to report retrieving errors by throwing
RetrieveIssueException, rather than
simply return null:
NotFoundException when the issue cannot
be found, UnsupportedException when
the issue tracker protocol is not supported, etc.
id - issue id
null if the issue cannot be retrieved@NotNull java.util.Map<java.lang.String,java.lang.String> getProperties()
The keys should consist of alphanumeric characters and start with a letter.
void setProperties(@NotNull
java.util.Map<java.lang.String,java.lang.String> map)
getProperties() method for the details).
Few words about thread-safety: properties can be changed from the admin UI, or in config file. By any of these events this method is called (synchronously). Hence this method should lock any other API method.
map - a properties mapgetProperties()void dispose()
@Nullable CommentTransformationHelper getCommentTransformationHelper()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||