Package com.adobe.granite.timeline
Interface Timeline
-
public interface Timeline
ATimeline
provides a collection ofTimelineEvent
s specific to aResource
. The type of events provided is dependent on the availableTimelineEventProvider
s 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 aList
of allTimelineEvent
s 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
.Resource
getResource()
Returns theResource
for which this timeline was created.
-
-
-
Method Detail
-
getResource
Resource getResource()
Returns theResource
for which this timeline was created.- Returns:
- The
Resource
.
-
getEvents
java.util.List<TimelineEvent> getEvents()
Returns aList
of allTimelineEvent
s 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
List
ofTimelineEvent
s, 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 ofTimelineEventType
s. TheTimelineAggregator
service 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 ofTimelineEventType
s by which to filter events.- Returns:
- A
List
ofTimelineEvent
s filtered by type, or an empty list if no events or none of the given types were found.
-
-