jetbrains.buildServer.issueTracker
Interface SIssueProvider

All Superinterfaces:
IssueBatchProviderSupport, IssueProvider
All Known Implementing Classes:
AbstractIssueProvider, AbstractPrefixBasedIssueProvider

public interface SIssueProvider
extends IssueProvider, IssueBatchProviderSupport

Since:
5.0
Author:
Maxim Podkolzine (maxim.podkolzine@jetbrains.com)

Field Summary
 
Fields inherited from interface jetbrains.buildServer.issueTracker.IssueProvider
SECURE_PROPERTY_PREFIX
 
Method Summary
 IssueData findPossiblyExpiredIssue(java.lang.String id)
          Returns the issue data corresponding to the id.
 java.lang.String getConfigurationSummary()
          Returns the basic summary of current configuration, for instance, "Jira" provider might return: "Projects: P1, P2".
 PropertiesProcessor getPropertiesProcessor()
          Returns the properties processor instance (validator).
 IssueTestConnectionSupport getTestConnectionSupport()
          Returns the test connection support.
 boolean isFailedToFetch(java.lang.String id)
          Returns whether the issue could not be fetched due to error.
 boolean isFetched(java.lang.String id)
          Returns whether the issue is fetched and can be efficiently returned using IssueProvider.findIssueById(String) method.
 
Methods inherited from interface jetbrains.buildServer.issueTracker.IssueProvider
dispose, findIssueById, getCommentTransformationHelper, getProperties, getRelatedIssues, getRelatedIssues, getType, isHasRelatedIssues, isHasRelatedIssues, setProperties
 
Methods inherited from interface jetbrains.buildServer.issueTracker.IssueBatchProviderSupport
findIssuesByIds, isBatchFetchSupported
 

Method Detail

isFetched

boolean isFetched(@NotNull
                  java.lang.String id)
Returns whether the issue is fetched and can be efficiently returned using IssueProvider.findIssueById(String) method.

Parameters:
id - the issue id
Returns:
true if the issue is fetched
See Also:
isFailedToFetch(String)

findPossiblyExpiredIssue

@Nullable
IssueData findPossiblyExpiredIssue(@NotNull
                                            java.lang.String id)
Returns the issue data corresponding to the id.

The main difference from IssueProvider.findIssueById(String) method is that method must be always fast (should use only cached data) and the result data isn't expected to be up-to-date. So this method should return the issue data if by chance it can be retrieved fast, even if a provider consideres it out-dated and IssueProvider.findIssueById(String) method would make an extra call to the issue-tracking system.

The simpliest (100% legal) implementation of this method:

    public IssueData findPossiblyExpiredIssue(@NotNull String id) {
      return null;
    }
 
This way TeamCity will always show 'Retrieving...' message, when the issue isn't fetched (see isFetched(String)).

Parameters:
id - the issue id
Returns:
issue data, or null if the it cannot be returned efficiently

isFailedToFetch

boolean isFailedToFetch(@NotNull
                        java.lang.String id)
Returns whether the issue could not be fetched due to error.

In case of true, the issue data isn't in a cache (i.e. isFetched(id) == false), but the error is.

Parameters:
id - the issue id
Returns:
true if issue could not be fetched
Since:
7.1
See Also:
isFetched(String)

getPropertiesProcessor

@NotNull
PropertiesProcessor getPropertiesProcessor()
Returns the properties processor instance (validator).

It is guaranteed that IssueProvider.setProperties(java.util.Map) method is called only if the processor finds no errors.

Returns:
properties processor

getTestConnectionSupport

@NotNull
IssueTestConnectionSupport getTestConnectionSupport()
Returns the test connection support.

Returns:
test connection support

getConfigurationSummary

@Nullable
java.lang.String getConfigurationSummary()
Returns the basic summary of current configuration, for instance, "Jira" provider might return: "Projects: P1, P2".

Returns:
provider configuration summary, or null