URLArtifactProcessor<SCADefinitions> definitionsProcessor =
documentProcessors.getProcessor(SCADefinitions.class);
SCADefinitionsProviderExtensionPoint scaDefnProviders =
registry.getExtensionPoint(SCADefinitionsProviderExtensionPoint.class);
SCADefinitions systemSCADefinitions = new SCADefinitionsImpl();
SCADefinitions aSCADefn = null;
for (SCADefinitionsProvider aProvider : scaDefnProviders.getSCADefinitionsProviders()) {
aSCADefn = aProvider.getSCADefinition();
SCADefinitionsUtil.aggregateSCADefinitions(aSCADefn, systemSCADefinitions);
}
policyDefinitions.add(systemSCADefinitions);
//we cannot expect that providers will add the intents and policysets into the resolver
//so we do this here explicitly
for (Intent intent : systemSCADefinitions.getPolicyIntents()) {
policyDefinitionsResolver.addModel(intent);
}
for (PolicySet policySet : systemSCADefinitions.getPolicySets()) {
policyDefinitionsResolver.addModel(policySet);
}
for (IntentAttachPointType attachPoinType : systemSCADefinitions.getBindingTypes()) {
policyDefinitionsResolver.addModel(attachPoinType);
}
for (IntentAttachPointType attachPoinType : systemSCADefinitions.getImplementationTypes()) {
policyDefinitionsResolver.addModel(attachPoinType);
}
//now that all system sca definitions have been read, lets resolve them right away
definitionsProcessor.resolve(systemSCADefinitions, policyDefinitionsResolver);