View Javadoc

1   package org.kuali.ole.docstore.discovery.service;
2   
3   /**
4    * Class for getting services without depending on the implementation classes.
5    * User: tirumalesh.b
6    * Date: 22/12/11 Time: 8:05 PM
7    */
8   public class ServiceLocator {
9       private static IndexerService indexerService = null;
10      private static DiscoveryService discoveryService = null;
11      private static QueryService queryService = null;
12  
13      public static IndexerService getIndexerService() {
14          if (null == indexerService) {
15              indexerService = IndexerServiceImpl.getInstance();
16          }
17          return indexerService;
18      }
19  
20      public static DiscoveryService getDiscoveryService() {
21          if (null == discoveryService) {
22              discoveryService = DiscoveryServiceImpl.getInstance();
23          }
24          return discoveryService;
25      }
26  
27      public static QueryService getQueryService() {
28          if (null == queryService) {
29              queryService = QueryServiceImpl.getInstance();
30          }
31          return queryService;
32      }
33  
34  }