|
51 | 51 | import static com.google.common.base.Throwables.propagate; |
52 | 52 | import static org.spine3.base.Identifiers.idToAny; |
53 | 53 |
|
54 | | -//TODO:2016-02-17:alexander.yevsyukov: Describe dealing with command validation and throwing Failures. |
55 | | -//TODO:2016-02-17:alexander.yevsyukov: Describe (not) throwing exceptions. |
56 | | - |
57 | 54 | /** |
58 | 55 | * Abstract base for aggregates. |
59 | 56 | * |
|
74 | 71 | * </ol> |
75 | 72 | * |
76 | 73 | * <h2>Adding command handler methods</h2> |
77 | | - * <p>Command handling methods in the an aggregate are defined in the same was as described in {@link CommandHandler}. |
| 74 | + * <p>Command handling methods of an aggregate are defined in the same way as described in {@link CommandHandler}. |
78 | 75 | * |
79 | 76 | * <h2>Adding event applier methods</h2> |
80 | | - * <p>Aggregate data is stored as sequence of events it produces. In order to restore the state of the aggregate |
81 | | - * these events are passed to the {@link #play(Iterable)} method, which invokes corresponding |
82 | | - * <em>applier methods</em>. |
| 77 | + * <p>Aggregate data is stored as sequence of events it produces. The state of the aggregate |
| 78 | + * is restored by re-playing the history of events and invoking corresponding <em>event applier methods</em>. |
83 | 79 | * |
84 | 80 | * <p>An event applier is a method that changes the state of the aggregate in response to an event. The aggregate |
85 | 81 | * must have applier methods for <em>all</em> event types it produces. An event applier takes a single parameter |
86 | | - * of the event message it handles and returns {@code void}. The modification of the state is done via a builder |
87 | | - * instance obtained from {@link #getBuilder()}. |
| 82 | + * of the event message it handles and returns {@code void}. |
| 83 | + * |
| 84 | + * <p>The modification of the state is done via a builder instance obtained from {@link #getBuilder()}. |
88 | 85 | * |
89 | 86 | * @param <I> the type for IDs of this class of aggregates |
90 | 87 | * @param <S> the type of the state held by the aggregate |
|
0 commit comments