Package com.adobe.granite.timeline
Interface Timeline
-
public interface TimelineATimelineprovides a collection ofTimelineEvents specific to aResource. The type of events provided is dependent on the availableTimelineEventProviders registered in the system. By default the following events are provided:- Versioning Events
- Workflow Events
- Annotation Events
resource.adaptTo(Timeline.class). Any resource can be adapted. Whether events are provided for a resource is decided by the event providers.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<TimelineEvent>getEvents()Returns aListof allTimelineEvents available for the resource backing the timeline.java.util.List<TimelineEvent>getEvents(TimelineEventType... types)Returns a subset of events (as provided bygetEvents()), filtered by the giventypes.ResourcegetResource()Returns theResourcefor which this timeline was created.
-
-
-
Method Detail
-
getResource
Resource getResource()
Returns theResourcefor which this timeline was created.- Returns:
- The
Resource.
-
getEvents
java.util.List<TimelineEvent> getEvents()
Returns aListof allTimelineEvents available for the resource backing the timeline. If no events are found, an empty collection is returned. The list is ordered chronologically (most recent last) as perTimelineEvent.getTime(). In order to trim the result (e.g. for pagination, usegetEvents().subList(start, end).- Returns:
- A
ListofTimelineEvents, or an empty collection if no events were found.
-
getEvents
java.util.List<TimelineEvent> getEvents(TimelineEventType... types)
Returns a subset of events (as provided bygetEvents()), filtered by the giventypes. The types by which to filter are provided as an array ofTimelineEventTypes. TheTimelineAggregatorservice provides access to the available types (seeTimelineAggregator.getTypes(). The list is ordered chronologically (most recent last) as perTimelineEvent.getTime(). In order to trim the result (e.g. for pagination, usegetEvents(type).subList(start, end).- Parameters:
types- The array ofTimelineEventTypes by which to filter events.- Returns:
- A
ListofTimelineEvents filtered by type, or an empty list if no events or none of the given types were found.
-
-