Class OdfPageResolver

    • Method Detail

      • getReferencingPages

        public Set<PagegetReferencingPages​(ProgramItem programItem)
        Get all referencing pages for this program item, in all sites and all sitemaps
        Parameters:
        programItem - The program item
        Returns:
        the referencing pages
      • getReferencingPages

        public Set<PagegetReferencingPages​(ProgramItem programItem,
                                             String siteName,
                                             String lang)
        Get all referencing pages for this program item
        Parameters:
        programItem - The program item
        siteName - The site name. Can be null to search on all sites
        lang - The sitemap language. Can be null to search on all sitemaps
        Returns:
        the referencing pages
      • getProgramPage

        public ProgramPage getProgramPage​(Program program)
        Return the program page
        Parameters:
        program - the program
        Returns:
        the page program or null
      • getProgramPage

        public ProgramPage getProgramPage​(Program program,
                                          String siteName)
        Return the program page
        Parameters:
        program - the program
        siteName - The current site name. If the no ODF root page is present in this site, the default ODF site will be used instead.
        Returns:
        the page program or null
      • getProgramPage

        public ProgramPage getProgramPage​(Page odfRootPage,
                                          Program program)
        Return the program page
        Parameters:
        odfRootPage - the odf root page
        program - the program
        Returns:
        the page program or null
      • getSubProgramPage

        public ProgramPage getSubProgramPage​(SubProgram subProgram,
                                             AbstractProgram parentProgram,
                                             String siteName)
        Return the subprogram page
        Parameters:
        subProgram - the subprogram
        parentProgram - The parent program
        siteName - The current site name. If the no ODF root page is present in this site, the default ODF site will be used instead.
        Returns:
        the subprogram page or null
      • getSubProgramPage

        public ProgramPage getSubProgramPage​(Page odfRootPage,
                                             SubProgram subProgram,
                                             AbstractProgram parentAbstractProgram)
        Return the subprogram page
        Parameters:
        odfRootPage - the odf root page
        subProgram - the subprogram
        parentAbstractProgram - The parent program or subprogram
        Returns:
        the subprogram page or null
      • getCoursePage

        public CoursePage getCoursePage​(Course course,
                                        AbstractProgram parentProgram,
                                        String siteName)
        Return the course page
        Parameters:
        course - the course
        parentProgram - the parent program or subprogram. Can be null.
        siteName - The current site name. If the no ODF root page is present in this site, the default ODF site will be used instead.
        Returns:
        the course page or null if not found
      • getCoursePage

        public CoursePage getCoursePage​(Page odfRootPage,
                                        Course course,
                                        AbstractProgram parentAbstractProgram)
        Return the course page
        Parameters:
        odfRootPage - the odf root page
        course - the course
        parentAbstractProgram - the parent program or subprogram. Can be null.
        Returns:
        the course page or null if not found
      • getCoursePage

        public CoursePage getCoursePage​(Course course,
                                        Course parentCourse,
                                        String siteName)
        Return the course page
        Parameters:
        course - the course
        parentCourse - the parent course. Can NOT be null.
        siteName - The current site name. If the no ODF root page is present in this site, the default ODF site will be used instead.
        Returns:
        the course page or null if not found
      • getCoursePage

        public CoursePage getCoursePage​(Page odfRootPage,
                                        Course course,
                                        Course parentCourse)
        Return the course page
        Parameters:
        odfRootPage - the odf root page
        course - the course
        parentCourse - the parent course. Can NOT be null.
        Returns:
        the course page or null if not found
      • getOdfRootPage

        public Page getOdfRootPage​(String siteName,
                                   String language,
                                   String catalog)
        Get the ODF root page, either in the given site if it exists, or in the default ODF site.
        Parameters:
        siteName - the desired site name.
        language - the sitemap language to search in.
        catalog - The ODF catalog
        Returns:
        the ODF root page, either in the given site if it exists, or in the default ODF site.
      • getParentProgram

        public Program getParentProgram​(ProgramItem programItem,
                                        AbstractProgram parentProgram)
        Returns the first Program ancestor, ensuring that the given parent content 'parentProgram' is in the hierarchy, if not null.
        If 'parentProgram' is null, the first Program ancestor will be returned regardless of parent hierarchy.
        If 'parentProgram' is a SubProgram, the first Program ancestor from this SubProgram will be returned regardless of parent hierarchy
        Parameters:
        programItem - a ProgramItem
        parentProgram - The parent program or subprogram. Can be null.
        Returns:
        the parent Program into this (sub)program or null if not found
      • getProgramPagePath

        public String getProgramPagePath​(String siteName,
                                         String language,
                                         Program program)
        Get the path of a Program page from the Program content.
        Parameters:
        siteName - the site name.
        language - the language.
        program - the program.
        Returns:
        the page path or empty if no page matches
      • getProgramItemPagePath

        public String getProgramItemPagePath​(String siteName,
                                             String language,
                                             ProgramItem programItem,
                                             Program parentProgram)
        Get the path of a ProgramItem page into the given Program
        Parameters:
        siteName - the site name
        language - the language
        programItem - the subprogram.
        parentProgram - The parent program
        Returns:
        the page path or empty if no page matches