|
||||||||||
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 String |
TEMPLATE_PATH
|
protected static List<String> |
validEmbedTags
|
protected static List<String> |
validObjectTags
|
protected static List<String> |
validParamTags
|
static String |
WRAPPER_TEMPLATE_PATH
|
Constructor Summary | |
---|---|
AbstractEmbeddedResourceRenderer()
|
Method Summary | |
---|---|
protected String |
getDefaultHeight()
Returns the default height of the embedded object for when no height is specified. |
protected String |
getDefaultWidth()
Returns the default width of the embedded object for when no width is specified. |
protected abstract Map<String,Object> |
refineParams(Attachment attachment,
Map<String,Object> properties)
Provides the opportunity for a specialisation to customise any parameters / properties. |
String |
renderResource(EmbeddedObject resource,
com.atlassian.renderer.RenderContext context)
Render the embedded resource to a string. |
protected Map<String,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. |
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 String TEMPLATE_PATH
public static final String WRAPPER_TEMPLATE_PATH
protected static final List<String> validObjectTags
protected static final List<String> validEmbedTags
protected static final List<String> validParamTags
Constructor Detail |
---|
public AbstractEmbeddedResourceRenderer()
Method Detail |
---|
protected Map<String,Object> setupObjectProperties(EmbeddedObject emObject, com.atlassian.renderer.RenderContext context)
emObject
- the EmbeddedObject objectcontext
- the RenderContext
public String renderResource(EmbeddedObject resource, com.atlassian.renderer.RenderContext context)
EmbeddedResourceRenderer
renderResource
in interface EmbeddedResourceRenderer
resource
- to be renderedcontext
- of render
protected abstract Map<String,Object> refineParams(Attachment attachment, Map<String,Object> properties)
attachment
- the attachment to processproperties
- the parameters to be added to or altered
protected String getDefaultWidth()
Value will be directly rendered into the HTML.
protected String getDefaultHeight()
Value will be directly rendered into the HTML.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |