Package org.kuali.rice.krad.rules
Interface MaintenanceDocumentRule
- All Known Implementing Classes:
MaintenanceDocumentRuleBase
public interface MaintenanceDocumentRule
Rule event interface for implementing business rules against a maintenance document.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Method Summary
Modifier and TypeMethodDescriptionbooleanRuns all business rules needed prior to adding a collection to a line.booleanprocessApproveDocument(ApproveDocumentEvent approveEvent) Runs all business rules needed prior to approving.booleanprocessRouteDocument(Document document) Runs all business rules needed prior to routing.booleanprocessSaveDocument(Document document) Runs all business rules needed prior to saving.voidSets the convenience objects like newAccount and oldAccount, so you have short and easy handles to the new and old objects contained in the maintenance document.voidShould always be overridden if a subclass is created.
-
Method Details
-
processSaveDocument
Runs all business rules needed prior to saving. This includes both common rules for all maintenance documents, plus class-specific business rules. Will only return false if it fails the isValidForSave() test. Otherwise, it will always return positive regardless of the outcome of the business rules. However, any error messages resulting from the business rules will still be populated, for display to the consumer of this service.- See Also:
-
processRouteDocument
Runs all business rules needed prior to routing. This includes both common rules for all maintenance documents, plus class-specific business rules. Will return false if any business rule fails, or if the document is in an invalid state, and not routable (see isDocumentValidForRouting()).- See Also:
-
processApproveDocument
Runs all business rules needed prior to approving. This includes both common rules for all maintenance documents, plus class-specific business rules. Will return false if any business rule fails, or if the document is in an invalid state, and not approvable (see isDocumentValidForApproving()).- See Also:
-
processAddCollectionLine
Runs all business rules needed prior to adding a collection to a line. This includes both common rules for all maintenance documents, plus class-specific business rules. Will return false if any business rule fails.- See Also:
-
setupBaseConvenienceObjects
Sets the convenience objects like newAccount and oldAccount, so you have short and easy handles to the new and old objects contained in the maintenance document. It also calls the BusinessObjectBase.refresh(), which will attempt to load all sub-objects from the DB by their primary keys, if available.- Parameters:
document- - the maintenanceDocument being evaluated
-
setupConvenienceObjects
void setupConvenienceObjects()Should always be overridden if a subclass is created. The goal for this is to cast the oldBo and newBo into the correct types of the subclass.
-