Package com.polarion.alm.tracker
Interface ITrackerService
public interface ITrackerService
The main entry point for tracker-related functionalities. The functionality
is devided by domains into the individual managers.
- Author:
- dobisekm
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Loaded externally linked work item. -
Method Summary
Modifier and TypeMethodDescriptioncreateWorkItem
(IProject project) Creates a new (unpersisted) work item in given project.findWorkItem
(String projectId, String id) Finds work item, differs fromgetWorkItem(String, String)
in smarter handling of the id parameter.getApproverUsers
(IContextId contextId) Returns users with global role "approver", or context role "project_approver" (if context ID is provided).getAssignableUsers
(IContextId contextId) Returns users with global role "assignable", or context role "project_assignable" (if context ID is provided).Returns the base data service instance used by this tracker service.Returns the export manager.Wraps normalURI
into URI of external work item.Returns instance ofIFolderManager
.Returns instance ofILanguageDefinitionsProvider
with global language definitions.Returns the import manager.getLinkedWIsDirectFromLogMessage
(String commitMessage) Searches the items, which are mentioned in the commit message.getLinkedWIsDirectQueryFromMessage
(String commitMessage) Returns a query which finds all which are mentioned in the commit message.Returns the planning manager.Returns the project service used by this tracker service.Returns the manager forIRichPage
Returns the saved queries manager.WARNING: Not yet part of the API.Returns the timepoint manager.Returns the tracker policy.getTrackerProject
(IProject project) Returns a tracker project.getTrackerProject
(String projectId) Returns a tracker project for the specified project id.getTrackerRevision
(IRevision revision) Returns a tracker revision.getTrackerUser
(IUser user) Returns a tracker user.getTrackerUser
(String userId) Returns a tracker user for the specified user id.Returns the voting manager.com.polarion.alm.tracker.roundtrip.IWordRoundTripService
INTERNAL This method is not part of Polarion API.Returns the workflow manager.getWorkItem
(SubterraURI uri) Returns the workitem with the specified uri.getWorkItem
(String projectId, String workItemId) This is a shortcut method forgetTrackerProject(projectId).getWorkItem(workItemId)
, seeITrackerProject.getWorkItem(String)
.Returns the link roles manager.getWorkItemWithRevision
(String projectId, String workItemId, String revision) boolean
isAutoSuspectOn
(IWorkItem workitem) Checks if autosuspect is enabled for a given work item.boolean
isAutoSuspectOn
(IContextId contextId) Checks if autosuspect is enabled for a given contextId.boolean
isExternalLinkingEnabled
(IContextId context) Is external work item linking enabled for given context?boolean
isOslcLinkingEnabled
(IContextId context) Deprecated.loadExternallyLinkedWorkItems
(List<IExternalWorkItemURI> externallyLinkedWorkItems, String[] fields, boolean loadEnumerations, Map<String, IUserCredentials> hostCredentials) Loads external work items.queryWorkItems
(IProject project, String query, String sort) Returns the workitems of the specified project matching the specified query.queryWorkItems
(String query, String sort) Returns the workitems matching the specified query.queryWorkItemsInBaseline
(String query, String sort, String baselineRevision) Returns the Work Items matching the specified query.
-
Method Details
-
getDataService
IDataService getDataService()Returns the base data service instance used by this tracker service.- Returns:
- the base
IDataService
object representing the data service used by this tracker service
-
getProjectsService
IProjectService getProjectsService()Returns the project service used by this tracker service.- Returns:
- the
IProjectService
object representing the project service used by this tracker service
-
getModuleManager
IModuleManager getModuleManager()- Since:
- 3.2
-
getRichPageManager
Returns the manager forIRichPage
- Since:
- 3.9.0
-
getExportManager
IExportManager getExportManager()Returns the export manager.- Returns:
- the
IExportManager
object representing the export manager
-
getImportManager
IImportManager getImportManager()Returns the import manager.- Returns:
- the
IImportManager
object representing the import manager
-
getPlanningManager
IPlanningManager getPlanningManager()Returns the planning manager.- Returns:
- the
IPlanningManager
object representing the planning manager
-
getVotingManager
IVotingManager getVotingManager()Returns the voting manager.- Returns:
- the
IVotingManager
object representing the voting manager
-
getWorkflowManager
IWorkflowManager getWorkflowManager()Returns the workflow manager.- Returns:
- the
IWorkflowManager
object representing the workflow manager
-
getTrackerUser
Returns a tracker user.- Parameters:
user
- theIUser
object representing the user to get the tracker user for- Returns:
- a
ITrackerUser
object representing the tracker user for the given user
-
getTrackerUser
Returns a tracker user for the specified user id. The tracker user object is unresolved, it is not guaranteed that such an user exists.- Parameters:
userId
- theString
representing the id of the user to get the tracker user for- Returns:
- a
ITrackerUser
object representing the tracker user for the specifieduserId
, nevernull
-
getTrackerProject
Returns a tracker project.- Parameters:
project
- theIProject
representing the project to get the tracker project for- Returns:
- a
ITrackerProject
object representing the tracker project for the specified project
-
getTrackerProject
Returns a tracker project for the specified project id. The tracker project object is unresolved, it is not guaranteed that such a project exists.- Parameters:
projectId
- theString
representing the id of the project to get the tracker project for- Returns:
- a
ITrackerProject
object representing the tracker project for the specifiedprojectId
, nevernull
-
getTrackerRevision
Returns a tracker revision.- Parameters:
revision
- theIRevision
representing the revision to get the tracker revision for- Returns:
- a
ITrackerRevision
object representing the tracker revision for the specified revision
-
createWorkItem
Creates a new (unpersisted) work item in given project. The work item will be persisted when itssave()
method is called.- Parameters:
project
- project theIProject
object to create the work item for- Returns:
- the unpersisted
IWorkItem
object
-
getWorkItem
This is a shortcut method forgetTrackerProject(projectId).getWorkItem(workItemId)
, seeITrackerProject.getWorkItem(String)
. -
findWorkItem
Finds work item, differs fromgetWorkItem(String, String)
in smarter handling of the id parameter.- Parameters:
projectId
- - is ignored when the id is in format projectId/idid
- - can be in format projectId/id - in this case the first parameter is ignored, can be null- Since:
- 3.5.3
-
getWorkItem
Returns the workitem with the specified uri. This is a shortcut method for(IWorkItem)getDataservice.getInstance(uri)
, seeIDataService.getInstance(SubterraURI)
.- Parameters:
uri
- theSubterraURI
object to get the workitem for- Returns:
- unresolved
IWorkItem
object
-
queryWorkItems
Returns the workitems matching the specified query. The list is sorted using the specified sort key.- Parameters:
query
- theString
object representing the query used for searching workitemssort
- the format is same as forIIndexSearch.sort(String)
- Returns:
- a
List
object containing theIWorkItem
s found for the query
-
queryWorkItems
Returns the workitems of the specified project matching the specified query. The list is sorted using the specified sort key.- Parameters:
project
- theIProject
object representing the project to query workitems forquery
- theString
object representing the query used for searching workitemssort
- the format is same as forIIndexSearch.sort(String)
- Returns:
- a
List
object containing theIWorkItem
s found for the query
-
queryWorkItemsInBaseline
Returns the Work Items matching the specified query. The list is sorted using the specified fields.- Parameters:
query
- query used for searching Work Items (can benull
)sort
- the format is same as forIIndexSearch.sort(String)
baselineRevision
- baseline revision (notnull
)- Returns:
IPObjectList
ofIWorkItem
s (nevernull
)- Since:
- 3.6.0
-
getLinkedWIsDirectQueryFromMessage
Returns a query which finds all which are mentioned in the commit message.- Parameters:
commitMessage
- aString
object representing the message which to create the query for- Returns:
- a
String
object representing the query, usable to search for items mentioned in the message
-
getLinkedWIsDirectFromLogMessage
Searches the items, which are mentioned in the commit message.- Parameters:
commitMessage
- theString
representing the commit message to search contained work items for- Returns:
- a
List
object containing theIWorkItem
s mentioned in thecommitMessage
-
getSavedQueriesManager
ISavedQueriesManager getSavedQueriesManager()Returns the saved queries manager.- Returns:
- the
ISavedQueriesManager
object representing the saved queries manager
-
getTimePointsManager
ITimePointsManager getTimePointsManager()Returns the timepoint manager.- Returns:
- the
ITimePointManager
object representing the timepoint manager
-
getWorkItemLinkRolesManager
IWorkItemLinkRolesManager getWorkItemLinkRolesManager()Returns the link roles manager.- Returns:
- the
IWorkItemLinkRolesManager
object representing the link roles manager
-
isAutoSuspectOn
Checks if autosuspect is enabled for a given work item.- Parameters:
workitem
- theIWorkItem
object to check for auto suspect- Returns:
true
if auto suspect is enabled for the given work item
-
isAutoSuspectOn
Checks if autosuspect is enabled for a given contextId.- Parameters:
contextId
- context- Returns:
true
if auto suspect is enabled for the given contextId- Since:
- 3.5
-
getTrackerPolicy
ITrackerPolicy getTrackerPolicy()Returns the tracker policy.- Returns:
- a
ITrackerPolicy
object representing the tracker policy
-
loadExternallyLinkedWorkItems
List<ITrackerService.IExternallyLinkedWorkItem> loadExternallyLinkedWorkItems(List<IExternalWorkItemURI> externallyLinkedWorkItems, String[] fields, boolean loadEnumerations, Map<String, IUserCredentials> hostCredentials) Loads external work items.- Parameters:
externallyLinkedWorkItems
- URIs of external work items (notnull
)fields
- fields to load intoITrackerService.IExternallyLinkedWorkItem.getWorkItem()
(seeTrackerWebService.getWorkItemByIdsWithFields(String, String, String[])
for more information)loadEnumerations
-true
ifITrackerService.IExternallyLinkedWorkItem.getType()
andITrackerService.IExternallyLinkedWorkItem.getStatus()
should be loadedhostCredentials
- map of user credentials for externally linked work items. Key of the map is host.- Returns:
- loaded work items (not
null
) - Since:
- 3.5.0
-
getExternalWorkItemURI
Wraps normalURI
into URI of external work item.- Parameters:
uri
- URI (notnull
)- Returns:
- external work item URI
- Throws:
IllegalArgumentException
- if given URI is not valid external work item URI- Since:
- 3.5.0
-
isExternalLinkingEnabled
Is external work item linking enabled for given context?- Parameters:
context
- context- Returns:
true
if external linking is enabled- Since:
- 3.5.0
-
getWordRoundTripService
com.polarion.alm.tracker.roundtrip.IWordRoundTripService getWordRoundTripService()INTERNAL This method is not part of Polarion API.- Since:
- 3.5.0
-
getGlobalLanguageDefinitionsProvider
ILanguageDefinitionsProvider getGlobalLanguageDefinitionsProvider()Returns instance ofILanguageDefinitionsProvider
with global language definitions.- Returns:
- provider instance (never
null
) - Since:
- 3.6.2
- See Also:
-
getWorkItemWithRevision
- Since:
- 3.7.2
-
getAssignableUsers
Returns users with global role "assignable", or context role "project_assignable" (if context ID is provided).- Returns:
- users sorted by name
- Since:
- 3.8.2
-
getApproverUsers
Returns users with global role "approver", or context role "project_approver" (if context ID is provided).- Returns:
- users sorted by name
- Since:
- 3.8.2
-
getFolderManager
Returns instance ofIFolderManager
.- Since:
- 3.8.3
-
isOslcLinkingEnabled
Deprecated.Returns alwaystrue
!Is OSLC resource linking enabled for given context?- Parameters:
context
- context to checknull
to check global configuration.- Returns:
- Returns always
true
! - Since:
- 3.10.1
-
getBaselineCollectionsManager
- Since:
- 3.20.1
-
getWatchListManager
- Since:
- 3.23.4
-
getScriptManager
WARNING: Not yet part of the API.- Since:
- 3.24.10
-
true
!