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 ContentDAOThe content daoprotected ContentTypesHelperThe content types helperprotected CurrentUserProviderThe current user providerprotected ObservationManagerThe observation managerprotected ODFHelperThe ODF helperprotected AmetysObjectResolverThe ametys object resolverprotected RightManagerThe right managerprotected SolrIndexHelperThe Solr index helperstatic final StringThe right to edit, create or import disciplinary skillsstatic final StringThe right to export all skillsstatic final StringThe right to add skills to programsstatic final StringThe right to edit, create, delete or import transversal skillsstatic final StringThe avalon role.static final StringThe internal attribute name to excluded from skills -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Set<ContentValue> _getReferencedMicroSkills(String programId, ProgramItem programItem) Recursively get the micro skills referencd in given program item for the programforceTrashTransversalMacroSkills(List<String> contentIds) Trash transversal macro skillsgetMicroSkills(String catalog) Get all micro skills of a requested catalogGet the path of the ODF root contentgetProgramMicroSkills(Program program) Get the micro skills of a programgetReferencedMicroSkills(Program program) Get the micro skills linked to courses under a programgetSkillsDistribution(AbstractProgram abstractProgram) Get the skills distribution by courses over aAbstractProgramDistribution is computed over the course of first level onlygetSkillsDistribution(AbstractProgram abstractProgram, int maxDepth) Get the skills distribution by courses over aAbstractProgramDistribution is computed over the course of first level onlygetSkillsDistribution(Program parentProgram, AbstractProgram program, int maxDepth) Get the skills distribution by courses over aProgramItembooleanisExcluded(ProgramItem programItem) trueif the program item is excluded from skills displaystatic booleanDetermines if rules are enabledvoidservice(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:
-
RIGHT_TRANSVERSAL_SKILLS_HANDLE
The right to edit, create, delete or import transversal skills- See Also:
-
RIGHT_DISCIPLINARY_SKILLS_HANDLE
The right to edit, create or import disciplinary skills- See Also:
-
RIGHT_SKILLS_PROGRAM_FIELDS
The right to add skills to programs- See Also:
-
RIGHT_SKILLS_EXPORT
The right to export all skills- See Also:
-
_resolver
The ametys object resolver -
_contentTypesHelper
The content types helper -
_contentDao
The content dao -
_odfHelper
The ODF helper -
_observationManager
The observation manager -
_solrIndexHelper
The Solr index helper -
_currentUserProvider
The current user provider -
_rightManager
The right manager
-
-
Constructor Details
-
ODFSkillsHelper
public ODFSkillsHelper()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
isSkillsEnabled
Determines if rules are enabled- Returns:
trueif rules are enabled
-
getOdfRootContentPath
Get the path of the ODF root content- Returns:
- The path of the ODF root content
-
forceTrashTransversalMacroSkills
Trash transversal macro skills- Parameters:
contentIds- The macro skill ids- Returns:
- the deleted and undeleted contents
-
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
-
getSkillsDistribution
public Map<Content,Map<Content, getSkillsDistributionSet<Content>>> (AbstractProgram abstractProgram) Get the skills distribution by courses over aAbstractProgramDistribution 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 aAbstractProgramDistribution 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
-
getProgramMicroSkills
Get the micro skills of a program- Parameters:
program- The program- Returns:
- The microskills attached to the program
-
getReferencedMicroSkills
Get the micro skills linked to courses under a program- Parameters:
program- The program- Returns:
- The micro skills
-
_getReferencedMicroSkills
Recursively get the micro skills referencd in given program item for the program- Parameters:
programId- The id of the program to checkprogramItem- The program item in which to check the micro skills- Returns:
- The set of micro skills referenced in program item
-