Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-5559

Add FullTextSessionFactory class which is exposed as a spring bean

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: Should
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Core 2.3.0, Platform 2.2.1
    • Component/s: None
    • Labels:
    • Complexity:
      Medium

      Description

      Currently, the FullTextSession instances are obtained by calling LuceneQuery.getFullTextSession(), it would be nice and of great value to add an explicit Factory for these instances and expose it as a spring bean. One of the benefits of this change is it would allow a module to advise the spring bean and do some cool stuff before returning the FullTextSession instances.

      One of the use cases for this, is so that a module can place the target full test session objects inside wrappers that will be returned so that it can enable filters on the targets in a single centralized place before returning them instead of doing it all over the code base which still leaves holes anyways.

      Alternatively, FullTextSession should provide a mechanism to notify listeners whenever a new FullTextQuery object is created, so that they can do something extra stuff it e.g. enable/disable filters.

      This should be a very simple change with no backwards compatibility issues, therefore, we can backport it to the 2.2.x branch.

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              wyclif Wyclif Luyima
              Reporter:
              wyclif Wyclif Luyima
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: