View Javadoc

1   /*
2    * Copyright 2008 The Kuali Foundation
3    * 
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    * http://www.opensource.org/licenses/ecl2.php
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.ole.sys.document.validation.event;
17  
18  import org.kuali.rice.krad.rules.rule.event.KualiDocumentEvent;
19  
20  /**
21   * An interface that allows rules to add attribues to an event as it is processed.
22   */
23  public interface AttributedDocumentEvent extends KualiDocumentEvent {
24      /**
25       * Retrieves a named attribute from the event.
26       * @param attributeName the name of the attribute to retrieve
27       * @return the attribute's value, or null if no attribute with the given name was found.
28       */
29      public abstract Object getAttribute(String attributeName);
30      /**
31       * Sets the value of a named attribute on the event.
32       * @param attributeName the name of the attribute to set
33       * @param attributeValue the value of the named attribute
34       */
35      public abstract void setAttribute(String attributeName, Object attributeValue);
36      
37      /**
38       * This sets an iteration subject in the case of this event going through a CollectionValidation
39       * @param iterationSubject the current subject of the CollectionValidation's iteration through a collection
40       */
41      public abstract void setIterationSubject(Object iterationSubject);
42      
43      /**
44       * If event is going through a collection validation, this will return the current subject of the iteration through the collection
45       * @return a subject to a CollectionValidation's iteration through a collection
46       */
47      public abstract Object getIterationSubject();
48  }