|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.confluence.content.render.xhtml.DefaultConversionContext
public class DefaultConversionContext
A non-thread safe implementation of the ConversionContext suitable for use in the single threaded XHTML output process.
| Constructor Summary | |
|---|---|
DefaultConversionContext(com.atlassian.renderer.RenderContext renderContext)
|
|
| Method Summary | |
|---|---|
void |
checkTimeout()
Check the timeout and throw an XhtmlTimeoutException if the timeout is expired. |
boolean |
equals(Object o)
|
ContentTree |
getContentTree()
If multiple items are being converted in this 'context' then the complete tree of ContentNodes will be retrieved via this method. |
ContentEntityObject |
getEntity()
Get the current ContentEntityObject for this context. |
String |
getOutputType()
|
PageContext |
getPageContext()
This method should be considered almost deprecated. |
Object |
getProperty(String name)
Return a property from the context. |
String |
getPropertyAsString(String name)
Returns the property for this key as a String. |
com.atlassian.renderer.RenderContext |
getRenderContext()
Deprecated. Used getPageContext() instead. |
String |
getSpaceKey()
The spacekey for the current context if applicable or null otherwise. |
com.atlassian.util.concurrent.Timeout |
getTimeout()
The Timeout object for this Conversion. |
int |
hashCode()
|
boolean |
hasProperty(String name)
Returns true if the property with the specified key has been set. |
Object |
removeProperty(String name)
Removes the property references by the key from the conversion context and returns it. |
void |
setContentTree(ContentTree contentTree)
|
void |
setProperty(String name,
Object value)
Sets the property specified by name in the conversion context. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultConversionContext(com.atlassian.renderer.RenderContext renderContext)
| Method Detail |
|---|
@Deprecated public com.atlassian.renderer.RenderContext getRenderContext()
getPageContext() instead.
public PageContext getPageContext()
ConversionContextThis method should be considered almost deprecated.
At the moment a ConversionContext implementation will always be wrapping at least a RenderContext
and as long as this is actually a PageContext then it will be returned by this method.
However, at some point in the future ConversionContext will be decoupled from the old v2 RenderContext
and this method will be removed.
getPageContext in interface ConversionContextDefaultConversionContextpublic Object removeProperty(String name)
ConversionContext
removeProperty in interface ConversionContextname - The unique key of the property. See ConversionContextPropertyName for common names.
public void setProperty(String name,
Object value)
ConversionContext
setProperty in interface ConversionContextname - A unique key for this property. See ConversionContextPropertyName for common names.value - The value of the property.public Object getProperty(String name)
ConversionContext
getProperty in interface ConversionContextname - of the property. See ConversionContextPropertyName for common names.
public String getPropertyAsString(String name)
ConversionContext
getPropertyAsString in interface ConversionContextname - The key for the property
public boolean hasProperty(String name)
ConversionContext
hasProperty in interface ConversionContextname - The name of the property
public ContentTree getContentTree()
ConversionContext
getContentTree in interface ConversionContextpublic void setContentTree(ContentTree contentTree)
public String getOutputType()
getOutputType in interface ConversionContextConversionContextOutputType.value() which indicates the target output type
for the conversion.public com.atlassian.util.concurrent.Timeout getTimeout()
ConversionContextTimeout.isExpired(), or how much longer conversion should be allowed to
run using Timeout.getTime(), Timeout.getUnit().
getTimeout in interface ConversionContext
public void checkTimeout()
throws XhtmlTimeoutException
ConversionContextConversionContext.getTimeout() and Timeout.isExpired() to check the timeout without
throwing an exception.
checkTimeout in interface ConversionContextXhtmlTimeoutException - if the conversion has exceeded its time limit.public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic ContentEntityObject getEntity()
ConversionContext
getEntity in interface ConversionContextpublic String getSpaceKey()
ConversionContext
getSpaceKey in interface ConversionContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||