Class ProgramSaxer
- java.lang.Object
-
- org.ametys.web.frontoffice.search.metamodel.impl.PageSaxer
-
- org.ametys.plugins.odfweb.service.search.ProgramSaxer
-
- All Implemented Interfaces:
ReturnableSaxer
public class ProgramSaxer extends PageSaxer
-
-
Field Summary
Fields Modifier and Type Field Description private ProgramReturnable.DisplaySubprogramMode_displaySubprogramModeprivate ProgramReturnable_programReturnable-
Fields inherited from class org.ametys.web.frontoffice.search.metamodel.impl.PageSaxer
_pageReturnable
-
-
Constructor Summary
Constructors Constructor Description ProgramSaxer(PageReturnable pageReturnable, ProgramReturnable programReturnable, ProgramReturnable.DisplaySubprogramMode displaySubprogramMode)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private String_getSubProgramPagePath(Page subProgramPage, String programPath)private Optional<ProgramPage>_resolveProgramPage(Program program, Site currentSite)private Optional<Page>_resolveSubProgramPage(Program program, Optional<ProgramPage> programPage, SubProgram subProgram)private void_saxProgramPage(ContentHandler contentHandler, ProgramPage programPage, org.slf4j.Logger logger, SearchComponentArguments args)private void_saxProgramWithNoPage(ContentHandler contentHandler, Program program, String sitemapName, org.slf4j.Logger logger)booleancanSax(AmetysObject hit, org.slf4j.Logger logger, SearchComponentArguments args)Returnstrueif this saxer is able to SAX the given search hitvoidsax(ContentHandler contentHandler, AmetysObject hit, org.slf4j.Logger logger, SearchComponentArguments args)SAX the given search hitprotected voidsaxSubProgram(ContentHandler contentHandler, SubProgram subProgram, Program program, Optional<ProgramPage> programPage, boolean matchSearch, Optional<String> programPath, org.slf4j.Logger logger, View view)SAX the subprogramprotected voidsaxSubPrograms(ContentHandler contentHandler, Program program, Optional<ProgramPage> programPage, org.slf4j.Logger logger, Request request)SAX the subprograms of the program-
Methods inherited from class org.ametys.web.frontoffice.search.metamodel.impl.PageSaxer
saxContent, saxRichTextExcerpt
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ametys.web.frontoffice.search.metamodel.ReturnableSaxer
getIdentifier
-
-
-
-
Field Detail
-
_programReturnable
private ProgramReturnable _programReturnable
-
_displaySubprogramMode
private ProgramReturnable.DisplaySubprogramMode _displaySubprogramMode
-
-
Constructor Detail
-
ProgramSaxer
public ProgramSaxer(PageReturnable pageReturnable, ProgramReturnable programReturnable, ProgramReturnable.DisplaySubprogramMode displaySubprogramMode)
Constructor- Parameters:
pageReturnable- The page returnable (needed for superclass)programReturnable- The associated returnable on programsdisplaySubprogramMode- The mode for displaying (or not) subprograms
-
-
Method Detail
-
canSax
public boolean canSax(AmetysObject hit, org.slf4j.Logger logger, SearchComponentArguments args)
Description copied from interface:ReturnableSaxerReturnstrueif this saxer is able to SAX the given search hit- Specified by:
canSaxin interfaceReturnableSaxer- Overrides:
canSaxin classPageSaxer- Parameters:
hit- The search hitlogger- A loggerargs- The other arguments- Returns:
trueif this saxer is able to SAX the given search hit
-
sax
public void sax(ContentHandler contentHandler, AmetysObject hit, org.slf4j.Logger logger, SearchComponentArguments args) throws SAXException
Description copied from interface:ReturnableSaxerSAX the given search hit- Specified by:
saxin interfaceReturnableSaxer- Overrides:
saxin classPageSaxer- Parameters:
contentHandler- The content handlerhit- The search hitlogger- A loggerargs- The other arguments- Throws:
SAXException- if a SAX error occured
-
_resolveProgramPage
private Optional<ProgramPage> _resolveProgramPage(Program program, Site currentSite)
-
_resolveSubProgramPage
private Optional<Page> _resolveSubProgramPage(Program program, Optional<ProgramPage> programPage, SubProgram subProgram)
-
_getSubProgramPagePath
private String _getSubProgramPagePath(Page subProgramPage, String programPath)
-
_saxProgramWithNoPage
private void _saxProgramWithNoPage(ContentHandler contentHandler, Program program, String sitemapName, org.slf4j.Logger logger) throws SAXException
- Throws:
SAXException
-
_saxProgramPage
private void _saxProgramPage(ContentHandler contentHandler, ProgramPage programPage, org.slf4j.Logger logger, SearchComponentArguments args) throws SAXException
- Throws:
SAXException
-
saxSubPrograms
protected void saxSubPrograms(ContentHandler contentHandler, Program program, Optional<ProgramPage> programPage, org.slf4j.Logger logger, Request request) throws SAXException
SAX the subprograms of the program- Parameters:
contentHandler- The content handlerprogram- The programprogramPage- The program pagelogger- A loggerrequest- The request- Throws:
SAXException- if a SAX error occured
-
saxSubProgram
protected void saxSubProgram(ContentHandler contentHandler, SubProgram subProgram, Program program, Optional<ProgramPage> programPage, boolean matchSearch, Optional<String> programPath, org.slf4j.Logger logger, View view) throws SAXException
SAX the subprogram- Parameters:
contentHandler- The content handlersubProgram- The subProgramprogram- The programprogramPage- The program pagematchSearch-trueif the subprogram matches the searchprogramPath- The program pathlogger- A loggerview- The view- Throws:
SAXException- if a SAX error occured
-
-