Class AbstractProgressionTracker
java.lang.Object
org.ametys.core.schedule.progression.AbstractProgressionTracker
- All Implemented Interfaces:
ProgressionTracker
- Direct Known Subclasses:
ContainerProgressionTracker
,SimpleProgressionTracker
public abstract sealed class AbstractProgressionTracker
extends Object
implements ProgressionTracker
permits SimpleProgressionTracker, ContainerProgressionTracker
The abstract implementation of a
ProgressionTracker
-
Field Summary
Modifier and TypeFieldDescriptionprotected ProgressionTrackerFactory
The factoryprotected I18nizableText
The labelprotected ContainerProgressionTracker
The parent of the tracker -
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractProgressionTracker
(String id, I18nizableText label, ProgressionTrackerFactory factory, Logger logger, ContainerProgressionTracker parent) A constructor with aI18nizableText
argument -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.core.schedule.progression.ProgressionTracker
asPercentage, getIndex, getSize
-
Field Details
-
_factory
The factory -
_label
The label -
_parent
The parent of the tracker
-
-
Constructor Details
-
AbstractProgressionTracker
protected AbstractProgressionTracker(String id, I18nizableText label, ProgressionTrackerFactory factory, Logger logger, ContainerProgressionTracker parent) A constructor with aI18nizableText
argument- Parameters:
id
- The identifierlabel
- The labelfactory
- The factorylogger
- The loggerparent
- The parent of the tracker, null if it does not have one
-
-
Method Details
-
getParent
Description copied from interface:ProgressionTracker
Get the parent progression tracker- Specified by:
getParent
in interfaceProgressionTracker
- Returns:
- the parent or null
-
getLabel
Description copied from interface:ProgressionTracker
Get the label- Specified by:
getLabel
in interfaceProgressionTracker
- Returns:
- The label
-
toJSON
Description copied from interface:ProgressionTracker
Get the progression tracker as a JSON- Specified by:
toJSON
in interfaceProgressionTracker
- Returns:
- The progression tracker's JSON
-
_getLogPrefix
Get the log prefix- Returns:
- The log prefix
-
_getHierarchicalLabel
Get the hierarchical label- Returns:
- The hierarchical label, or just label if the parent is null
-
_getLogger
Get the logger- Returns:
- The logger
-
getId
Description copied from interface:ProgressionTracker
Get the id- Specified by:
getId
in interfaceProgressionTracker
- Returns:
- The id
-