* @throws java.lang.Exception if error aquiring a service to place in map
*/
private Map createServiceMap( final Object entry )
throws Exception
{
final ComponentTemplate component = getMetaData( entry );
final String impl = component.getImplementationKey();
final ComponentInfo info = m_factory.createInfo( impl );
final DependencyDirective[] dependencies = component.getDependencies();
final HashMap services = new HashMap();
for( int i = 0; i < dependencies.length; i++ )
{
final DependencyDirective dependency = dependencies[ i ];
final String key = dependency.getKey();
final String providerName = dependency.getProviderName();
final boolean optional = info.getDependency( key ).isOptional();
final Object service =
getService( providerName, entry );
if( null == service )
{
final String message =
REZ.format( "resource.missing-dependency.error",
optional ? "1" : "2",
key,
component.getName() );
if( !optional )
{
throw new Exception( message );
}
else