public class DefaultContextAssistant extends java.lang.Object implements ContextAssistant
ContextAssistant.| Constructor and Description |
|---|
DefaultContextAssistant(com.atlassian.confluence.pages.templates.PageTemplateManager pageTemplateManager,
com.atlassian.confluence.pages.PageManager pageManager) |
| Modifier and Type | Method and Description |
|---|---|
com.atlassian.confluence.pages.templates.PageTemplate |
getCurrentPageTemplate(com.atlassian.confluence.content.render.xhtml.ConversionContext ctx) |
com.atlassian.confluence.pages.templates.PageTemplate |
getPageTemplate(java.lang.String templateName,
com.atlassian.confluence.spaces.Space space)
Returns the page template with the specified name, if it is accessible
from the context of the specified spaces, otherwise searches the global
space for a matching template and returns that.
|
java.util.List<com.atlassian.confluence.pages.templates.PageTemplate> |
getPageTemplates(com.atlassian.confluence.spaces.Space space)
Returns the list of all page templates available in the context of the
specified spaces, including any global templates.
|
boolean |
isCurrentAction(java.lang.Class<? extends com.opensymphony.xwork.Action> actionClass)
Checks if the specified class is the current action.
|
boolean |
isDashboardAction(com.atlassian.confluence.content.render.xhtml.ConversionContext ctx)
Check if we are on the dashboard.
|
boolean |
isDefaultDisplay(com.atlassian.confluence.content.render.xhtml.ConversionContext ctx)
Returns true if the current view is the default display (ie not
printable, etc).
|
boolean |
isEditAction(com.atlassian.confluence.content.render.xhtml.ConversionContext ctx)
Returns true if we are editing content.
|
boolean |
isPDFDisplay(com.atlassian.confluence.content.render.xhtml.ConversionContext ctx) |
boolean |
isPreviewDisplay(com.atlassian.confluence.content.render.xhtml.ConversionContext ctx) |
boolean |
isPrintableDisplay(com.atlassian.confluence.content.render.xhtml.ConversionContext ctx)
Returns true if the current view is printable - either the standard
'print' view, Word or PDF.
|
boolean |
isRecentlyUpdatedFor(com.atlassian.confluence.core.ContentEntityObject ceo,
java.lang.Object user) |
boolean |
isTemplateAction(com.atlassian.confluence.content.render.xhtml.ConversionContext ctx)
Returns
true if the current page context is within a page
template action. |
boolean |
isViewAction(com.atlassian.confluence.content.render.xhtml.ConversionContext ctx)
Returns true if the current action is the view option for the current
content.
|
boolean |
isWordDisplay(com.atlassian.confluence.content.render.xhtml.ConversionContext ctx) |
public DefaultContextAssistant(com.atlassian.confluence.pages.templates.PageTemplateManager pageTemplateManager,
com.atlassian.confluence.pages.PageManager pageManager)
public com.atlassian.confluence.pages.templates.PageTemplate getPageTemplate(java.lang.String templateName,
com.atlassian.confluence.spaces.Space space)
getPageTemplate in interface ContextAssistanttemplateName - The name of the template.space - The space to search, or null to only search
global templates.null.public java.util.List<com.atlassian.confluence.pages.templates.PageTemplate> getPageTemplates(com.atlassian.confluence.spaces.Space space)
getPageTemplates in interface ContextAssistantspace - The space to search, or null to only list global
templates.public boolean isViewAction(com.atlassian.confluence.content.render.xhtml.ConversionContext ctx)
isViewAction in interface ContextAssistantctx - The page context.public boolean isEditAction(com.atlassian.confluence.content.render.xhtml.ConversionContext ctx)
isEditAction in interface ContextAssistantctx - The page context.public boolean isDashboardAction(com.atlassian.confluence.content.render.xhtml.ConversionContext ctx)
isDashboardAction in interface ContextAssistantctx - The page context.true if we are on the dashboard.public boolean isTemplateAction(com.atlassian.confluence.content.render.xhtml.ConversionContext ctx)
true if the current page context is within a page
template action.isTemplateAction in interface ContextAssistantctx - The page context.true if we are operating on a template.public boolean isCurrentAction(java.lang.Class<? extends com.opensymphony.xwork.Action> actionClass)
isCurrentAction in interface ContextAssistantactionClass - The class to check.true if current action is an instance of the
specified class.public boolean isDefaultDisplay(com.atlassian.confluence.content.render.xhtml.ConversionContext ctx)
isDefaultDisplay in interface ContextAssistantctx - The current page context.public boolean isPrintableDisplay(com.atlassian.confluence.content.render.xhtml.ConversionContext ctx)
isPrintableDisplay in interface ContextAssistantctx - The page context.public boolean isPDFDisplay(com.atlassian.confluence.content.render.xhtml.ConversionContext ctx)
isPDFDisplay in interface ContextAssistantpublic boolean isWordDisplay(com.atlassian.confluence.content.render.xhtml.ConversionContext ctx)
isWordDisplay in interface ContextAssistantpublic boolean isPreviewDisplay(com.atlassian.confluence.content.render.xhtml.ConversionContext ctx)
isPreviewDisplay in interface ContextAssistantpublic boolean isRecentlyUpdatedFor(com.atlassian.confluence.core.ContentEntityObject ceo,
java.lang.Object user)
isRecentlyUpdatedFor in interface ContextAssistantpublic com.atlassian.confluence.pages.templates.PageTemplate getCurrentPageTemplate(com.atlassian.confluence.content.render.xhtml.ConversionContext ctx)
getCurrentPageTemplate in interface ContextAssistantCopyright © 2013 randombits.org. All Rights Reserved.