public class SitemapSaxer extends AbstractLogEnabled implements Serviceable, Component
Modifier and Type | Class and Description |
---|---|
(package private) class |
SitemapSaxer.BufferedPage |
(package private) static interface |
SitemapSaxer.PageWrapper |
(package private) class |
SitemapSaxer.RepositoryPage |
Modifier and Type | Field and Description |
---|---|
private Map<String,Map<String,Map<String,Map<RenderingContext,List<SitemapSaxer.BufferedPage>>>>> |
_bufferedPages |
private CurrentUserProvider |
_currentUserProvider |
private RenderingContextHandler |
_renderingContextHandler |
(package private) RightManager |
_rightManager |
private SiteManager |
_siteManager |
private WorkspaceSelector |
_workspaceSelector |
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 |
static String |
ROLE
Avalon role.
|
Constructor and Description |
---|
SitemapSaxer() |
Modifier and Type | Method and Description |
---|---|
private List<SitemapSaxer.BufferedPage> |
_fill(AmetysObjectIterable<? extends Page> pages) |
(package private) Map<String,String> |
_getAttributes(Page page) |
(package private) Map<String,String> |
_getInternalAttributes(Page page) |
protected int |
_saxCurrentStatus(String currentPagePath,
String pagePath,
AttributesImpl attrs)
SAX current status.
|
private void |
_saxPage(ContentHandler handler,
SitemapSaxer.PageWrapper page,
Page currentPage,
String currentPagePath,
UserIdentity userIdentity,
RenderingContext renderingContext,
RestrictedPagePolicy policy,
int initialDepth,
int descendantDepth,
int currentDepth,
int currentDescendantDepth) |
private void |
_saxPages(ContentHandler handler,
List<? extends SitemapSaxer.PageWrapper> pages,
Page currentPage,
String currentPagePath,
UserIdentity userIdentity,
RenderingContext renderingContext,
RestrictedPagePolicy policy,
int initialDepth,
int descendantDepth,
int currentDepth,
int currentDescendantDepth) |
void |
clearCache(String siteName,
String workspace)
Clear the page cache.
|
void |
service(ServiceManager manager) |
void |
toSAX(ContentHandler contentHandler,
String siteName,
String sitemapName,
Page currentPage,
int initialDepth,
int descendantDepth)
Send SAX events representing pages from a sitemap.
|
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
RightManager _rightManager
private RenderingContextHandler _renderingContextHandler
private CurrentUserProvider _currentUserProvider
private WorkspaceSelector _workspaceSelector
private SiteManager _siteManager
private Map<String,Map<String,Map<String,Map<RenderingContext,List<SitemapSaxer.BufferedPage>>>>> _bufferedPages
public SitemapSaxer()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public void clearCache(String siteName, String workspace)
siteName
- the site.workspace
- the JCR workspace.public void toSAX(ContentHandler contentHandler, String siteName, String sitemapName, Page currentPage, int initialDepth, int descendantDepth) throws SAXException, ProcessingException
contentHandler
- the SAX handler.siteName
- the site name.sitemapName
- the sitemap name.currentPage
- the current Page
.initialDepth
- max depth from the root.descendantDepth
- max depth under the current page.SAXException
- if an error occurs with the content handler.ProcessingException
- if an error occurs while processing data.private List<SitemapSaxer.BufferedPage> _fill(AmetysObjectIterable<? extends Page> pages)
Map<String,String> _getInternalAttributes(Page page)
Map<String,String> _getAttributes(Page page)
private void _saxPages(ContentHandler handler, List<? extends SitemapSaxer.PageWrapper> pages, Page currentPage, String currentPagePath, UserIdentity userIdentity, RenderingContext renderingContext, RestrictedPagePolicy policy, int initialDepth, int descendantDepth, int currentDepth, int currentDescendantDepth) throws SAXException
SAXException
private void _saxPage(ContentHandler handler, SitemapSaxer.PageWrapper page, Page currentPage, String currentPagePath, UserIdentity userIdentity, RenderingContext renderingContext, RestrictedPagePolicy policy, int initialDepth, int descendantDepth, int currentDepth, int currentDescendantDepth) throws SAXException
SAXException
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.