public class SitemapInputData extends AbstractLogEnabled implements InputData, Contextualizable, Configurable, Serviceable
InputData
for SAXing events about the current sitemap.Modifier and Type | Field and Description |
---|---|
protected Context |
_context
Avalon context.
|
protected CurrentUserProvider |
_currentUserProvider
The current user provider
|
protected int |
_descendantDepth
Configured descendant depth.
|
protected int |
_initialDepth
Configured initial depth.
|
protected RenderingContextHandler |
_renderingContextHandler
The rendering context handler.
|
protected RightManager |
_rightManager
The right manager
|
protected SiteManager |
_siteManager
CMS Sites manager
|
static String |
NAMESPACE_PREFIX
Prefix for sitemap namespace.
|
static String |
NAMESPACE_URI
URI for sitemap namespace.
|
private static int |
PATH_CURRENT |
private static int |
PATH_DESCENDANT |
private static int |
PATH_IN_PATH |
private static int |
PATH_NOT_IN_PATH |
Constructor and Description |
---|
SitemapInputData() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
_processPage(Page page)
Determine if the page will be processed.
Default implementation returns true. |
protected int |
_saxCurrentStatus(String currentPagePath,
String pagePath,
AttributesImpl attrs)
SAX current status.
|
protected void |
_saxMetadatas(Page page,
AttributesImpl attrs)
SAX metadatas.
|
protected void |
_saxPage(ContentHandler handler,
String currentPagePath,
int currentDepth,
int descendantDepth,
RestrictedPagePolicy policy,
UserIdentity userIdentity,
Page page)
Sax a page
|
protected void |
_saxPages(ContentHandler handler,
PagesContainer composite,
String currentPagePath,
int currentDepth,
int descendantDepth,
RestrictedPagePolicy policy,
UserIdentity userIdentity)
SAX pages.
|
protected void |
_saxTags(Page page,
AttributesImpl attrs)
SAX metadatas.
|
void |
configure(Configuration configuration) |
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. |
void |
service(ServiceManager manager) |
void |
toSAX(ContentHandler handler)
Generates SAX events for providing data.
|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
public static final String NAMESPACE_PREFIX
public static final String NAMESPACE_URI
private static final int PATH_DESCENDANT
private static final int PATH_NOT_IN_PATH
private static final int PATH_IN_PATH
private static final int PATH_CURRENT
protected int _initialDepth
protected int _descendantDepth
protected SiteManager _siteManager
protected RightManager _rightManager
protected RenderingContextHandler _renderingContextHandler
protected CurrentUserProvider _currentUserProvider
public SitemapInputData()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
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 handler) throws SAXException, ProcessingException
InputData
toSAX
in interface InputData
handler
- the content handler to SAX into.SAXException
- if an error occurs while SAXing.ProcessingException
- if an error occurs during processing.protected void _saxPages(ContentHandler handler, PagesContainer composite, String currentPagePath, int currentDepth, int descendantDepth, RestrictedPagePolicy policy, UserIdentity userIdentity) throws SAXException, AmetysRepositoryException
handler
- the content handler to SAX into.composite
- the pages container.currentPagePath
- the path to the current page.currentDepth
- the current depth.descendantDepth
- the descendant depth.policy
- the site's RestrictedPagePolicy
.userIdentity
- the current front-office's user.SAXException
- if an error occurs while SAXing.AmetysRepositoryException
- if an error occurs.protected void _saxPage(ContentHandler handler, String currentPagePath, int currentDepth, int descendantDepth, RestrictedPagePolicy policy, UserIdentity userIdentity, Page page) throws SAXException
handler
- the content handler to sax intocurrentPagePath
- The path of current pagecurrentDepth
- The depth of current pagedescendantDepth
- The descendant depthpolicy
- the restricted page policyuserIdentity
- the user identitypage
- the pageSAXException
- if an error occurs while saxingprotected boolean _processPage(Page page) throws AmetysRepositoryException
page
- the page.true
if the page will be proceed, false
otherwise.AmetysRepositoryException
- if an error occurs.protected void _saxMetadatas(Page page, AttributesImpl attrs) throws AmetysRepositoryException
page
- the page.attrs
- the attributes to populate.AmetysRepositoryException
- if an error occurs.protected void _saxTags(Page page, AttributesImpl attrs) throws AmetysRepositoryException
page
- the page.attrs
- the attributes to populate.AmetysRepositoryException
- if an error occurs.protected int _saxCurrentStatus(String currentPagePath, String pagePath, AttributesImpl attrs)
currentPagePath
- the path to the current page.pagePath
- the path to the page to process.attrs
- the attributes to populate.