felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pde...@apache.org
Subject svn commit: r937905 - /felix/trunk/dependencymanager/samples.annotation/README
Date Sun, 25 Apr 2010 22:57:56 GMT
Author: pderop
Date: Sun Apr 25 22:57:56 2010
New Revision: 937905

URL: http://svn.apache.org/viewvc?rev=937905&view=rev
added a README file, which describes this sample


Added: felix/trunk/dependencymanager/samples.annotation/README
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/samples.annotation/README?rev=937905&view=auto
--- felix/trunk/dependencymanager/samples.annotation/README (added)
+++ felix/trunk/dependencymanager/samples.annotation/README Sun Apr 25 22:57:56 2010
@@ -0,0 +1,45 @@
+This sample illustrates the usage of the new DependencyManager annotations.
+Sample description:
+  This sample shows a basic "SpellChecker" application which provides a Felix "spellcheck"
+  command. The SpellChecker class is a Felix Shell command (it provides the "Command" service),
+  which accepts a string as parameter. So, when you type a string, the command just says
if the
+  specified string has been found from one of its injected dictionaries. The SpellChecker
class has a
+  required/multiple dependency over any available DictionaryService. Currently, there is
+  "EnglishDictionary" which implements the DictionaryService. The EnglishDictionary service
+  MetaType, allowing to configure english words through ConfigAdmin and WebConsole. 
+  So, before testing, you first have to go to webconsole Configuration panel, and specify
+  english words in the configuration for the "English Dictionary" PID. Then, go to the felix
+  and you will then see the "spellcheck" command (when typing "help").
+  Notice that in the sample, you will also find an Aspect Service (DictionaryAspect.java),
+  decorates the EnglishDictionary service, by adding an "aspect" word in the dictionary.
+How to test:
+  1) Install the following bundles:
+     org.apache.felix.configadmin
+     org.apache.felix.metatype
+     org.apache.felix.http.jetty
+     org.apache.felix.webconsole
+     org.apache.felix.dependencymanager
+     org.apache.felix.dependencymanager.shell
+     org.apache.felix.dependencymanager.runtime
+     org.apache.felix.dependencymanager.samples.annotation
+  2) Start felix
+  3) Go to web console, in the Configuration pannel
+  4) Edit the "English Dictionary" Configuration, add some words, then click on "save".
+     At this point, the "EnglishDictionary" service will be enabled and the SpellCheck component
+     will be injected with it. Then you should see the "spellcheck" command, when typing
"help" on the shell.
+  5) Just type "spellcheck hello", and the command should reply a fantastic message, like
"word hello is correct".

View raw message