Package org.ametys.web.inputdata
Interface InputData
- All Known Implementing Classes:
ActivityStreamInputData
,CourseInputData
,FilteredContentsInputData
,FilteredPagesInputData
,LinkDirectoryInputData
,SitemapInputData
,TranslationsInputData
,UserInputData
public interface InputData
Abstraction for providing data at view-time by SAXing events.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isCacheable
(Site site, Page page) Returns true if thisInputData
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 centralPageElementCache
.
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 ifisCacheable(Site, Page)
returns true.void
toSAX
(ContentHandler handler) Generates SAX events for providing data.
-
Method Details
-
isCacheable
Returns true if thisInputData
is cacheable for the current site and if possible page. -
shouldBeCached
Returns true if the resulting SAX events should be actually stored in the centralPageElementCache
.
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 ifisCacheable(Site, Page)
returns true.- Parameters:
site
- the currentSite
.page
- the currentPage
. 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.
-