It's all about the answers!

Ask a question

How to initialize a queryService?


Yue CDL (1611) | asked May 03 '11, 11:46 a.m.
I wanted to use the Repository Query API. The first thing I need to do is to get the queryService.

Searched in this forum and got some clues,

IQueryService queryService = getService(IQueryService.class); 


But it seems unacceptable by my compiler, getService method is not recognized.

Anyone to help me out? Thanks very much!

One answer



permanent link
Curtis d'Entremont (1.3k3) | answered May 30 '11, 12:00 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
The getService method is on com.ibm.team.repository.service.AbstractService, which is a base class for repository-based services. In order to use it, you must implement your own such service, then declare a dependency (prerequisites element in plugin.xml extension) on the repository query service.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.