}
private void loadSCADefinitions(ExtensionPointRegistry registry) throws ActivationException {
try {
URLArtifactProcessorExtensionPoint documentProcessors = registry.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
SCADefinitionsDocumentProcessor definitionsProcessor = (SCADefinitionsDocumentProcessor)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);
}
//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() ) {
definitionsProcessor.getSCADefinitionsResolver().addModel(intent);
}
for ( PolicySet policySet : systemSCADefinitions.getPolicySets() ) {
definitionsProcessor.getSCADefinitionsResolver().addModel(policySet);
}
for ( IntentAttachPointType attachPoinType : systemSCADefinitions.getBindingTypes() ) {
definitionsProcessor.getSCADefinitionsResolver().addModel(attachPoinType);
}
for ( IntentAttachPointType attachPoinType : systemSCADefinitions.getImplementationTypes() ) {
definitionsProcessor.getSCADefinitionsResolver().addModel(attachPoinType);
}
//now that all system sca definitions have been read, lets resolve them rightaway
definitionsProcessor.resolve(systemSCADefinitions,
definitionsProcessor.getSCADefinitionsResolver());
} catch ( Exception e ) {
throw new ActivationException(e);
}
/*URLArtifactProcessorExtensionPoint documentProcessors = registry.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);