001/*
002 * Copyright 2008 The Kuali Foundation
003 * 
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 * 
008 * http://www.opensource.org/licenses/ecl2.php
009 * 
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.ole.sys.document.validation.event;
017
018import org.kuali.rice.krad.rules.rule.event.KualiDocumentEvent;
019
020/**
021 * An interface that allows rules to add attribues to an event as it is processed.
022 */
023public interface AttributedDocumentEvent extends KualiDocumentEvent {
024    /**
025     * Retrieves a named attribute from the event.
026     * @param attributeName the name of the attribute to retrieve
027     * @return the attribute's value, or null if no attribute with the given name was found.
028     */
029    public abstract Object getAttribute(String attributeName);
030    /**
031     * Sets the value of a named attribute on the event.
032     * @param attributeName the name of the attribute to set
033     * @param attributeValue the value of the named attribute
034     */
035    public abstract void setAttribute(String attributeName, Object attributeValue);
036    
037    /**
038     * This sets an iteration subject in the case of this event going through a CollectionValidation
039     * @param iterationSubject the current subject of the CollectionValidation's iteration through a collection
040     */
041    public abstract void setIterationSubject(Object iterationSubject);
042    
043    /**
044     * If event is going through a collection validation, this will return the current subject of the iteration through the collection
045     * @return a subject to a CollectionValidation's iteration through a collection
046     */
047    public abstract Object getIterationSubject();
048}