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

How can I use the RTC API to set a work item category to restricted (access and view) ?

Hello,

how can the work item category be set to restricted access / restricted viewing using the API? There is a method in the ICategory ( isReadAccessEnabled() ) to evaluate whether if read access is enabled or not. But I did not found a method to set these value.


0 votes

Comments

most of the process mgmt administration functions are not exposed (internal apis), or there is some private storage not documented for application usage.

many times I have had to read the product source code to determine how the product does it, and then evaluate if I want to carry that risk in my coding.



One answer

Permanent link
As Sam already said you have to evaluate the risk of using internal APIs that could possibly break your code in future releases.

But to answer your original question, you can set the read access on a category the following way by using
com.ibm.team.workitem.common.internal.model.Category

ICategory category = ...;
IWorkItemServer fWorkItemService = fWorkItemService = getService(IWorkItemServer.class);


Category internalCategory = (Category) (ICategory) category.getWorkingCopy();

internalCategory.setReadAccessEnabled(value) //  value = true|false
return fWorkItemService.saveCategory((ICategory) internalCategory, monitor);

0 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,948
× 235

Question asked: Dec 12 '13, 6:24 a.m.

Question was seen: 5,838 times

Last updated: Mar 12 '14, 5:49 a.m.

Confirmation Cancel Confirm