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)
Construct a new PageContext for the rendering of some entity within a given time.
|
static com.atlassian.util.concurrent.Timeout |
createMinimumTimeout()
Returns a timeout of 1 hour.
|
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". |
String |
getPageTitle() |
Calendar |
getPostingDay() |
String |
getSpaceKey() |
com.atlassian.util.concurrent.Timeout |
getTimeout() |
int |
hashCode() |
void |
setOutputDeviceType(String type)
Set the output device type to be rendered for.
|
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, setSiteRoot
public 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
public static PageContext contextWithTimeout(ContentEntityObject entity, com.atlassian.util.concurrent.Timeout timeout)
public static com.atlassian.util.concurrent.Timeout createMinimumTimeout()
public com.atlassian.util.concurrent.Timeout getTimeout()
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 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.RenderContext
public int hashCode()
hashCode
in class com.atlassian.renderer.RenderContext
Copyright © 2003–2018 Atlassian. All rights reserved.