final String providerName = dependency.getProviderName();
final String key = dependency.getKey();
final String type = info.getDependency( key ).getComponentType();
//Get the other component that is providing service
final ComponentProfile provider = getComponentProfile(
providerName, others );
if( null == provider )
{
final String message =
REZ.format( "assembly.missing-dependency.error",
key,
providerName,
component.getTemplate().getName() );
throw new Exception( message );
}
//make sure that the component offers service
//that user expects it to be providing
final ComponentInfo providerInfo = provider.getInfo();
final ServiceDescriptor[] services = providerInfo.getServices();
if( !hasMatchingService( type, services ) )
{
final String message =
REZ.format( "assembly.dependency-missing-service.error",