aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Nuttall <>
Subject Exposing the Parser via a ParserService
Date Thu, 03 Dec 2009 12:55:00 GMT
We've a need to parse blueprint xml on behalf of an external, broadly
administrative client application. I propose to have the
BlueprintExtender publish a service,

public interface ParserService {
	ComponentDefinitionRegistry parse (List<URL> urls, Bundle
clientBundle) throws Exception;
	ComponentDefinitionRegistry parse (List<URL> urls, Bundle
clientBundle, boolean validate) throws Exception;

in the course of prototyping this we realised that the recent changes
to the ComponentDefinitionRegistry  constructor make this difficult to
do. Our proposed change is to extend the ComponentDefinitionRegistry
interface and ComponentDefinitionRegistryImpl class both, via a new

public interface LiveComponentDefinitionRegistry extends
ComponentDefinitionRegistry {
  BlueprintContainer getBlueprintContainer();
  Bundle getBlueprintBundle();
  BundleContext getBlueprintBundleContext();
  Converter getBlueprintConverter();

The point here is that NamespaceHandlers, if they wish to use these
methods, must use the LiveComponentDefinitionRegistry interface, so
acknowledging that they are operating on a running, or Live
ComponentDefinitionRegistry, and not one that we've created just to
hand back to a client of a ParserService.

Do let me know if you've objections.



View raw message