com.atlassian.confluence.content.render.xhtml.editor.inline
Class SimpleEmoticonDisplayMapper

java.lang.Object
  extended by com.atlassian.confluence.content.render.xhtml.editor.inline.SimpleEmoticonDisplayMapper
All Implemented Interfaces:
EmoticonDisplayMapper

public class SimpleEmoticonDisplayMapper
extends java.lang.Object
implements EmoticonDisplayMapper

An EmoticonImageMapper which makes use of the type of the emoticon supplied when building the URL to use.


Constructor Summary
SimpleEmoticonDisplayMapper(com.atlassian.plugin.webresource.WebResourceUrlProvider webResourceUrlProvider)
           
 
Method Summary
 java.lang.String getAbsoluteImageUrl(Emoticon emoticon)
          Get an absolute URL for the emoticon (this will include the servers configured baseURL).
 java.lang.String getImageName(Emoticon emoticon)
           
 java.lang.String getRelativeImageUrl(Emoticon emoticon)
          Get a relative URL for the emoticon.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleEmoticonDisplayMapper

public SimpleEmoticonDisplayMapper(com.atlassian.plugin.webresource.WebResourceUrlProvider webResourceUrlProvider)
Method Detail

getRelativeImageUrl

public java.lang.String getRelativeImageUrl(Emoticon emoticon)
Description copied from interface: EmoticonDisplayMapper
Get a relative URL for the emoticon. The relative URL will include context path but no server information.

Specified by:
getRelativeImageUrl in interface EmoticonDisplayMapper
Parameters:
emoticon - the emoticon for which an image URL is required.
Returns:
the URL for the image matching the supplied emoticon or null if there is none found.

getAbsoluteImageUrl

public java.lang.String getAbsoluteImageUrl(Emoticon emoticon)
Description copied from interface: EmoticonDisplayMapper
Get an absolute URL for the emoticon (this will include the servers configured baseURL).

Specified by:
getAbsoluteImageUrl in interface EmoticonDisplayMapper
Parameters:
emoticon - the emoticon for which an image URL is required.
Returns:
the URL for the image matching the supplied emoticon or null if there is none found.

getImageName

public java.lang.String getImageName(Emoticon emoticon)
Specified by:
getImageName in interface EmoticonDisplayMapper
Parameters:
emoticon - the emoticon for which an image name is required.
Returns:
the image name (no extension) for the supplied emoticon or null if there is none found.


Copyright © 2003-2014 Atlassian. All Rights Reserved.