|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.speexx.pebble.decorator.EmoticonConfigurator
The default configurator uses a configuration file in the root directory of the blog called "emoticon.conf". The config file comes in XML with the following structure: (italic fields are optional)
<emoticon-decorator>
<entries xml:base='http://www.speexx.de/icons/'>
<entry>
<emoticon-regex>\:\-\)</emoticon-regex>
<image-url>simple-smily.png</image-url>
<attribute name='alt' value='[SMILY]' />
<attribute name='title' value='Smily' />
<attribute name='width' value='12' />
<attribute name='height' value='12' />
<!-- more 'attribute' elements -->
</entry>
<!-- more 'entry' elements -->
</entries>
<!-- more 'entries' elements -->
</emoticon-decorator>
The <image-url> element definies the URL (relative or absolut) to the image. The URL may be relative to the xml:base-attribute.
<emoticon-regex> definies the pattern of the emoticon character sequence in the content.
The attribute element contains all other possible elements
of the emoticon image replacement.
It is possible to define mor than one <entries> parts in an configuration file.
| Nested Class Summary | |
static class |
EmoticonConfigurator.ConfigHandler
Base handler for Emoticon configs. |
| Field Summary | |
static java.lang.String |
CONFIG
The name of the config file. |
| Constructor Summary | |
protected |
EmoticonConfigurator()
Use factory method. |
| Method Summary | |
java.util.List |
load(pebble.blog.Blog blog)
Loads the configuration of the emoticons and returns them in a Collection of Emoticons. |
static EmoticonConfigurator |
newInstance()
Returns a new EmoticonConfigurator instance. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String CONFIG
| Constructor Detail |
protected EmoticonConfigurator()
| Method Detail |
public static EmoticonConfigurator newInstance()
EmoticonConfigurator instance.
EmoticonConfigurator instance.public java.util.List load(pebble.blog.Blog blog)
Emoticons.
blog - the blo to get the configuration for.
Emoticons.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||