org.apache.felix.dm.samples.annotation
Class DictionaryAspect

java.lang.Object
  extended by org.apache.felix.dm.samples.annotation.DictionaryAspect
All Implemented Interfaces:
DictionaryService

public class DictionaryAspect
extends Object
implements DictionaryService

This aspect applies to the English DictionaryService, and allows to decorate it with some custom English words, which are configurable from WebConsole.


Constructor Summary
DictionaryAspect()
           
 
Method Summary
 boolean checkWord(String word)
          Checks if a word is found from our custom word list.
protected  void start()
          Our Aspect Service is starting and is about to be registered in the OSGi regsitry.
 String toString()
           
protected  void updated( config)
          Defines a configuration dependency for retrieving our english custom words (by default, our PID is our full class name).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DictionaryAspect

public DictionaryAspect()
Method Detail

updated

protected void updated( config)
Defines a configuration dependency for retrieving our english custom words (by default, our PID is our full class name).


start

protected void start()
Our Aspect Service is starting and is about to be registered in the OSGi regsitry.


checkWord

public boolean checkWord(String word)
Checks if a word is found from our custom word list. if not, delegate to the decorated dictionary.

Specified by:
checkWord in interface DictionaryService
Parameters:
word - the word to be checked.
Returns:
true if the word is in the dictionary, false otherwise.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.