Package org.ametys.odf.skill
Class ODFSkillsHelper
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.odf.skill.ODFSkillsHelper
- All Implemented Interfaces:
LogEnabled
,Component
,Serviceable
ODF skills helper
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ContentWorkflowHelper
The content workflow helperprotected CurrentUserProvider
The current user providerprotected ObservationManager
The observation managerprotected ODFHelper
The ODF helperprotected AmetysObjectResolver
The ametys object resolverprotected SolrIndexHelper
The Solr index helperstatic final String
The avalon role.static final String
The internal attribute name to excluded from skills -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCatalog
(String contentId) Get the name of the catalog of a skill contentgetMicroSkills
(String catalog) Get all micro skills of a requested catalogGet the path of the ODF root contentgetSkillsDistribution
(AbstractProgram abstractProgram) Get the skills distribution by courses over aAbstractProgram
Distribution is computed over the course of first level onlygetSkillsDistribution
(AbstractProgram abstractProgram, int maxDepth) Get the skills distribution by courses over aAbstractProgram
Distribution is computed over the course of first level onlygetSkillsDistribution
(Program parentProgram, AbstractProgram program, int maxDepth) Get the skills distribution by courses over aProgramItem
boolean
isExcluded
(ProgramItem programItem) true
if the program item is excluded from skills displaystatic boolean
Determines if rules are enabledvoid
service
(ServiceManager manager) setProgramItemsExclusion
(List<String> programItemIds, boolean excluded) Exclude or include the program items from skills displayMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The avalon role. -
SKILLS_EXCLUDED_INTERNAL_ATTRIBUTE_NAME
The internal attribute name to excluded from skills- See Also:
-
_contentWorkflowHelper
The content workflow helper -
_resolver
The ametys object resolver -
_odfHelper
The ODF helper -
_observationManager
The observation manager -
_solrIndexHelper
The Solr index helper -
_currentUserProvider
The current user provider
-
-
Constructor Details
-
ODFSkillsHelper
public ODFSkillsHelper()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
isSkillsEnabled
Determines if rules are enabled- Returns:
true
if rules are enabled
-
getCatalog
Get the name of the catalog of a skill content- Parameters:
contentId
- The id of content- Returns:
- The catalog's name or null if the content does not have a catalog
-
getOdfRootContentPath
Get the path of the ODF root content- Returns:
- The path of the ODF root content
-
setProgramItemsExclusion
Exclude or include the program items from skills display- Parameters:
programItemIds
- the list of program item idsexcluded
-true
if the program items need to be excluded.- Returns:
- the map of changed program items properties
-
isExcluded
true
if the program item is excluded from skills display- Parameters:
programItem
- the program item- Returns:
true
if the program item is excluded from skills display
-
getSkillsDistribution
public Map<Content,Map<Content, getSkillsDistributionSet<Content>>> (AbstractProgram abstractProgram) Get the skills distribution by courses over aAbstractProgram
Distribution is computed over the course of first level only- Parameters:
abstractProgram
- The program or subProgram for which to get the skills distribution- Returns:
- the skills distribution or null if the content is not a program or a compatible subProgram
-
getSkillsDistribution
public Map<Content,Map<Content, getSkillsDistributionSet<Content>>> (AbstractProgram abstractProgram, int maxDepth) Get the skills distribution by courses over aAbstractProgram
Distribution is computed over the course of first level only- Parameters:
abstractProgram
- The program or subProgram for which to get the skills distributionmaxDepth
- the max depth of courses. For example, set to 1 to compute distribution over UE only, set 2 to compute distribution over UE and EC, ...- Returns:
- the skills distribution or null if the content is not a program or a compatible subProgram
-
getSkillsDistribution
public Map<Content,Map<Content, getSkillsDistributionSet<Content>>> (Program parentProgram, AbstractProgram program, int maxDepth) Get the skills distribution by courses over aProgramItem
- Parameters:
parentProgram
- The parent program that contains the skillsprogram
- the programmaxDepth
- the max depth of courses. For example, set to 1 to compute distribution over UE only, set 2 to compute distribution over UE and EC, ...- Returns:
- the skills distribution as Map<MacroSkill, Map<MicroSkill, Set<Course>>>
-
getMicroSkills
Get all micro skills of a requested catalog- Parameters:
catalog
- The catalog- Returns:
- The micro skills
-