Class AddCollectionLineEvent

All Implemented Interfaces:
DocumentEvent, RuleEvent

public class AddCollectionLineEvent extends DocumentEventBase
Defines the add collection line event fired when a user adds a line in a collection in a document.
Author:
Kuali Rice Team (rice.collab@kuali.org)
  • Constructor Details

    • AddCollectionLineEvent

      public AddCollectionLineEvent(Document document, String collectionName, Object addLine)
      Constructs an event for a document adding a line to the collection with the name collectionName.
      Parameters:
      document - the document containing the collection objects
      collectionName - the name of the collection object
      addLine - the object being added to the collection
    • AddCollectionLineEvent

      public AddCollectionLineEvent(String errorPathPrefix, Document document, String collectionName, Object addLine)
      Constructs an event for a document adding a line to the collection with the name collectionName with a specific errorPathPrefix.
      Parameters:
      errorPathPrefix - the prefix to add to the error path for reporting messages
      document - the document containing the collection objects
      collectionName - the name of the collection object
      addLine - the object being added to the collection
    • AddCollectionLineEvent

      protected AddCollectionLineEvent(String eventType, String errorPathPrefix, Document document, String collectionName, Object addLine)
      Constructs an event for a document adding a line to the collection with the name collectionName with a specific errorPathPrefix and eventType.
      Parameters:
      eventType - the name of the type of event
      errorPathPrefix - the prefix to add to the error path for reporting messages
      document - the document containing the collection objects
      collectionName - the name of the collection object
      addLine - the object being added to the collection
  • Method Details

    • getRuleInterfaceClass

      public Class<AddCollectionLineRule> getRuleInterfaceClass()
      Returns the interface that classes must implement to receive this event. Specifies that this class returns the AddCollectionLineRule class.
      Returns:
      rule interface
    • invokeRuleMethod

      public boolean invokeRuleMethod(BusinessRule rule)
      Invokes the event handling method on the rule object. Invokes the specific rule in AddCollectionLineRule.
      Parameters:
      rule - business rule
      Returns:
      true if the rule matches
    • getCollectionName

      public String getCollectionName()
      The name of the collection being added to.
      Returns:
      the collection name
    • getAddLine

      public Object getAddLine()
      The object being added to the collection.
      Returns:
      the added object