de.speexx.pebble.decorator
Class EmoticonDecorator

java.lang.Object
  extended bypebble.decorator.BlogEntryDecoratorSupport
      extended byde.speexx.pebble.decorator.EmoticonDecorator
All Implemented Interfaces:
pebble.decorator.BlogEntryDecorator

public class EmoticonDecorator
extends pebble.decorator.BlogEntryDecoratorSupport

Replaces Emoticon characters with <img>-elements.

Dedicated to the best wife of all Gabi.

Author:
Sascha Kohlmann
See Also:
Pattern

Constructor Summary
EmoticonDecorator()
           
 
Method Summary
 void decorate(pebble.decorator.BlogEntryDecoratorChain chain, pebble.decorator.BlogEntryDecoratorContext context)
          
 java.util.List getEmoticonsForBlog(pebble.blog.Blog blog)
          Returns the emoticons.
 java.util.regex.Pattern getEscapeSequencePattern()
          Returns the escape sequence pattern.
 void setBlog(pebble.blog.Blog blog)
          Calls supery and inits the decorator.
 void setEmoticonsForBlog(pebble.blog.Blog blog, java.util.List emoticons)
          Puts a list with emoticons.
 
Methods inherited from class pebble.decorator.BlogEntryDecoratorSupport
getBlog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmoticonDecorator

public EmoticonDecorator()
Method Detail

decorate

public void decorate(pebble.decorator.BlogEntryDecoratorChain chain,
                     pebble.decorator.BlogEntryDecoratorContext context)
              throws pebble.decorator.BlogEntryDecoratorException

Throws:
pebble.decorator.BlogEntryDecoratorException

setBlog

public void setBlog(pebble.blog.Blog blog)
Calls supery and inits the decorator.


getEscapeSequencePattern

public java.util.regex.Pattern getEscapeSequencePattern()
Returns the escape sequence pattern.

Returns:
the escape sequence pattern.

getEmoticonsForBlog

public final java.util.List getEmoticonsForBlog(pebble.blog.Blog blog)
Returns the emoticons.

In the list are only Emoticon instances.

Note, that this method may change later to generic support upcoming with Java 5.

Parameters:
blog - the blog of the emoticons.
Returns:
The emoticons.

setEmoticonsForBlog

public final void setEmoticonsForBlog(pebble.blog.Blog blog,
                                      java.util.List emoticons)
Puts a list with emoticons.

There must be only Emoticon instances in the list.

Note, that this method may change later to generic support upcoming with Java 5.

Parameters:
emoticons - The emoticons to set.
blog - the blog of the emoticons.
Throws:
java.lang.IllegalArgumentException - if there are other instance than that of Emoticon in the list.


Copyright © 2005 . All Rights Reserved.