Package org.ametys.web.repository.page
Class AddPageWizardHelper
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.web.repository.page.AddPageWizardHelper
- All Implemented Interfaces:
Component,LogEnabled,Serviceable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CurrentUserProviderCurrent User Providerprotected I18nUtilsThe I18n utilsprotected AmetysObjectResolverAmetys Object Resolverprotected RightManagerRight Managerprotected TagProviderExtensionPointThe tags providerprotected TagsDAOTags DAOstatic final StringAvalon Role -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetPageDetails(AmetysObject page, UserIdentity user, int depth, String separator) get the id, rights and formatted title of a pagegetPageInfos(String pageId, int depth, String separator) Get the page's propertiesgetPagesInfos(List<String> pageIds, int depth, String separator) Get the page's propertiesgetTags(List<String> tagNames, List<String> filters, String targetType, boolean showCategories, String separator, Map<String, Object> contextualParameters) Get a the of tags from a list of root tags or tag providersprotected booleanisTagAvailable(Tag tag, List<String> filters, String targetType) Check if we can use this tagvoidservice(ServiceManager manager) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
ROLE
Avalon Role -
_resolver
Ametys Object Resolver -
_rightManager
Right Manager -
_currentUserProvider
Current User Provider -
_tagsDAO
Tags DAO -
_tagExtPt
The tags provider -
_i18nUtils
The I18n utils
-
-
Constructor Details
-
AddPageWizardHelper
public AddPageWizardHelper()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
getPageInfos
Get the page's properties- Parameters:
pageId- the page IDdepth- number of parents to fetch to generate the title (0 to display only the page name)separator- separator between the parents (e.g. " > " to have "grandParent > parent > page")- Returns:
- the properties
-
getPagesInfos
Get the page's properties- Parameters:
pageIds- the page IDsdepth- number of parents to fetch to generate the title (0 to display only the page name)separator- separator between the parents (e.g. " > " to have "grandParent > parent > page")- Returns:
- the properties
-
getPageDetails
protected Map<String,Object> getPageDetails(AmetysObject page, UserIdentity user, int depth, String separator) get the id, rights and formatted title of a page- Parameters:
page- page/sitemap to work onuser- user to check rightsdepth- number of parents to fetch to generate the title (0 to display only the page name)separator- separator between the parents (e.g. " > " to have "grandParent > parent > page")- Returns:
- a map with id (String), rights (Set<String>) and title (String)
-
getTags
public List<Map<String,Object>> getTags(List<String> tagNames, List<String> filters, String targetType, boolean showCategories, String separator, Map<String, Object> contextualParameters) Get a the of tags from a list of root tags or tag providers- Parameters:
tagNames- name of root tags or provider where we want to get the list of contained tagsfilters- list of filters to disable, can contain PAGE_PRIVATE, CONTENT_PRIVATE, PAGE, CONTENTtargetType- tag target typeshowCategories- true to display tags containing other tags. If false, only the non-parents tags will be listedseparator- separator between the parents (e.g. " > " to have "grandParent > parent > page")contextualParameters- the contextual parameters- Returns:
- a list with one item per requested tagName, each one containing name (String), title (String) and tags (List of Map<String, String>, each map containing a name and title)
-
isTagAvailable
Check if we can use this tag- Parameters:
tag- tag to checkfilters- list of filters to disable, can contain PAGE_PRIVATE, CONTENT_PRIVATE, PAGE, CONTENTtargetType- tag target type- Returns:
- true if this tag is not impacted by the input filters
-