org.kuali.rice.kns.rules
Interface MaintenanceDocumentRule

All Known Implementing Classes:
DocumentTypeMaintainableBusRule, GenericPermissionMaintenanceDocumentRule, MaintenanceDocumentRuleBase, ParameterRule, ReviewResponsibilityMaintenanceDocumentRule, RoutingRuleDelegationMaintainableBusRule, RoutingRuleMaintainableBusRule

public interface MaintenanceDocumentRule

Rule event interface for implementing business rules against a MaintenanceDocument

Author:
Kuali Rice Team (rice.collab@kuali.org)

Method Summary
 boolean processApproveDocument(ApproveDocumentEvent approveEvent)
          Runs all business rules needed prior to approving.
 boolean processRouteDocument(Document document)
          Runs all business rules needed prior to routing.
 boolean processSaveDocument(Document document)
          Runs all business rules needed prior to saving.
 void setupBaseConvenienceObjects(MaintenanceDocument document)
          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.
 void setupConvenienceObjects()
          Should always be overriden if a subclass is created.
 

Method Detail

processSaveDocument

boolean processSaveDocument(Document document)
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:
SaveDocumentRule.processSaveDocument(org.kuali.rice.krad.document.Document)

processRouteDocument

boolean processRouteDocument(Document document)
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:
RouteDocumentRule.processRouteDocument(org.kuali.rice.krad.document.Document)

processApproveDocument

boolean processApproveDocument(ApproveDocumentEvent approveEvent)
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:
ApproveDocumentRule.processApproveDocument(org.kuali.rice.krad.rules.rule.event.ApproveDocumentEvent)

setupBaseConvenienceObjects

void setupBaseConvenienceObjects(MaintenanceDocument document)
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 overriden if a subclass is created. The goal for this is to cast the oldBo and newBo into the correct types of the subclass.



Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.