Comparing two IApprovalDescriptor objects
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!
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.