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

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:

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

0 votes


Be the first one to answer this question!

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: Jul 01 '10, 4:18 p.m.

Question was seen: 4,200 times

Last updated: Jul 01 '10, 4:18 p.m.

Confirmation Cancel Confirm