org.kuali.rice.krad.rule.event
Class KualiDocumentEventBase

java.lang.Object
  extended by org.kuali.rice.krad.rule.event.KualiDocumentEventBase
All Implemented Interfaces:
KualiDocumentEvent
Direct Known Subclasses:
AddAdHocRoutePersonEvent, AddAdHocRouteWorkgroupEvent, AddDelegationEvent, AddDelegationMemberEvent, AddGroupEvent, AddGroupMemberEvent, AddMemberEvent, AddNoteEvent, AddPermissionEvent, AddPersonDelegationMemberEvent, AddPersonDocumentRoleQualifierEvent, AddResponsibilityEvent, AddRoleEvent, ApproveDocumentEvent, DocumentAuditEvent, KualiAddLineEvent, PromptBeforeValidationEvent, RouteDocumentEvent, SaveDocumentEvent, SendAdHocRequestsEvent

public abstract class KualiDocumentEventBase
extends Object
implements KualiDocumentEvent

Abstract superclass for document-related events.


Field Summary
protected  Document document
           
 
Constructor Summary
protected KualiDocumentEventBase(String description, String errorPathPrefix)
          As a general rule, business rule classes should not change the original object.
  KualiDocumentEventBase(String description, String errorPathPrefix, Document document)
          Constructs a KualiEvent with the given description and errorPathPrefix for the given document.
 
Method Summary
 List<KualiDocumentEvent> generateEvents()
          This will return a list of events that are spawned from this event.
 String getDescription()
          A description of the event.
 Document getDocument()
           
protected static String getDocumentId(Document document)
          Provides null-safe access to the documentNumber of the given document.
 String getErrorPathPrefix()
           
 String getName()
          The name of the event.
 String toString()
           
 void validate()
          Validates the event has all the necessary properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.krad.rule.event.KualiDocumentEvent
getRuleInterfaceClass, invokeRuleMethod
 

Field Detail

document

protected Document document
Constructor Detail

KualiDocumentEventBase

protected KualiDocumentEventBase(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 -

KualiDocumentEventBase

public KualiDocumentEventBase(String description,
                              String errorPathPrefix,
                              Document document)
Constructs a KualiEvent with the given description and errorPathPrefix for the given document.

Parameters:
errorPathPrefix -
document -
description -
Method Detail

getDocument

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

getName

public final String getName()
Description copied from interface: KualiDocumentEvent
The name of the event.

Specified by:
getName in interface KualiDocumentEvent
Returns:
String
See Also:
KualiDocumentEvent.getName()

getDescription

public final String getDescription()
Description copied from interface: KualiDocumentEvent
A description of the event.

Specified by:
getDescription in interface KualiDocumentEvent
Returns:
a description of this event

getErrorPathPrefix

public String getErrorPathPrefix()
Specified by:
getErrorPathPrefix in interface KualiDocumentEvent
Returns:
errorPathPrefix for this event
See Also:
KualiDocumentEvent.getErrorPathPrefix()

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

validate

public void validate()
Description copied from interface: KualiDocumentEvent
Validates the event has all the necessary properties.

Specified by:
validate in interface KualiDocumentEvent
See Also:
KualiDocumentEvent.validate()

generateEvents

public List<KualiDocumentEvent> generateEvents()
Description copied from interface: KualiDocumentEvent
This will return a list of events that are spawned from this event.

Specified by:
generateEvents in interface KualiDocumentEvent
Returns:
See Also:
KualiDocumentEvent.generateEvents()

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


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