It's all about the answers!

Ask a question

How to obtain IWorkItemCommon


Geoff Alexander (19623948) | asked Jul 01 '10, 4:18 p.m.
I need to obtain an IWorkItemCommon. I searched the RTC SDK source and found a number of methods that use IAuditableCommon#getPeer(CLASS<T>) to get an IWorkItemCommon. I followed this same approach in my code:

public void run( AdvisableOperation operation,

IProcessConfigurationElement advisorConfiguration,
IAdvisorInfoCollector collector, IProgressMonitor monitor )
throws TeamRepositoryException
{
Object data = operation.getOperationData();
if (data instanceof ISaveParameter)
{
ISaveParameter saveParameter = (ISaveParameter)data;
IWorkItemCommon workItemCommon =
saveParameter.getSaveOperationParameter().
getAuditableCommon().getPeer(IWorkItemCommon.class);
...
}
}


The code runs fine. However, IAuditableCommon#getPeer(Class<T>) is marked as deprecated. So what's the proper way to obtain an IWorkItemCommon in this context?

Thanks,
Geoff Alexander

Be the first one to answer this question!


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.