Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-21826

Always look up services through Framework.getService instead of using explicit runtime components

    XMLWordPrintable

    Details

    • Type: Clean up
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 11.1, 2021.0
    • Component/s: Runtime

      Description

      There are still a number of places where we look up services through code like:

      return (LifeCycleService) Framework.getRuntime().getComponent(LifeCycleServiceImpl.NAME);
      

      All these calls should be replaced by proper service lookup through Framework.getService().

      In addition this avoids a synchronization issue on getComponent.

      This applies to:

      • ActionService
      • CommentService
      • DirectoryTreeService
      • DocumentsListsService
      • DublinCoreStorageService
      • LifeCycleService
      • MimetypeRegistryService
      • NXAuditEventsService
      • NotificationService
      • PluggableAuthenticationService
      • PluggableRestletService
      • RelationService
      • RepositoryService
      • SecurityService
      • SegmentIOComponent
      • TrashManagementService
      • UIPermissionService
      • UserWorkspaceService
      • WebDavService

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 days
                4d