Class DocumentEventBase
java.lang.Object
org.kuali.rice.krad.rules.rule.event.RuleEventBase
org.kuali.rice.krad.rules.rule.event.DocumentEventBase
- All Implemented Interfaces:
DocumentEvent,RuleEvent
- Direct Known Subclasses:
AddAdHocRoutePersonEvent,AddAdHocRouteWorkgroupEvent,AddCollectionLineEvent,AddNoteEvent,ApproveDocumentEvent,CompleteDocumentEvent,DocumentAuditEvent,RouteDocumentEvent,SaveDocumentEvent,SendAdHocRequestsEvent
Abstract superclass for document-related events.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDocumentEventBase(String description, String errorPathPrefix) As a general rule, business rule classes should not change the original object.DocumentEventBase(String description, String errorPathPrefix, Document document) Constructs a KualiEvent with the given description and errorPathPrefix for the given document. -
Method Summary
Modifier and TypeMethodDescriptionfinal Documentprotected static StringgetDocumentId(Document document) Provides null-safe access to the documentNumber of the given document.voidvalidate()Validates the event has all the necessary properties.Methods inherited from class org.kuali.rice.krad.rules.rule.event.RuleEventBase
addFact, generateEvents, getDescription, getErrorPathPrefix, getFacts, getName, getRuleMethodName, setFacts, setName, setRuleMethodName, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.kuali.rice.krad.rules.rule.event.RuleEvent
generateEvents, getDescription, getErrorPathPrefix, getFacts, getName, getRuleInterfaceClass, getRuleMethodName, invokeRuleMethod
-
Field Details
-
document
-
-
Constructor Details
-
DocumentEventBase
As a general rule, business rule classes should not change the original object. This constructor was created so that PreRulesCheckEvent, a UI level rule checker, can make changes.- Parameters:
description-errorPathPrefix-
-
DocumentEventBase
Constructs a KualiEvent with the given description and errorPathPrefix for the given document.- Parameters:
description-errorPathPrefix-document-
-
-
Method Details
-
getDocument
- Specified by:
getDocumentin interfaceDocumentEvent- Returns:
- Document The document associated with this event
- See Also:
-
validate
public void validate()Description copied from interface:RuleEventValidates the event has all the necessary properties. -
getDocumentId
Provides null-safe access to the documentNumber of the given document.- Parameters:
document-- Returns:
- String containing the documentNumber of the given document, or some indication of why the documentNumber isn't accessible
-