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 ContentWorkflowHelperThe content workflow helperprotected CurrentUserProviderThe current user providerprotected ObservationManagerThe observation managerprotected ODFHelperThe ODF helperprotected AmetysObjectResolverThe ametys object resolverprotected SolrIndexHelperThe Solr index helperstatic final StringThe avalon role.static final StringThe skills other names attribute namestatic final StringThe internal attribute name to excluded from 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 filevoidcreateSkillsFromESCOFileCSV(String skillsCSVFilePath) Create all skills from ESCO filegetComputedSkills(AbstractProgram abstractProgram, int maxDepth) Get the computed skill values for a givenAbstractProgramgetSkillsDistribution(ProgramItem programItem) Get the skills distribution by courses over aProgramItemDistribution is computed over the course of first level onlygetSkillsDistribution(ProgramItem programItem, int maxDepth) Get the skills distribution by courses over aProgramItembooleanisExcluded(ProgramItem programItem) trueif the program item is excluded from skills displayvoidservice(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:
servicein interfaceServiceable- Throws:
ServiceException
-
setProgramItemsExclusion
Exclude or include the program items from skills display- Parameters:
programItemIds- the list of program item idsexcluded-trueif the program items need to be excluded.- Returns:
- the map of changed program items properties
-
isExcluded
trueif the program item is excluded from skills display- Parameters:
programItem- the program item- Returns:
trueif 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 aProgramItemDistribution 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
-