Class DefaultPageTemplateManager
- java.lang.Object
-
- com.atlassian.confluence.pages.templates.DefaultPageTemplateManager
-
- All Implemented Interfaces:
PageTemplateManager
public class DefaultPageTemplateManager extends Object implements PageTemplateManager
-
-
Constructor Summary
Constructors Constructor Description DefaultPageTemplateManager()
-
Method Summary
-
-
-
Method Detail
-
setPageTemplateDao
public void setPageTemplateDao(PageTemplateDao pageTemplateDao)
-
setWikiToXhtmlMigrator
public void setWikiToXhtmlMigrator(WikiToXhtmlMigrator wikiToXhtmlMigrator)
-
setTemplateHandlers
public void setTemplateHandlers(Map<BodyType,TemplateHandler> templateHandlers)
-
savePageTemplate
public void savePageTemplate(PageTemplate pageTemplate, PageTemplate originalTemplate)
- Specified by:
savePageTemplate
in interfacePageTemplateManager
-
refreshPageTemplate
public void refreshPageTemplate(PageTemplate pageTemplate)
- Specified by:
refreshPageTemplate
in interfacePageTemplateManager
-
removePageTemplate
public void removePageTemplate(PageTemplate page)
- Specified by:
removePageTemplate
in interfacePageTemplateManager
-
getPageTemplate
public PageTemplate getPageTemplate(long id)
- Specified by:
getPageTemplate
in interfacePageTemplateManager
-
getPageTemplate
public PageTemplate getPageTemplate(PluginTemplateReference pluginTemplateReference)
- Specified by:
getPageTemplate
in interfacePageTemplateManager
-
getPageTemplate
public PageTemplate getPageTemplate(String name, Space space)
- Specified by:
getPageTemplate
in interfacePageTemplateManager
-
getPageTemplates
public List getPageTemplates(Space space)
- Specified by:
getPageTemplates
in interfacePageTemplateManager
- Returns:
- the list of all templates of the space
-
getGlobalPageTemplates
public List getGlobalPageTemplates()
- Specified by:
getGlobalPageTemplates
in interfacePageTemplateManager
-
getGlobalPageTemplate
public PageTemplate getGlobalPageTemplate(String name)
- Specified by:
getGlobalPageTemplate
in interfacePageTemplateManager
-
setEventManager
public void setEventManager(com.atlassian.event.EventManager eventManager)
- Specified by:
setEventManager
in interfacePageTemplateManager
-
removeAllPageTemplates
public void removeAllPageTemplates(Space space)
- Specified by:
removeAllPageTemplates
in interfacePageTemplateManager
-
getTemplateVariables
public List getTemplateVariables(PageTemplate template) throws XhtmlException
- Specified by:
getTemplateVariables
in interfacePageTemplateManager
- Throws:
XhtmlException
-
mergeVariables
public String mergeVariables(PageTemplate template, List variables, String spaceKey) throws XhtmlException
- Specified by:
mergeVariables
in interfacePageTemplateManager
- Throws:
XhtmlException
-
insertVariables
public String insertVariables(PageTemplate template, List variables)
Insert the provided variables into the provided template content, and returns it. Any variable not found will be replaced by an empty string- Specified by:
insertVariables
in interfacePageTemplateManager
-
canCreate
public boolean canCreate(PageTemplate template, PageTemplate foundTemplate)
Description copied from interface:PageTemplateManager
Returns if a template can be created.- Specified by:
canCreate
in interfacePageTemplateManager
- Parameters:
template
- to be created, null if it's a new templatefoundTemplate
- template found in DB, null if not found- Returns:
- true if the template can be created, otherwise false
-
-