cloudfoundry-community/cf-java-component — pull request #6 by sebge2 (2014-10-27 10:54:26+00:00)
Title: introduce the notion of dynamic catalogs

Currently, catalogs are built from annotations which make them static. In our case, we have one broker offering services based on a configuration. Everything is dynamic.

In a first step, I have introduced the notion of catalog provider. One implementation is the current implementation which creates a catalog from the service broker annotation.

I have created a new implementation that calls the method annotated with @DynamicCatalog and that returns a catalog.

I have also introduced the notion of service accessor. An accessor is responsible of calling the method. The only implementation calls method annotated with @Bind, @Provision, ... so the existing code.

In other words, the catalog provider is responsible of retrieving services and how to access them. The service broker handler is simpler than before. There is a cleaner separation of concern.