View Javadoc

1   /*
2   Wotonomy: OpenStep design patterns for pure Java applications.
3   Copyright (C) 2001 Michael Powers
4   
5   This library is free software; you can redistribute it and/or
6   modify it under the terms of the GNU Lesser General Public
7   License as published by the Free Software Foundation; either
8   version 2.1 of the License, or (at your option) any later version.
9   
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  Lesser General Public License for more details.
14  
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library; if not, see http://www.gnu.org
17  */
18  
19  package net.wotonomy.control;
20  
21  /***
22  * EOFaulting defines the requirements for objects that 
23  * can be faulted by an EOFaultManager.
24  *
25  * @author michael@mpowers.net
26  * @author $Author: cgruber $
27  * @version $Revision: 893 $
28  */
29  public interface EOFaulting 
30  {
31      /***
32      * Called by EOFaultHandler to prepare the object to be turned into a fault. 
33      */
34      void clearFault();
35      
36      /***
37      * Returns this object's EOFaultHandler.
38      */
39      EOFaultHandler faultHandler();
40      
41      /***
42      * Returns whether this object is currently a fault.
43      * Returns true if this object has not yet retrieved any values.
44      */
45      boolean isFault();
46      
47      /***
48      * Turns this object into a fault using the specified fault handler.
49      */
50      void turnIntoFault( EOFaultHandler aFaultHandler );
51      
52      /***
53      * Called to completely fire the fault, reading all values.
54      * This method may be implemented to call willRead(null).
55      */
56      void willRead();
57      
58      /***
59      * Called to fire the fault for the specified key.  
60      * The fault manager is required to populate the specified key
61      * with a value, and may populate any or all of the other values
62      * on this object.  A null key will populate all values on the object.
63      * NOTE: This method is not part of the specification.
64      */
65      void willRead( String aKey );
66  }
67  
68  /*
69   * $Log$
70   * Revision 1.1  2006/02/16 13:19:57  cgruber
71   * Check in all sources in eclipse-friendly maven-enabled packages.
72   *
73   * Revision 1.1  2001/11/13 04:13:59  mpowers
74   * Added interfaces needed to begin work on EOCustomObject.
75   *
76   *
77   */
78      
79