Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Listing archived categories using java client api?

Hi,
There are apis to list down all the categories for a given project area. But those apis wont list the archived categories. Is there any way to list all the categories for a given project area including the archived ones.
Any input(s) is/are  appreciated.
Thank you in advance.
Ajay

1 vote



One answer

Permanent link
Hi Again,

Following method did it for me.

public void listAllCategories(String projectAreaName)
            throws TeamRepositoryException {
        //Project Area
       
        IProjectArea projectArea = getProjectArea(projectAreaName);
       
        //Auditable client
       
        IAuditableClient auditableClient = (IAuditableClient) repo
                .getClientLibrary(IAuditableClient.class);
       
        //List of all existing categories. This will include all the visible, access restricted and archived categories.
        //In other words, every other category which was created.
       
        List<ICategoryHandle> allCategoryHandles = CategoriesHelper
                .findExistingCategories(auditableClient, projectArea, monitor);
        for (ICategoryHandle iCategoryHandle : allCategoryHandles) {
            System.out.println(iCategoryHandle.getItemId());
        }
   
    }

I'm printing only the itemId of ICategoryHandle. If you want to get the corresponding item. Please go through following link.
https://jazz.net/forum/questions/124752/how-to-get-object-from-handle-using-rtc-java-api


2 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: May 22 '14, 4:26 a.m.

Question was seen: 4,009 times

Last updated: May 22 '14, 5:51 a.m.

Confirmation Cancel Confirm