How can I use the RTC API to set a work item category to restricted (access and view) ?
One answer
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
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);
Comments
sam detweiler
Dec 12 '13, 6:52 a.m.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.