]> SALOME platform Git repositories - tools/siman.git/blob - Workspace/Siman-Common/src/org/splat/service/ServiceLocatorImpl.java
Salome HOME
More business logic has been moved from BO to services. ServiceLocator is created...
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / service / ServiceLocatorImpl.java
1 /*****************************************************************************
2  * Company         OPEN CASCADE
3  * Application     SIMAN
4  * File            $Id$ 
5  * Creation date   19.10.2012
6  * @author         $Author$
7  * @version        $Revision$
8  * @copyright      OPEN CASCADE 2012
9  *****************************************************************************/
10
11 package org.splat.service; 
12
13 /**
14  * The service locator implementaion. This is a singleton class for providing access to business services.
15  *
16  * @author <a href="mailto:roman.kozlov@opencascade.com">Roman Kozlov (RKV)</a>
17  */
18 @Deprecated
19 public class ServiceLocatorImpl implements ServiceLocator {
20
21         /**
22          * The Locator instance.
23          */
24         static ServiceLocator theInstance;
25
26         /**
27          * Get the locator instance.
28          * @return the locator instance
29          */
30         public static ServiceLocator getInstance() {
31                 if (theInstance == null) {
32                         theInstance = new ServiceLocatorImpl();
33                 }
34                 return theInstance;
35         }
36         
37         /**
38          * Private constructor because this is a singleton class.
39          */
40         private ServiceLocatorImpl() {
41         }
42
43         /**
44          * Injected study service.
45          */
46         private StudyService _studyService;
47
48         /**
49          * Get the studyService.
50          * @return the studyService
51          */
52         public StudyService getStudyService() {
53                 return _studyService;
54         }
55
56         /**
57          * Set the studyService.
58          * @param studyService the studyService to set
59          */
60         public void setStudyService(StudyService studyService) {
61                 _studyService = studyService;
62         }
63 }