...
We earlier met maintainables in the section on business rules for maintenance documents. We saw that maintenance documents hand the rules a document of class org.kuali.ricekfs.kns.document.MaintenanceDocument. This document held the new business object and perhaps the pre-edit or pre-copy version of the business object...but that those business objects were wrapped in other objects that implemented the org.kuali.ricekfs.kns.maintenance.Maintainable interface.
Most of the time business objects in maintenance documents are simply wrapped in the generic org.kuali.ricekfs.kns.maintenance.KualiMaintainableImpl implementation of Maintainable. But that doesn't mean a business object has to use that implementation of Maintainable....
...
Code Block |
---|
<property name="maintainableClass" value="org.kuali.ricekfs.kns.maintenance.KualiMaintainableImpl"/> |
...
A note before we continue about the maintenanceAction property. There are four possible actions, and at least three of them are named in obvious ways; they're all constants in RiceConstantsKRADConstants. They are MAINTENANCE_NEW_ACTION, MAINTENANCE_COPY_ACTION, MAINTENANCE_EDIT_ACTION, and MAINTENANCE_NEWWITHEXISTING_ACTION. The new action is for creating a new business object, the copy action is for copying an old business object, and the edit action is for editing a business object. That leaves us "new with existing," which sounds suspiciously like copy but which is not, in fact, copy. The new with existing action is only used in a couple of places in KFS, including certain Vendor-based maintenance documents in Purchasing & Accounts Payable, and in the "global account delegate templates." Basically, the action is used for cases where a lookup is creating a new business object from heterogeneous business object - for instance, when a parent business object creates a child business object. Not much used in KFS, again, but an interesting feature.
...