Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-10700

Support the list of named services to be fetched by interface class name

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 5.0.0
    • None
    • None
    • Turing
    • Turing Sprint 154

    Description

      The HST needs to expose Channel objects over shared api to be accessible in the CMS webapp. For this the HST must register a named service, something like

      HippoServiceRegistry.registerService(this, SharedChannelService.class, SharedChannelServiceImpl.class.getName());
      

      However, the above is not good enough to support multiple HST webapps, because then multiple webapps will try to register the same named service.

      Obviously, it isn't a singleton service either, and neither a whiteboard service. Thus we need to register the service something like

      HippoServiceRegistry.registerService(this, SharedChannelService.class, contextPath + "-" + SharedChannelServiceImpl.class.getName());
      

      thus including the contextpath in the name.

      Now we have the problem that in the CMS webapp, we'd like to be able to get hold of all SharedChannelService services : This is because the HST can only populate those channels that are 'meant' for the specific webapp the HST is running in. Thus for example, /site can only provide the site channels, /intranet can only provide the intranet channels.

      As a result, the CMS (REPO) webapp needs to be abel to call something like:

              List<SharedChannelService> services = HippoServiceRegistry.getServices(SharedChannelService.class);
              for (SharedChannelService service : services) {
                  Map<String, Channel> localhost = service.getChannels("localhost");
              }
      

      But at this moment, there is no way to get all named services for a certain class....and obviously, in the cms webapp we do not know the name of the service to fetch it. We need to add support for this

      HippoServiceRegistry.getServices
      

      method

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aschrijvers Ard Schrijvers
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: