/*
 * 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 how to define a dynamic dependency using annotations.

When you declare a Component:

- the configuration (if any) is first injected (updated callback).
- then all required dependencies are injected, except "named" dependencies whose required flag and filter can be configured
dynamically from the init method.
- then the init method (annotated with @Init) is invoked; And from there you are then able return a Map that will be used
to configure the required flag and the filter of all named dependencies.
- then the start callback (annotated with @Start) is invoked when all required dependencies are injected, including named 
dependencies that have been configured from the init method.

In this sample, the "DynamicDependency" Components configures in its "init" method the dependency having a "storage" name. 
the dependency "required" flag and filter string are loaded from a Configuration PID 
(see the "Dynamic Dependency Configuration (annotation)" PID, from webconsole), which is defined using 
Bnd MetaType Annotations.
So, you have configure the "Dynamic Dependency Configuration (annotation)" PID from web console before playing with this sample; then
just type "log info|grep dynamicdep.annot" under the gogo shell.

