1 /*****************************************************************************
5 * Creation date 19.10.2012
8 * @copyright OPEN CASCADE 2012
9 *****************************************************************************/
11 package org.splat.service;
14 * The service locator implementaion. This is a singleton class for providing access to business services.
16 * @author <a href="mailto:roman.kozlov@opencascade.com">Roman Kozlov (RKV)</a>
19 public class ServiceLocatorImpl implements ServiceLocator {
22 * The Locator instance.
24 static ServiceLocator theInstance;
27 * Get the locator instance.
28 * @return the locator instance
30 public static ServiceLocator getInstance() {
31 if (theInstance == null) {
32 theInstance = new ServiceLocatorImpl();
38 * Private constructor because this is a singleton class.
40 private ServiceLocatorImpl() {
44 * Injected study service.
46 private StudyService _studyService;
48 * Injected user service.
50 private UserService _userService;
53 * Get the studyService.
54 * @return the studyService
56 public StudyService getStudyService() {
61 * Set the studyService.
62 * @param studyService the studyService to set
64 public void setStudyService(StudyService studyService) {
65 _studyService = studyService;
69 * Get the userService.
70 * @return the userService
72 public UserService getUserService() {
77 * Set the userService.
78 * @param userService the userService to set
80 public void setUserService(UserService userService) {
81 _userService = userService;