Class EducationalPathHelper

All Implemented Interfaces:
LogEnabled, Component, Serviceable

Helper for manipulating EducationalPath
  • Field Details

  • Constructor Details

  • Method Details

    • service

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

      public boolean isPartOfEducationalPath(ProgramItem... programItems) throws javax.jcr.RepositoryException
      Determines if program items is part of a same educational path value
      Parameters:
      programItems - the program items to search into a educational path value
      Returns:
      true if the program items is part of a educational path value
      Throws:
      javax.jcr.RepositoryException - if failed to get educational path nodes
    • isPartOfEducationalPath

      public boolean isPartOfEducationalPath(String... programItemIds) throws javax.jcr.RepositoryException
      Determines if program items is part of a same educational path value
      Parameters:
      programItemIds - the id of program items to search into a educational path value
      Returns:
      true if the program items is part of a educational path value
      Throws:
      javax.jcr.RepositoryException - if failed to get educational path nodes
    • getEducationalPathReferences

      public Map<ProgramItem,List<EducationalPathHelper.EducationalPathReference>> getEducationalPathReferences(ProgramItem... programItems) throws javax.jcr.RepositoryException
      Get the educational paths that reference the given program items
      Parameters:
      programItems - the referenced program items to search into a educational path
      Returns:
      a Map with program items referencing the given program items in a educational path attribute as key and the list of educational path references as value
      Throws:
      javax.jcr.RepositoryException - if an error occurred while retrieving educational path references
    • getEducationalPathReferences

      public Map<ProgramItem,List<EducationalPathHelper.EducationalPathReference>> getEducationalPathReferences(String... programItemIds) throws javax.jcr.RepositoryException
      Get the educational paths that reference the given program items
      Parameters:
      programItemIds - the id of program items to search into a educational path
      Returns:
      a Map with program items referencing the given program items in a educational path attribute as key and the list of educational path references as value
      Throws:
      javax.jcr.RepositoryException - if an error occurred while retrieving educational path references
    • removeEducationalPathReferences

      public void removeEducationalPathReferences(ProgramItem... programItems) throws javax.jcr.RepositoryException, com.opensymphony.workflow.WorkflowException
      Remove all repeater entries with a educational path that reference the given program items
      Parameters:
      programItems - the referenced program items to search into a educational path
      Throws:
      javax.jcr.RepositoryException - if an error occurred while retrieving educational path references
      com.opensymphony.workflow.WorkflowException - if failed to do workflow action on modified contents
    • removeEducationalPathReferences

      public void removeEducationalPathReferences(List<String> programItemIds) throws javax.jcr.RepositoryException, com.opensymphony.workflow.WorkflowException
      Remove all repeater entries with a educational path that reference the given program items
      Parameters:
      programItemIds - the id program items to search into a educational path
      Throws:
      javax.jcr.RepositoryException - if an error occurred while retrieving educational path references
      com.opensymphony.workflow.WorkflowException - if failed to do workflow action on modified contents
    • removeEducationalPathReferences

      public void removeEducationalPathReferences(int workflowActionId, String... programItemIds) throws javax.jcr.RepositoryException, com.opensymphony.workflow.WorkflowException
      Remove all repeater entries with a educational path that reference the given program items
      Parameters:
      workflowActionId - The id of the workflow action to do
      programItemIds - the ids of program items to search into a educational path
      Throws:
      javax.jcr.RepositoryException - if an error occurred while retrieving educational path references
      com.opensymphony.workflow.WorkflowException - if failed to do workflow action on modified contents
    • removeAllRepeatersWithEducationalPath

      public void removeAllRepeatersWithEducationalPath(ProgramItem programItem) throws com.opensymphony.workflow.WorkflowException
      Remove all repeaters with a educational path in their model
      Parameters:
      programItem - the program item
      Throws:
      com.opensymphony.workflow.WorkflowException - if failed to do workflow action on modified contents