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

public abstract class DocumentEventBase extends RuleEventBase implements DocumentEvent
Abstract superclass for document-related events.
Author:
Kuali Rice Team (rice.collab@kuali.org)
  • Field Details

    • document

      protected Document document
  • Constructor Details

    • DocumentEventBase

      protected DocumentEventBase(String description, String errorPathPrefix)
      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

      public DocumentEventBase(String description, String errorPathPrefix, Document document)
      Constructs a KualiEvent with the given description and errorPathPrefix for the given document.
      Parameters:
      description -
      errorPathPrefix -
      document -
  • Method Details

    • getDocument

      public final Document getDocument()
      Specified by:
      getDocument in interface DocumentEvent
      Returns:
      Document The document associated with this event
      See Also:
    • validate

      public void validate()
      Description copied from interface: RuleEvent
      Validates the event has all the necessary properties.
      Specified by:
      validate in interface RuleEvent
      See Also:
    • getDocumentId

      protected static String getDocumentId(Document document)
      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