|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.plugins.macros.core.renderer.AbstractEmbeddedResourceRenderer
public abstract class AbstractEmbeddedResourceRenderer
The basic implementation for an embedded resource renderer. Renderers can extend this class to build a standard object element.
Field Summary | |
---|---|
static java.lang.String |
TEMPLATE_PATH
|
protected static java.util.List<java.lang.String> |
validEmbedTags
|
protected static java.util.List<java.lang.String> |
validObjectTags
|
protected static java.util.List<java.lang.String> |
validParamTags
|
static java.lang.String |
WRAPPER_TEMPLATE_PATH
|
Constructor Summary | |
---|---|
AbstractEmbeddedResourceRenderer()
|
Method Summary | |
---|---|
protected java.lang.String |
getDefaultHeight()
Returns the default height of the embedded object for when no height is specified. |
protected java.lang.String |
getDefaultWidth()
Returns the default width of the embedded object for when no width is specified. |
protected com.atlassian.xwork.XsrfTokenGenerator |
getXsrfTokenGenerator()
|
protected abstract java.util.Map<java.lang.String,java.lang.Object> |
refineParams(Attachment attachment,
java.util.Map<java.lang.String,java.lang.Object> properties)
Provides the opportunity for a specialisation to customise any parameters / properties. |
java.lang.String |
renderResource(EmbeddedObject resource,
com.atlassian.renderer.RenderContext context)
Render the embedded resource to a string. |
protected java.util.Map<java.lang.String,java.lang.Object> |
setupObjectProperties(EmbeddedObject emObject,
com.atlassian.renderer.RenderContext context)
Retrieves the attachment from an EmbeddedResource, resolving the absolute URL to the attachment and placing it into a ContextMap for use with Velocity. |
void |
setXsrfTokenGenerator(com.atlassian.xwork.XsrfTokenGenerator xsrfTokenGenerator)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.atlassian.confluence.renderer.embedded.EmbeddedResourceRenderer |
---|
matchesType |
Field Detail |
---|
public static final java.lang.String TEMPLATE_PATH
public static final java.lang.String WRAPPER_TEMPLATE_PATH
protected static final java.util.List<java.lang.String> validObjectTags
protected static final java.util.List<java.lang.String> validEmbedTags
protected static final java.util.List<java.lang.String> validParamTags
Constructor Detail |
---|
public AbstractEmbeddedResourceRenderer()
Method Detail |
---|
protected java.util.Map<java.lang.String,java.lang.Object> setupObjectProperties(EmbeddedObject emObject, com.atlassian.renderer.RenderContext context)
emObject
- the EmbeddedObject objectcontext
- the RenderContext
public java.lang.String renderResource(EmbeddedObject resource, com.atlassian.renderer.RenderContext context)
EmbeddedResourceRenderer
renderResource
in interface EmbeddedResourceRenderer
resource
- to be renderedcontext
- of render
protected abstract java.util.Map<java.lang.String,java.lang.Object> refineParams(Attachment attachment, java.util.Map<java.lang.String,java.lang.Object> properties)
attachment
- the attachment to processproperties
- the parameters to be added to or altered
protected java.lang.String getDefaultWidth()
Value will be directly rendered into the HTML.
protected java.lang.String getDefaultHeight()
Value will be directly rendered into the HTML.
public void setXsrfTokenGenerator(com.atlassian.xwork.XsrfTokenGenerator xsrfTokenGenerator)
protected com.atlassian.xwork.XsrfTokenGenerator getXsrfTokenGenerator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |