001/**
002 * Copyright 2005-2016 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.rice.core.util.jaxb;
017
018import java.io.Serializable;
019
020/**
021 * Helper interface for use with the RiceXmlStreamingList class.
022 * 
023 * <p>If "streaming" of child elements is desired during JAXB unmarshalling, then the parent element
024 * assigns an instance of RiceXmlStreamingList to the appropriate list field/property, and gives the
025 * list an implementation of this interface for the list to invoke whenever it receives a 
026 * newly-unmarshalled child element. This allows the implementation to process the new element and then
027 * discard it.
028 * 
029 * @author Kuali Rice Team (rice.collab@kuali.org)
030 */
031public interface RiceXmlListAdditionListener<T> extends Serializable {
032    /**
033     * This method is invoked whenever the associated RiceXmlStreamingList instance receives
034     * a newly-unmarshalled child element.
035     * 
036     * @param item The unmarshalled element (or adapter-generated object) to be processed.
037     */
038    public void newItemAdded(T item);
039}