public class PageContext
extends com.atlassian.renderer.RenderContext
implements com.atlassian.renderer.links.LinkContext
| Constructor and Description |
|---|
PageContext() |
PageContext(ContentEntityObject entity) |
PageContext(ContentEntityObject entity,
PageContext previousContext)
Deprecated.
the ability to have an original context is likely to be removed in a future version
|
PageContext(String spaceKey) |
| Modifier and Type | Method and Description |
|---|---|
static PageContext |
contextWithTimeout(ContentEntityObject entity,
com.atlassian.util.concurrent.Timeout timeout)
Deprecated.
since 7.0.1. Use
newContextWithTimeout(ContentEntityObject, Timeout) |
static com.atlassian.util.concurrent.Timeout |
createMinimumTimeout()
Deprecated.
since 7.0.1. Use
minimumTimeout() |
boolean |
equals(Object o) |
ElementIdCreator |
getElementIdCreator() |
ContentEntityObject |
getEntity() |
PageContext |
getOriginalContext() |
String |
getOutputDeviceType()
Note, that if you want your code to be compatible with versions of Confluence older then 4.3.3 then you can
instead call
RenderContext.getParam(Object) with the parameter "output-device-type". |
@Nullable String |
getPageTitle() |
Calendar |
getPostingDay() |
String |
getSpaceKey() |
com.atlassian.util.concurrent.Timeout |
getTimeout()
Deprecated.
since 7.0.1. Use
timeout() |
int |
hashCode() |
static io.atlassian.util.concurrent.Timeout |
minimumTimeout()
Returns a timeout of 1 hour.
|
static PageContext |
newContextWithTimeout(ContentEntityObject entity,
io.atlassian.util.concurrent.Timeout timeout)
Construct a new PageContext for the rendering of some entity within a given time.
|
void |
setOutputDeviceType(String type)
Set the output device type to be rendered for.
|
io.atlassian.util.concurrent.Timeout |
timeout() |
SearchContext.Builder |
toSearchContext()
Converts this PageContext to a
SearchContext.Builder, intended for use with macros that delegate content
searching to the CQLSearchService. |
addExternalReference, addParam, addRenderedContent, addRenderedContent, getAttachmentsPath, getBaseUrl, getCharacterEncoding, getEmbeddedResourceRenderer, getEscaper, getExternalReferences, getImagePath, getLinkRenderer, getOutputType, getParam, getParams, getRenderedContentStore, getRenderMode, getSiteRoot, isRenderingForWysiwyg, popRenderMode, pushRenderMode, setAttachmentsPath, setBaseUrl, setCharacterEncoding, setEmbeddedResourceRenderer, setEscaper, setImagePath, setLinkRenderer, setOutputType, setRenderingForWysiwyg, setSiteRootpublic PageContext()
public PageContext(String spaceKey)
public PageContext(ContentEntityObject entity)
@Deprecated public PageContext(ContentEntityObject entity, PageContext previousContext)
Timeout and RenderedContentStore.
Deprecated as of 4.3. See https://jira.atlassian.com/browse/CONF-25663
@Deprecated public static PageContext contextWithTimeout(ContentEntityObject entity, com.atlassian.util.concurrent.Timeout timeout)
newContextWithTimeout(ContentEntityObject, Timeout)public static PageContext newContextWithTimeout(ContentEntityObject entity, io.atlassian.util.concurrent.Timeout timeout)
@Deprecated public static com.atlassian.util.concurrent.Timeout createMinimumTimeout()
minimumTimeout()public static io.atlassian.util.concurrent.Timeout minimumTimeout()
@Deprecated public com.atlassian.util.concurrent.Timeout getTimeout()
timeout()public io.atlassian.util.concurrent.Timeout timeout()
public String getOutputDeviceType()
RenderContext.getParam(Object) with the parameter "output-device-type". For example, if you
are a plugin developer writing a macro that can target different device types such as mobile, you can
retain a common code base for your mobile and non-mobile implementations by avoiding this method and
calling getParam("output-device-type") instead.ConversionContextOutputDeviceType.DESKTOP
but plugins that have their own renderer could use other typespublic void setOutputDeviceType(String type)
type - the typepublic PageContext getOriginalContext()
public String getSpaceKey()
public @Nullable String getPageTitle()
public Calendar getPostingDay()
public ContentEntityObject getEntity()
public ElementIdCreator getElementIdCreator()
public SearchContext.Builder toSearchContext()
SearchContext.Builder, intended for use with macros that delegate content
searching to the CQLSearchService.public boolean equals(Object o)
equals in class com.atlassian.renderer.RenderContextpublic int hashCode()
hashCode in class com.atlassian.renderer.RenderContextCopyright © 2003–2019 Atlassian. All rights reserved.