It's all about the answers!

Ask a question

Comparing two IApprovalDescriptor objects


Alexander Kofman (2663) | asked May 05 '08, 7:16 a.m.
In the work item save operation participant, in order to detect whether an approval has changed its state (e.g. from pending to approved) I compare the old and the new states of the work item. For each descriptor from the "old" state I check if it has been approved/rejected in the "new" state. To implement this mechanism I have to implement the "equals" operation between two instances of IApprovalDescriptor. In Jazz sources, ApprovalChangePresentation's approvalDescriptorEquals() method implements this:
private boolean approvalDescriptorEquals(IApprovalDescriptor left, IApprovalDescriptor right) {
return ((ApprovalDescriptor) left).getId() == ((ApprovalDescriptor) right).getId();
}

However, ApprovalDescriptor is an "internal" API which is not supposed to be exposed. Is there another API/technique that Jazz extenders should use to implement the described functionality?

Thanks!

Alex

Be the first one to answer this question!


Register or to post your answer.