List of all categories
![]()
Hi,
I have a simple question: how to get a list of all the categories using the JAVA PLAIN API?
I will be very grateful for help
|
One answer
![]()
Ralph Schoon (62.3k●3●36●43)
| answered Jan 10 '13, 2:49 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi Robert,
the code to get the categories of a given project are looks as below: /** * Print the Categories for a given Project Area * * @param teamRepository * @param projectArea * @param monitor * @throws TeamRepositoryException */ private static void printProjectAreaCategories(ITeamRepository teamRepository, IProjectArea projectArea, IProgressMonitor monitor) throws TeamRepositoryException { IWorkItemClient workItemClient = (IWorkItemClient) teamRepository.getClientLibrary(IWorkItemClient.class); List If you have an arbitrary process area (project area/team area) this gives you the associated categories, as far as I can tell. /** * Print the Categories for a given Process Area * * @param teamRepository * @param processArea * @param monitor * @throws TeamRepositoryException */ private static void printProcessAreaCategories(ITeamRepository teamRepository, IProcessArea processArea, IProgressMonitor monitor) throws TeamRepositoryException { IWorkItemClient workItemClient = (IWorkItemClient) teamRepository.getClientLibrary(IWorkItemClient.class); List |