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
Modifier 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 skills other names attribute namestatic final String
The internal attribute name to excluded from skills -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
_createSkillTableRef
(org.ametys.odf.skill.ODFSkillsHelper.Skill skill) Create a skill table ref content from the skill objectprotected List<org.ametys.odf.skill.ODFSkillsHelper.Skill>
_getSkillsFromCSVFile
(String skillsCSVFilePath) Get the list of skills from the csv filevoid
createSkillsFromESCOFileCSV
(String skillsCSVFilePath) Create all skills from ESCO filegetComputedSkills
(AbstractProgram abstractProgram, int maxDepth) Get the computed skill values for a givenAbstractProgram
getSkillsDistribution
(ProgramItem programItem) Get the skills distribution by courses over aProgramItem
Distribution is computed over the course of first level onlygetSkillsDistribution
(ProgramItem programItem, int maxDepth) Get the skills distribution by courses over aProgramItem
boolean
isExcluded
(ProgramItem programItem) true
if the program item is excluded from skills displayvoid
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. -
SKILL_OTHER_NAMES_ATTRIBUTE_NAME
The skills other names attribute name- See Also:
-
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
-
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
-
getComputedSkills
Get the computed skill values for a givenAbstractProgram
- Parameters:
abstractProgram
- the abstract programmaxDepth
- the max depth of courses. For example, set to 1 to compute skills over UE only, set 2 to compute skills over UE and EC, ...- Returns:
- the skill values computed from the attached courses
-
getSkillsDistribution
public Map<Content,Map<Content, getSkillsDistributionMap<Content, Content>>> (ProgramItem programItem) Get the skills distribution by courses over aProgramItem
Distribution is computed over the course of first level only- Parameters:
programItem
- the program item- Returns:
- the skills distribution
-
getSkillsDistribution
public Map<Content,Map<Content, getSkillsDistributionMap<Content, Content>>> (ProgramItem programItem, int maxDepth) Get the skills distribution by courses over aProgramItem
- Parameters:
programItem
- the program itemmaxDepth
- 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<SkillSet, Map<Skill, Map<Course, AcquisitionLevel>>>
-
createSkillsFromESCOFileCSV
Create all skills from ESCO file- Parameters:
skillsCSVFilePath
- the skills CSV file path
-
_getSkillsFromCSVFile
protected List<org.ametys.odf.skill.ODFSkillsHelper.Skill> _getSkillsFromCSVFile(String skillsCSVFilePath) Get the list of skills from the csv file- Parameters:
skillsCSVFilePath
- the skills CSV file path- Returns:
- the list of skills
-
_createSkillTableRef
protected void _createSkillTableRef(org.ametys.odf.skill.ODFSkillsHelper.Skill skill) throws AmetysRepositoryException, com.opensymphony.workflow.WorkflowException Create a skill table ref content from the skill object- Parameters:
skill
- the skill object- Throws:
AmetysRepositoryException
- if a repository error occurredcom.opensymphony.workflow.WorkflowException
- if a workflow error occurred
-