Package org.ametys.web.inputdata
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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description boolean
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 Detail
-
isCacheable
boolean isCacheable(Site site, Page page)
Returns true if thisInputData
is cacheable for the current site and if possible page.
-
shouldBeCached
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.- 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
void toSAX(ContentHandler handler) throws SAXException, ProcessingException
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.
-
-