public class FilteredPagesInputData extends AbstractLogEnabled implements InputData, Serviceable, Contextualizable, ThreadSafe, PluginAware
Modifier and Type | Field and Description |
---|---|
protected Context |
_context
The avalon context.
|
protected CurrentUserProvider |
_currentUserProvider
The current user provider
|
protected String |
_pluginName
The plugin name
|
protected RenderingContextHandler |
_renderingContextHandler
The rendering context handler.
|
protected AmetysObjectResolver |
_resolver
The repository
|
protected RightManager |
_rightManager
The right manager
|
protected SiteManager |
_siteManager
The ametys sites manager
|
protected SourceResolver |
_sourceResolver
The source resolver
|
Constructor and Description |
---|
FilteredPagesInputData() |
Modifier and Type | Method and Description |
---|---|
protected List<PageFilter> |
configureFilters()
Retrieves the configured filters
|
void |
contextualize(Context context) |
boolean |
isCacheable(Site site,
Page page)
Returns true if this
InputData is cacheable for the current site and if possible page. |
protected boolean |
isPageAccessible(Page page)
Test the page accessible by the current user.
|
protected void |
saxFilter(ContentHandler contentHandler,
PageFilter filter,
String siteName,
String lang,
Page currentPage)
SAX a filter
|
protected void |
saxPage(ContentHandler contentHandler,
Page page)
SAX a page
|
void |
service(ServiceManager smanager) |
void |
setPluginInfo(String pluginName,
String featureName,
String id)
Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level. |
void |
toSAX(ContentHandler contentHandler)
Generates SAX events for providing data.
|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
shouldBeCached
protected String _pluginName
protected SourceResolver _sourceResolver
protected AmetysObjectResolver _resolver
protected RightManager _rightManager
protected SiteManager _siteManager
protected RenderingContextHandler _renderingContextHandler
protected CurrentUserProvider _currentUserProvider
public FilteredPagesInputData()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
ServiceException
public boolean isCacheable(Site site, Page page)
InputData
InputData
is cacheable for the current site and if possible page.isCacheable
in interface InputData
site
- the current Site
.page
- the current Page
. Can be null.InputData
is cacheable for the current site or page.public void toSAX(ContentHandler contentHandler) throws SAXException, ProcessingException
InputData
toSAX
in interface InputData
contentHandler
- the content handler to SAX into.SAXException
- if an error occurs while SAXing.ProcessingException
- if an error occurs during processing.protected void saxFilter(ContentHandler contentHandler, PageFilter filter, String siteName, String lang, Page currentPage) throws SAXException, IOException
contentHandler
- The content handlerfilter
- The filter to SAXsiteName
- The current site namelang
- The current languagecurrentPage
- The current pageSAXException
- If an errors occurs while SAXingIOException
- If an errors occursprotected boolean isPageAccessible(Page page)
page
- the pageprotected List<PageFilter> configureFilters() throws ProcessingException
ProcessingException
- If an error occurred while parsing the file.protected void saxPage(ContentHandler contentHandler, Page page) throws SAXException, AmetysRepositoryException
contentHandler
- The content handlerpage
- The page to SAXSAXException
- if an error occurs while saxingAmetysRepositoryException
- if failed to get page's propertiespublic void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public void setPluginInfo(String pluginName, String featureName, String id)
PluginAware
setPluginInfo
in interface PluginAware
pluginName
- Unique identifier for the plugin hosting the extensionfeatureName
- Unique feature identifier (unique for a given pluginName)id
- Unique identifier of this component