public class Smilies extends StringTransformer implements CharTransformer
| Modifier and Type | Field and Description |
|---|---|
protected static Map |
smileyMatchers
Compiled regexps
|
protected static Map |
smileyPatterns
Smiley patterns translated into their regexp version
|
protected static Map |
smileySets
All known smileysets
|
protected static Map |
smilies
All known smilies
|
| Constructor and Description |
|---|
Smilies() |
Smilies(String defaultid,
String defaultcontext) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
initMatchers(String themeID,
String smileySetID,
String smileyKey)
Initializes regexp matchers for the combination of (themeID,smileySetID,smileyKey,smilies)
|
protected void |
initPatterns(String themeID,
String smileySetID,
String smileyKey)
Initializes regexp patterns for the combination of (themeID,smileySetID,smileyKey,smilies)
|
protected void |
initSmileySets(String themeID,
String smileySetID,
String smileyKey)
Initializes a specific smileySet in a specific theme.
|
String |
toString() |
String |
transform(String originalString)
Default transform method (with no other params).
|
String |
transform(String originalString,
String themeID,
String imagecontext)
Transform the originalString into a version with the graphical version of the smilies
|
transform, transform, transformBack, transformBack, transformBackclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waittransform, transform, transformBack, transformBack, transformBackprotected static final Map smilies
protected static final Map smileySets
protected static final Map smileyPatterns
protected static final Map smileyMatchers
protected void initSmileySets(String themeID, String smileySetID, String smileyKey)
themeID - id of of the theme to be used to access the smileysetsmileySetID - the id of the smileyset to be used to access the smileysmileyKey - the unique key of the smileysetprotected void initPatterns(String themeID, String smileySetID, String smileyKey)
themeID - id of of the theme to be used to access the smileysetsmileySetID - the id of the smileyset to be used to access the smileysmileyKey - the id of the smiley (this is the text version of the smiley)protected void initMatchers(String themeID, String smileySetID, String smileyKey)
themeID - id of of the theme to be used to access the smileysetsmileySetID - the id of the smileyset to be used to access the smileysmileyKey - the id of the smiley (this is the text version of the smiley)public String transform(String originalString)
transform in interface CharTransformertransform in class StringTransformeroriginalString - the string which must be transformedpublic String transform(String originalString, String themeID, String imagecontext)
originalString - the string which must be transformedthemeID - the id of the theme to be usedimagecontext - the image path to be usedpublic String toString()
toString in interface TransformertoString in class ObjectMMBase 1.9-SNAPSHOT - ${javadoctimestamp}