Package org.ametys.plugins.blog.ui
Class BlogRootClientSideElement
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.ui.StaticFileImportsClientSideElement
org.ametys.core.ui.StaticClientSideElement
org.ametys.plugins.blog.ui.BlogRootClientSideElement
- All Implemented Interfaces:
ClientSideElement
,LogEnabled
,PluginAware
,Configurable
,Serviceable
This element creates an action button to set the blog root page.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.core.ui.ClientSideElement
ClientSideElement.Script, ClientSideElement.ScriptFile
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BlogPageHandler
The blog cache manager.protected AmetysObjectResolver
The ametys object resolver.Fields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBlogRootPage
(String siteName, String sitemapName) Get the Blog root page for the specified site and sitemapgetPageDefaultParameters
(SitemapElement sitemapElement) Get the default page's parametersGet the privacy status of contentsprotected int
Tests if an array of JCR Value contains a String value.void
removeBlogRootPage
(String pageId) Remove the root page property for the specified pagevoid
service
(ServiceManager serviceManager) setBlogRootPage
(String siteName, String sitemapName, String pageId) Set the root page for the blogMethods inherited from class org.ametys.core.ui.StaticClientSideElement
_configureClass, _configureParameters, _configureScript, configureInitialParameters
Methods inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, configure, getDependencies, getId, getPluginName, getRights, getScripts, getScripts, hasRight, setPluginInfo, toString
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_resolver
The ametys object resolver. -
_blogRootPageHandler
The blog cache manager.
-
-
Constructor Details
-
BlogRootClientSideElement
public BlogRootClientSideElement()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classStaticFileImportsClientSideElement
- Throws:
ServiceException
-
getStatus
Get the privacy status of contents- Parameters:
pageId
- the id of contents- Returns:
- the privacy status
-
getBlogRootPage
Get the Blog root page for the specified site and sitemap- Parameters:
siteName
- The name of the sitesitemapName
- The name of the sitemap- Returns:
- The page id
-
setBlogRootPage
public Map<String,Object> setBlogRootPage(String siteName, String sitemapName, String pageId) throws javax.jcr.RepositoryException Set the root page for the blog- Parameters:
siteName
- The name of the sitesitemapName
- The name of the sitemappageId
- The page id for the new root- Returns:
- the new root id and the old root id if exist
- Throws:
javax.jcr.RepositoryException
- if an error occurs
-
removeBlogRootPage
Remove the root page property for the specified page- Parameters:
pageId
- The root page id- Throws:
javax.jcr.RepositoryException
- if an error occurs
-
indexOf
Tests if an array of JCR Value contains a String value.- Parameters:
values
- the JCR Value array.value
- the string value to test.- Returns:
- the index of the Value if present, -1 otherwise.
- Throws:
javax.jcr.RepositoryException
- if a repository error occurs.
-
getPageDefaultParameters
Get the default page's parameters- Parameters:
sitemapElement
- The sitemap element- Returns:
- The default parameters
-