public interface TimelineEventProvider
TimelineEntryProvider provides TimelineEvents to a Timeline. Implementations must
register themselves as an OSGi-component and declare itself as a service on this interface. This way the timeline
aggregator service is able to dynamically use available providers to generate timline events for a given Resource. A provider may decide (see accepts(org.apache.sling.api.resource.Resource)) whether to provide
events or not for a given resource. Events are provided via getEvents(org.apache.sling.api.resource.Resource).| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(Resource resource)
Indicates to the timeline aggregator whether this provider accepts the given
resource or not. |
java.util.Collection<TimelineEvent> |
getEvents(Resource resource)
If
accepts(org.apache.sling.api.resource.Resource) returns true for a given resource, this
method is called with the same resource parameter in order for the provider to return a Collection
of TimelineEvents for the given resource. |
TimelineEventType |
getType()
Returns the
TimelineEventType this provider provides. |
boolean accepts(Resource resource)
resource or not. In
case the provider doesn not accept the resource, getEvents(org.apache.sling.api.resource.Resource) is
never called.resource - The Resource to indicate for whether it is accepted or not.true if the provider accepts providing events for the given resource.java.util.Collection<TimelineEvent> getEvents(Resource resource)
accepts(org.apache.sling.api.resource.Resource) returns true for a given resource, this
method is called with the same resource parameter in order for the provider to return a Collection
of TimelineEvents for the given resource.resource - The Resource for which to return TimelineEvents.Collection of TimelineEvents or an empty collection if the provider did not
find/generate any events.TimelineEventType getType()
TimelineEventType this provider provides.TimelineEventType.Copyright © 2010 - 2023 Adobe. All Rights Reserved