Class ODFSkillsHelper

All Implemented Interfaces:
LogEnabled, Component, Serviceable

public class ODFSkillsHelper extends AbstractLogEnabled implements Serviceable, Component
ODF skills helper
  • Field Details

  • Constructor Details

  • Method Details

    • service

      public void service(ServiceManager manager) throws ServiceException
      Specified by:
      service in interface Serviceable
      Throws:
      ServiceException
    • isSkillsEnabled

      public static boolean isSkillsEnabled()
      Determines if rules are enabled
      Returns:
      true if rules are enabled
    • getCatalog

      public String getCatalog(String contentId)
      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

      public Map<String,Object> setProgramItemsExclusion(List<String> programItemIds, boolean excluded)
      Exclude or include the program items from skills display
      Parameters:
      programItemIds - the list of program item ids
      excluded - true if the program items need to be excluded.
      Returns:
      the map of changed program items properties
    • isExcluded

      public boolean isExcluded(ProgramItem programItem)
      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

      Get the skills distribution by courses over a AbstractProgram 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,Set<Content>>> getSkillsDistribution(AbstractProgram abstractProgram, int maxDepth)
      Get the skills distribution by courses over a AbstractProgram Distribution is computed over the course of first level only
      Parameters:
      abstractProgram - The program or subProgram for which to get the skills distribution
      maxDepth - 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,Set<Content>>> getSkillsDistribution(Program parentProgram, AbstractProgram program, int maxDepth)
      Get the skills distribution by courses over a ProgramItem
      Parameters:
      parentProgram - The parent program that contains the skills
      program - the program
      maxDepth - 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