Salome HOME
Refactoring continues: UserService is created instead of UserDirectory. Database...
[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          * Injected user service.
49          */
50         private UserService _userService;
51
52         /**
53          * Get the studyService.
54          * @return the studyService
55          */
56         public StudyService getStudyService() {
57                 return _studyService;
58         }
59
60         /**
61          * Set the studyService.
62          * @param studyService the studyService to set
63          */
64         public void setStudyService(StudyService studyService) {
65                 _studyService = studyService;
66         }
67
68         /**
69          * Get the userService.
70          * @return the userService
71          */
72         public UserService getUserService() {
73                 return _userService;
74         }
75
76         /**
77          * Set the userService.
78          * @param userService the userService to set
79          */
80         public void setUserService(UserService userService) {
81                 _userService = userService;
82         }
83 }