Change Management Delegate
The wt.change2 package has a delegate defined to allow customization. The following is an overview to help you know where to start.
ConcreteAssociationDelegate
ConcreteAssociationDelegate is used within StandardChangeService2. It is obtained from the Change2DelegateFactory.
There are many subclasses of ConcreteAssociationDelegate. Each one takes two arguments: the two objects being linked. Each one returns the link object that links the two objects. There is no mechanism for adding additional values for attributes that belong on the link object, so this mechanism works best for link objects that have not been customized with additional attributes.
One other complication with this delegate is that if you customize some of the main classes, you may have to add properties file entries that may not seem intuitively obvious.
Assume that you customize change order (that is, make a subclass of wt.change2.WTChangeOrder2) in your myChange2 package within your customization package and call it MyChangeOrder.
When looking up the appropriate subclass of wt.change2.ConcreteAssociationDelegate, the following entry in section 9 of wt.change2.change2.properties is being used when linking the change order to a change request:
wt.services/svc/default/wt.change2.ConcreteAssociationDelegate/
wt.change2.WTChangeOrder2/wt.change2.WTChangeRequest2/
1=wt.change2.AddressedBy2Delegate/singleton
The reference to wt.change2.WTChangeRequest2 is in a field where inheritance is applied. In other words, if you subclassed wt.change2.WTChangeRequest2 as customization.myChange2.MyChangeRequest, then the delegate lookup process could still use this line in the properties file, because customization.myChange2.MyChangeRequest is a wt.change2.WTChangeRequest2.
The reference to wt.change2.WTChangeOrder2 is in a field where inheritance is not applied. In other words, if you subclassed wt.change2.WTChangeOrder2 as customization.myChange2.MyChangeOrder, then the delegate lookup process could not use this line in the properties file because the string "customization.myChange2.MyChangeOrder2" does not match exactly the string "wt.change2.WTChangeOrder2".All that is needed is another line in the properties file:
wt.services/svc/default/wt.change2.ConcreteAssociationDelegate/
customization.myChange2.MyChangeOrder/
wt.change2.WTChangeRequest2/
1=wt.change2.AddressedBy2Delegate/singleton
War dies hilfreich?