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 final class ServiceLocatorImpl implements ServiceLocator {
22 * The Locator instance.
24 static private ServiceLocator theInstance = new ServiceLocatorImpl();
27 * Get the locator instance.
28 * @return the locator instance
30 public static ServiceLocator getInstance() {
35 * Private constructor because this is a singleton class.
37 private ServiceLocatorImpl() {
41 * Injected study service.
43 private StudyService _studyService;
45 * Injected user service.
47 private UserService _userService;
50 * Get the studyService.
51 * @return the studyService
53 public StudyService getStudyService() {
58 * Set the studyService.
59 * @param studyService the studyService to set
61 public void setStudyService(final StudyService studyService) {
62 _studyService = studyService;
66 * Get the userService.
67 * @return the userService
69 public UserService getUserService() {
74 * Set the userService.
75 * @param userService the userService to set
77 public void setUserService(final UserService userService) {
78 _userService = userService;