mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-05 20:03:52 +00:00
Moved top-level cache for TrackedEvent from TracTrac-specific DomainFactory to RacingEventService;
introduced a TrackedEventRegistry interface in com.sap.sailing.domain that is now extended by RacingEventService as well as a dummy implementation for use by tests
This commit is contained in:
1 parent
90467c05db
commit
ef4547357f
26 files changed
+163
-112
No files matched your search
Executable
+28
@@ -0,0 +1,28 @@
|
||||
package com.sap.sailing.domain.tracking;
|
||||
|
||||
import com.sap.sailing.domain.base.Event;
|
||||
|
||||
/**
|
||||
* {@link TrackedEvent}s or {@link DynamicTrackedEvent}s belong to {@link Event} objects. However, an {@link Event}
|
||||
* doesn't and shouldn't know how it's being tracked. A <em>registry</em> decouples them. Test cases may use
|
||||
* different, simplified registries.
|
||||
*
|
||||
* @author Axel Uhl (d043530)
|
||||
*
|
||||
*/
|
||||
public interface TrackedEventRegistry {
|
||||
/**
|
||||
* Looks for tracking information about <code>event</code>. If no such object exists yet, a new one
|
||||
* is created.
|
||||
*/
|
||||
DynamicTrackedEvent getOrCreateTrackedEvent(Event event);
|
||||
|
||||
/**
|
||||
* Looks for the tracking information for <code>event</code>. If not found, <code>null</code> is returned
|
||||
* immediately. See also {@link #getOrCreateTrackedEvent(com.sap.sailing.domain.base.Event)}.
|
||||
*/
|
||||
DynamicTrackedEvent getTrackedEvent(com.sap.sailing.domain.base.Event event);
|
||||
|
||||
void remove(Event event);
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user