View Javadoc
1   /**
2    * Redistribution and use of this software and associated documentation ("Software"), with or
3    * without modification, are permitted provided that the following conditions are met:
4    *
5    * 1. Redistributions of source code must retain copyright statements and notices. Redistributions
6    * must also contain a copy of this document.
7    *
8    * 2. Redistributions in binary form must reproduce the above copyright notice, this list of
9    * conditions and the following disclaimer in the documentation and/or other materials provided with
10   * the distribution.
11   *
12   * 3. The name "Exolab" must not be used to endorse or promote products derived from this Software
13   * without prior written permission of Intalio, Inc. For written permission, please contact
14   * info@exolab.org.
15   *
16   * 4. Products derived from this Software may not be called "Exolab" nor may "Exolab" appear in
17   * their names without prior written permission of Intalio, Inc. Exolab is a registered trademark of
18   * Intalio, Inc.
19   *
20   * 5. Due credit should be given to the Exolab Project (http://www.exolab.org/).
21   *
22   * THIS SOFTWARE IS PROVIDED BY INTALIO, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR
23   * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
24   * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTALIO, INC. OR ITS
25   * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26   * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27   * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28   * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
29   * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30   *
31   * Copyright 2002 (C) Intalio, Inc. All Rights Reserved.
32   *
33   * $Id$
34   *
35   * Date Author Changes 09-13-2002 Paul Christmann Initial Revision
36   */
37  
38  package org.exolab.castor.xml;
39  
40  
41  /**
42   * <p>
43   * An interface to allow external "listening" to objects when they are being unmarshalled for
44   * various tracking purposes and potential modification. An implementation of this interface may be
45   * registered with the Unmarshaller.
46   * </p>
47   * <p>
48   * The UnmarshalListener interface does <em>not</em> report on native data types that are
49   * unmarshalled.
50   * </p>
51   * <p>
52   * This iterface was deprecated with Castor 1.2.1 and should no longer be used! Please use the
53   * replacing interface:
54   * 
55   * @see org.castor.xml.UnmarshalListener
56   *      </p>
57   *
58   * @author <a href="mailto:paul@priorartisans.com">Paul Christmann</a>
59   * @author <a href="mailto:kvsico@intalio.com">Keith Visco</a>
60   * @author <a href="mailto:blandin@intalio.com">Arnaud Blandin</a>
61   * @version $Revision$
62   * @deprecated a new extended interface was introduced
63   **/
64  public interface UnmarshalListener {
65  
66    /**
67     * This method is called when an object has just been initialized by the Unmarshaller.
68     *
69     * @param object the Object that was initialized.
70     **/
71    public void initialized(Object object);
72  
73    /**
74     * This method is called once the attributes have been processed. It indicates that the the fields
75     * of the given object corresponding to attributes in the XML document have been set.
76     *
77     * @param object the Object the object being unmarshalled.
78     */
79    public void attributesProcessed(Object object);
80  
81    /**
82     * This method is called after a child object has been added during the unmarshalling. This method
83     * will be called after {@link #unmarshalled(Object)} has been called for the child.
84     *
85     * @param fieldName The Name of the field the child is being added to.
86     * @param parent The Object being unmarshalled.
87     * @param child The Object that was just added.
88     */
89    public void fieldAdded(String fieldName, Object parent, Object child);
90  
91    /**
92     * This method is called after an object has been completely unmarshalled, including all of its
93     * children (if any).
94     *
95     * @param object the Object that was unmarshalled.
96     **/
97    public void unmarshalled(Object object);
98  
99  } // -- UnmarshalListener