public class BlogPageHandler extends AbstractLogEnabled implements Component, Initializable, Serviceable
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Map<String,String>> |
_blogRootPages
The blog root page IDs, indexed by site and sitemap name.
|
protected Map<String,Boolean> |
_hasBlogRoot
For each site, indicate if a blog root is present.
|
protected AmetysObjectResolver |
_resolver
The ametys object resolver.
|
protected SiteManager |
_siteManager
The site manager.
|
static String |
ROLE
The avalon role.
|
| Constructor and Description |
|---|
BlogPageHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected PagesContainer |
_getBlogRootPage(String siteName,
String sitemapName)
Get the blog root page.
|
void |
clearCache()
Clear the blog root page cache.
|
void |
clearCache(String siteName,
String sitemapName)
Clear the blog root page cache for a given site and language.
|
Page |
getBlogPage(String site,
String language,
String pagePath)
Get a page under the blog root.
|
PagesContainer |
getBlogRootPage(String siteName,
String sitemapName)
Get the blog root page.
|
Page |
getPostPage(WebContent postContent)
Get the Page holding the given post content.
|
Set<Page> |
getPostPages(WebContent postContent)
Deprecated.
|
Page |
getTagPage(String siteName,
String lang,
String tagPath)
Get the page holding the given tag
|
boolean |
hasBlogRootPage(Site site)
Test if the given site has at least one sitemap with a blog root page.
|
void |
initialize() |
boolean |
isBlogRootPage(JCRAmetysObject ametysObject)
Test if the given page is the blog root page.
|
void |
service(ServiceManager serviceManager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerprotected AmetysObjectResolver _resolver
protected SiteManager _siteManager
protected Map<String,Map<String,String>> _blogRootPages
protected Map<String,Boolean> _hasBlogRoot
public BlogPageHandler()
public void service(ServiceManager serviceManager) throws ServiceException
service in interface ServiceableServiceExceptionpublic void initialize() throws Exception
initialize in interface InitializableExceptionpublic PagesContainer getBlogRootPage(String siteName, String sitemapName) throws AmetysRepositoryException
siteName - the current site.sitemapName - the current sitemap/language.AmetysRepositoryException - if an error occurs.public boolean hasBlogRootPage(Site site)
site - the site to test.public boolean isBlogRootPage(JCRAmetysObject ametysObject)
ametysObject - the container ametysObject.public Page getBlogPage(String site, String language, String pagePath) throws AmetysRepositoryException
site - the current site.language - the current language/sitemap.pagePath - the wanted page path.AmetysRepositoryException - if an error occurspublic Page getPostPage(WebContent postContent)
postContent - the post content.public Page getTagPage(String siteName, String lang, String tagPath)
siteName - The site's namelang - The languagetagPath - The tag's path@Deprecated public Set<Page> getPostPages(WebContent postContent)
postContent - the post Content.public void clearCache()
public void clearCache(String siteName, String sitemapName)
siteName - the current site.sitemapName - the current sitemap/language.protected PagesContainer _getBlogRootPage(String siteName, String sitemapName) throws AmetysRepositoryException
siteName - the current site.sitemapName - the current sitemap/language.AmetysRepositoryException - if an error occurs.