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 ObservationManager
The observation managerprotected ODFHelper
The ODF helperprotected AmetysObjectResolver
The ametys object resolverstatic final String
The name of repeater for acquired skillsstatic final String
The avalon role.static final String
The skill content type idstatic final String
The skills other names attribute namestatic final String
The attribute name of the skills -
Constructor Summary
Constructors -
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
void
service
(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The avalon role. -
COURSES_REPEATER_ACQUIRED_SKILLS
The name of repeater for acquired skills- See Also:
-
SKILL_CONTENT_TYPE
The skill content type id- See Also:
-
SKILLS_ATTRIBUTE_NAME
The attribute name of the skills- See Also:
-
SKILL_OTHER_NAMES_ATTRIBUTE_NAME
The skills other names attribute name- See Also:
-
_contentWorkflowHelper
The content workflow helper -
_resolver
The ametys object resolver -
_odfHelper
The ODF helper -
_observationManager
The observation manager
-
-
Constructor Details
-
ODFSkillsHelper
public ODFSkillsHelper()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
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
-