Interface InputData

All Known Implementing Classes:
CourseInputData, FilteredContentsInputData, FilteredPagesInputData, LinkDirectoryInputData, SitemapInputData, TranslationsInputData, UserInputData

public interface InputData
Abstraction for providing data at view-time by SAXing events.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isCacheable(Site site, Page page)
    Returns true if this InputData is cacheable for the current site and if possible page.
    default boolean
    shouldBeCached(Site site, Page page)
    Returns true if the resulting SAX events should be actually stored in the central PageElementCache.
    It may be useful to return false for some InputData managing their own cache and don't wanting to waste space in the central cache.
    This method is only called if isCacheable(Site, Page) returns true.
    void
    Generates SAX events for providing data.
  • Method Details

    • isCacheable

      boolean isCacheable(Site site, Page page)
      Returns true if this InputData is cacheable for the current site and if possible page.
      Parameters:
      site - the current Site.
      page - the current Page. Can be null.
      Returns:
      true if this InputData is cacheable for the current site or page.
    • shouldBeCached

      default boolean shouldBeCached(Site site, Page page)
      Returns true if the resulting SAX events should be actually stored in the central PageElementCache.
      It may be useful to return false for some InputData managing their own cache and don't wanting to waste space in the central cache.
      This method is only called if isCacheable(Site, Page) returns true.
      Parameters:
      site - the current Site.
      page - the current Page. Can be null.
      Returns:
      true if the content is cacheable and should be stored in the PageElementCache.
    • toSAX

      Generates SAX events for providing data.
      Parameters:
      handler - the content handler to SAX into.
      Throws:
      SAXException - if an error occurs while SAXing.
      ProcessingException - if an error occurs during processing.