Package org.ametys.odf.ose.export.utils
Class ElementRetriever
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.odfpilotage.helper.PilotageHelper
-
- org.ametys.odf.ose.export.utils.ElementRetriever
-
- All Implemented Interfaces:
LogEnabled
,Initializable
,Component
,Serviceable
public class ElementRetriever extends PilotageHelper
A retriever used like a helper to retrieve some ODF elements from ODF items.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ametys.plugins.odfpilotage.helper.PilotageHelper
PilotageHelper.StepHolderStatus
-
-
Field Summary
Fields Modifier and Type Field Description protected AmetysObjectResolver
_resolver
The resolverstatic String
ROLE
Avalon Role-
Fields inherited from class org.ametys.plugins.odfpilotage.helper.PilotageHelper
_cacheManager, _odfHelper, _refTableHelper, _STEP_HOLDERS_BY_ITEM_CACHE_ID, MCC_MODALITE_SESSION1, MCC_MODALITE_SESSION2, MCC_SESSION_NATURE, NORME
-
-
Constructor Summary
Constructors Constructor Description ElementRetriever()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Set<Container>
_getStepsToCache(ProgramItem programItem, String yearId, Cache<String,Set<Container>> cache)
Get the steps to add to the cache.Optional<String>
getSemesterId()
Get the semester container nature identifier.Set<Container>
getSteps(ProgramItem programItem)
Get the steps of a program itemvoid
initialize()
Set<OdfReferenceTableEntry>
retrieveDegree(Container container)
Retrieve the degrees of a givenContainer
Set<OrgUnit>
retrieveOrgUnits(ProgramItem programItem)
Retrieve theOrgUnit
s of a givenProgramItem
Set<OdfReferenceTableEntry>
retrievePeriodTypes(ProgramItem programItem)
Get the potential period types of the program item.Set<Container>
retrieveStepsHolder(ProgramItem programItem)
Get the potential steps holder of the program item.void
service(ServiceManager manager)
-
Methods inherited from class org.ametys.plugins.odfpilotage.helper.PilotageHelper
_getSteps, _getStepsHolder, _isContainerOfNature, getStepHolder, getYearId, transformEqTD2Double
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_resolver
protected AmetysObjectResolver _resolver
The resolver
-
-
Constructor Detail
-
ElementRetriever
public ElementRetriever()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classPilotageHelper
- Throws:
ServiceException
-
initialize
public void initialize() throws Exception
- Specified by:
initialize
in interfaceInitializable
- Overrides:
initialize
in classPilotageHelper
- Throws:
Exception
-
getSteps
public Set<Container> getSteps(ProgramItem programItem)
Description copied from class:PilotageHelper
Get the steps of a program item- Overrides:
getSteps
in classPilotageHelper
- Parameters:
programItem
- The program item- Returns:
- The steps of the given program item
-
_getStepsToCache
protected Set<Container> _getStepsToCache(ProgramItem programItem, String yearId, Cache<String,Set<Container>> cache)
Description copied from class:PilotageHelper
Get the steps to add to the cache.- Overrides:
_getStepsToCache
in classPilotageHelper
- Parameters:
programItem
- The program item to search onyearId
- The identifier of the year container naturecache
- The cache- Returns:
- A
Set
ofContainer
corresponding to the steps of the given program item.
-
retrieveOrgUnits
public Set<OrgUnit> retrieveOrgUnits(ProgramItem programItem)
Retrieve theOrgUnit
s of a givenProgramItem
- Parameters:
programItem
- The program item- Returns:
- the
OrgUnit
s of the given program item
-
retrieveDegree
public Set<OdfReferenceTableEntry> retrieveDegree(Container container)
Retrieve the degrees of a givenContainer
- Parameters:
container
- The container- Returns:
- the degrees of the given container
-
retrieveStepsHolder
public Set<Container> retrieveStepsHolder(ProgramItem programItem)
Get the potential steps holder of the program item. A step is a container of year type and it can be set manually on intermediate courses.- Parameters:
programItem
- TheProgramItem
on which we have to retrieve the potential steps holder- Returns:
- the potential steps holder of the program item
-
retrievePeriodTypes
public Set<OdfReferenceTableEntry> retrievePeriodTypes(ProgramItem programItem)
Get the potential period types of the program item. It can be retrieved on courses or containers. The algorithm doesn't search in the parent of semester containers.- Parameters:
programItem
- TheProgramItem
on which we have to retrieve the potential period types- Returns:
- the potential period types of the program item
-
getSemesterId
public Optional<String> getSemesterId()
Get the semester container nature identifier.- Returns:
- an
Optional
of the semester identifier
-
-