/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

This sample shows a "SpellChecker" application (using DM Annotations) which provides a
"dictionary.annotation:spellcheck" GOGO shell command. The GOGO "dictionary.annotation:spellcheck" command accepts a
string as parameter, which is checked for proper existence. The SpellChecker class has a
required/multiple (1..N) dependency over every available "DictionaryService" services, which are
internally used by the SpellChecker command, when checking word existence.

A DictionaryService is defined using a FactoryConfigurationAdapterService , allowing to instantiate
many "DictionaryService" instances when some configurations are added to the
"Spell Checker Dictionary" factory pid from web console. 
The factory pid configuration metatypes are defined using the bnd "metatype" annotations
(see DictionaryConfiguration.java).

The DictionaryService is decorated with a DictionaryAspect, which you can instantiate by adding a
configuration to the "Spell Checker Aspect Dictionary" factory pid from web console. The
aspect configuration metatype is also declared using the bnd metatype annotations (see DictionaryAspectConfiguration.java). 

Start the test: click on "dictionary.annot.bndrun" descriptor, and run it.
Then go to webconsole (http://localhost:8080/system/console/configMgr), and add some words in the 
"Spell Checker Dictionary" section, and in the "Spell Checker Aspect Dictionary" configurations.

Then go to gogo shell, and type dm help. You will normally see the dictionary.annotation:spellcheck command.
Then type:
 
   spellcheck <some words that you have configured in webconsole>

and the command will check for proper word existence.
