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;
49 * Injected publication service.
51 private PublicationService _publicationService;
54 * Get the studyService.
55 * @return the studyService
57 public StudyService getStudyService() {
62 * Set the studyService.
63 * @param studyService the studyService to set
65 public void setStudyService(final StudyService studyService) {
66 _studyService = studyService;
70 * Get the userService.
71 * @return the userService
73 public UserService getUserService() {
78 * Set the userService.
79 * @param userService the userService to set
81 public void setUserService(final UserService userService) {
82 _userService = userService;
86 * Get the publicationService.
87 * @return the publicationService
89 public PublicationService getPublicationService() {
90 return _publicationService;
94 * Set the publicationService.
95 * @param publicationService the publicationService to set
97 public void setPublicationService(final PublicationService publicationService) {
98 _publicationService = publicationService;