How to obtain IWorkItemCommon
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:
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
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