Class StepHolderEnumerator
- java.lang.Object
-
- org.ametys.plugins.odfpilotage.enumerators.StepHolderEnumerator
-
- All Implemented Interfaces:
Enumerator<ContentValue>
,Enumerator
,Contextualizable
,Serviceable
public class StepHolderEnumerator extends Object implements Enumerator<ContentValue>, Serviceable, Contextualizable, Enumerator
Enumerator
for the steps holder
-
-
Field Summary
Fields Modifier and Type Field Description private Context
_context
private ODFHelper
_odfHelper
private OdfReferenceTableHelper
_refTableHelper
private AmetysObjectResolver
_resolver
-
Constructor Summary
Constructors Constructor Description StepHolderEnumerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private Stream<Container>
_getAllSteps()
private Optional<String>
_getAnneeId()
private I18nizableText
_getDisplayName(Container container)
private Stream<Container>
_getStepsHolder(ProgramItem programItem)
private Set<Container>
_getStepsHolder(ProgramItem programItem, String anneeId)
void
contextualize(Context context)
Map<String,Object>
getConfiguration()
Get the configuration of this enumeratorMap<Object,I18nizableText>
getEntries()
Provides the enumerated values with their optional label.I18nizableText
getEntry(String value)
Retrieves a single label from a value.I18nizableText
getEntry(ContentValue value)
Retrieves a single label from a value.Map<ContentValue,I18nizableText>
getTypedEntries()
Provides the enumerated values with their optional label.void
service(ServiceManager manager)
-
-
-
Field Detail
-
_resolver
private AmetysObjectResolver _resolver
-
_odfHelper
private ODFHelper _odfHelper
-
_refTableHelper
private OdfReferenceTableHelper _refTableHelper
-
-
Constructor Detail
-
StepHolderEnumerator
public StepHolderEnumerator()
-
-
Method Detail
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getEntry
public I18nizableText getEntry(ContentValue value) throws Exception
Description copied from interface:Enumerator
Retrieves a single label from a value.- Specified by:
getEntry
in interfaceEnumerator<ContentValue>
- Parameters:
value
- the value.- Returns:
- the label or
null
if not found. - Throws:
Exception
- if an error occurs.
-
getEntry
public I18nizableText getEntry(String value) throws Exception
Description copied from interface:Enumerator
Retrieves a single label from a value.- Specified by:
getEntry
in interfaceEnumerator
- Parameters:
value
- the value.- Returns:
- the label or
null
if not found. - Throws:
Exception
- if an error occurs.
-
getTypedEntries
public Map<ContentValue,I18nizableText> getTypedEntries() throws Exception
Description copied from interface:Enumerator
Provides the enumerated values with their optional label.- Specified by:
getTypedEntries
in interfaceEnumerator<ContentValue>
- Returns:
- the enumerated values and their label.
- Throws:
Exception
- if an error occurs. TODO NEWATTRIBUTEAPI: rename this method whenEnumerator
will be removed
-
getEntries
public Map<Object,I18nizableText> getEntries() throws Exception
Description copied from interface:Enumerator
Provides the enumerated values with their optional label.- Specified by:
getEntries
in interfaceEnumerator
- Returns:
- the enumerated values and their label.
- Throws:
Exception
- if an error occurs.
-
_getAllSteps
private Stream<Container> _getAllSteps()
-
_getDisplayName
private I18nizableText _getDisplayName(Container container)
-
_getStepsHolder
private Stream<Container> _getStepsHolder(ProgramItem programItem)
-
_getStepsHolder
private Set<Container> _getStepsHolder(ProgramItem programItem, String anneeId)
-
_getAnneeId
private Optional<String> _getAnneeId()
-
getConfiguration
public Map<String,Object> getConfiguration()
Description copied from interface:Enumerator
Get the configuration of this enumerator- Specified by:
getConfiguration
in interfaceEnumerator<ContentValue>
- Specified by:
getConfiguration
in interfaceEnumerator
- Returns:
- the configuration
-
-