java.lang.Object
org.ametys.web.frontoffice.search.metamodel.impl.PageSaxer
All Implemented Interfaces:
ReturnableSaxer
Direct Known Subclasses:
CourseSaxer, ProgramSaxer, UserPageReturnable.UserSaxer

public class PageSaxer extends Object implements ReturnableSaxer
  • Field Details

  • Constructor Details

    • PageSaxer

      public PageSaxer(PageReturnable pageReturnable)
      Constructor
      Parameters:
      pageReturnable - The associated returnable on pages
  • Method Details

    • canSax

      public boolean canSax(AmetysObject hit, Logger logger, SearchComponentArguments args)
      Description copied from interface: ReturnableSaxer
      Returns true if this saxer is able to SAX the given search hit
      Specified by:
      canSax in interface ReturnableSaxer
      Parameters:
      hit - The search hit
      logger - A logger
      args - The other arguments
      Returns:
      true if this saxer is able to SAX the given search hit
    • sax

      public void sax(ContentHandler contentHandler, AmetysObject hit, Logger logger, SearchComponentArguments args) throws SAXException
      Description copied from interface: ReturnableSaxer
      SAX the given search hit
      Specified by:
      sax in interface ReturnableSaxer
      Parameters:
      contentHandler - The content handler
      hit - The search hit
      logger - A logger
      args - The other arguments
      Throws:
      SAXException - if a SAX error occured
    • saxContent

      protected void saxContent(Content content, String viewName, Locale defaultLocale, ContentHandler contentHandler, Logger logger) throws SAXException
      SAX the view of a content if exists
      Parameters:
      content - the content
      viewName - The name of view to sax
      defaultLocale - The locale to use to sax localized values such as multilingual content or multilingual string. Only use if initial content's language is not null.
      contentHandler - The content handler
      logger - The logger
      Throws:
      SAXException - if an exception occurs while saxing
    • saxRichTextExcerpt

      protected void saxRichTextExcerpt(String path, String contentId, Object richText, ContentHandler contentHandler, Logger logger)
      SAX excerpt for rich text
      Parameters:
      path - The richText path
      contentId - The content id
      richText - The rich text
      contentHandler - The content handler
      logger - The logger