com.atlassian.confluence.plugins.macros.core.renderer
Class EmbeddedRealMediaRenderer

java.lang.Object
  extended by com.atlassian.confluence.plugins.macros.core.renderer.AbstractEmbeddedResourceRenderer
      extended by com.atlassian.confluence.plugins.macros.core.renderer.EmbeddedRealMediaRenderer
All Implemented Interfaces:
EmbeddedResourceRenderer

public class EmbeddedRealMediaRenderer
extends AbstractEmbeddedResourceRenderer


Field Summary
 
Fields inherited from class com.atlassian.confluence.plugins.macros.core.renderer.AbstractEmbeddedResourceRenderer
TEMPLATE_PATH, validEmbedTags, validObjectTags, validParamTags, WRAPPER_TEMPLATE_PATH
 
Constructor Summary
EmbeddedRealMediaRenderer()
           
 
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.
 boolean matchesType(EmbeddedObject resource)
          Returns true if the renderer matches the resource
protected  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.
 
Methods inherited from class com.atlassian.confluence.plugins.macros.core.renderer.AbstractEmbeddedResourceRenderer
getXsrfTokenGenerator, setupObjectProperties, setXsrfTokenGenerator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmbeddedRealMediaRenderer

public EmbeddedRealMediaRenderer()
Method Detail

renderResource

public String renderResource(EmbeddedObject resource,
                             com.atlassian.renderer.RenderContext context)
Description copied from interface: EmbeddedResourceRenderer
Render the embedded resource to a string.

Specified by:
renderResource in interface EmbeddedResourceRenderer
Overrides:
renderResource in class AbstractEmbeddedResourceRenderer
Parameters:
resource - to be rendered
context - of render
Returns:
html source for the object element

refineParams

protected Map<String,Object> refineParams(Attachment attachment,
                                          Map<String,Object> properties)
Description copied from class: AbstractEmbeddedResourceRenderer
Provides the opportunity for a specialisation to customise any parameters / properties. e.g. Setting the width and height based on the actual content.

Specified by:
refineParams in class AbstractEmbeddedResourceRenderer
Parameters:
attachment - the attachment to process
properties - the parameters to be added to or altered
Returns:
a new/updated map of parameters

matchesType

public boolean matchesType(EmbeddedObject resource)
Description copied from interface: EmbeddedResourceRenderer
Returns true if the renderer matches the resource

Parameters:
resource - the resource to match
Returns:
true if the resource matches

getDefaultWidth

protected String getDefaultWidth()
Description copied from class: AbstractEmbeddedResourceRenderer
Returns the default width of the embedded object for when no width is specified.

Value will be directly rendered into the HTML.

Overrides:
getDefaultWidth in class AbstractEmbeddedResourceRenderer
Returns:
the default width. May be null, in which case no width is rendered unless supplied. The default value returned is null if not overriden.

getDefaultHeight

protected String getDefaultHeight()
Description copied from class: AbstractEmbeddedResourceRenderer
Returns the default height of the embedded object for when no height is specified.

Value will be directly rendered into the HTML.

Overrides:
getDefaultHeight in class AbstractEmbeddedResourceRenderer
Returns:
the default height. May be null, in which case no height is rendered unless supplied. The default value returned is null if not overriden.


Copyright © 2003–2015 Atlassian. All rights reserved.