EventManager.javaEvent and EventSource objects. The lookup traverses the calendar's configured event sources (comparing UUIDs via Objects.equal) and delegates to each source's EventProvider to find the specific event. Throws typed exceptions (EventSourceNotFoundException, EventNotFoundException) for unmatched IDs.Two-step resolution: getEventSource(String id) iterates the calendar's event sources (from Config.getEventSources()) comparing each source's UUID using Objects.equal — Wicket's null-safe equality helper. On match, returns the source; on no match, throws EventSourceNotFoundException. getEvent(String sourceId, String eventId) first resolves the source, then calls source.getEventProvider().getEventForId(eventId) — delegating event lookup to the source's provider (typically a DAO-backed implementation). If the provider can't find the event, it throws EventNotFoundException.
The constructor is package-private — only FullCalendar can create an EventManager (via getEventManager()). This ensures the manager is always associated with a specific calendar instance and its configuration.
This manager is the bridge between Ajax callback parameters (which carry string IDs) and the Java domain objects. For example, when handling an event drop callback, the handler calls getEventManager().getEvent(sourceId, eventId) to retrieve the affected event object, update its times in the database, and return a response to the client.
| Commit | What changed |
|---|---|
868d6abb7 through ceb63e8a1 | Six annual copyright header updates. The lookup logic has been stable — the two-step ID→Source→Event resolution pattern covers all callback scenarios, and no additional lookup methods have been needed. |