1
2
3
4
5
6
7
8
9
10
11
12
13 package org.kuali.rice.krad.service;
14
15 import org.kuali.rice.core.api.namespace.NamespaceService;
16 import org.kuali.rice.core.api.resourceloader.GlobalResourceLoader;
17 import org.kuali.rice.core.framework.persistence.platform.DatabasePlatform;
18 import org.kuali.rice.kns.service.BusinessObjectAuthorizationService;
19 import org.kuali.rice.krad.dao.BusinessObjectDao;
20 import org.kuali.rice.krad.dao.DocumentDao;
21 import org.kuali.rice.krad.util.OjbCollectionHelper;
22 import org.kuali.rice.krad.workflow.service.WorkflowAttributePropertyResolutionService;
23 import org.springframework.transaction.PlatformTransactionManager;
24 import org.springframework.transaction.support.TransactionTemplate;
25
26 public class KRADServiceLocatorInternal {
27
28 public static final String VALIDATION_COMPLETION_UTILS = "validationCompletionUtils";
29
30 public static <T extends Object> T getService(String serviceName) {
31 return GlobalResourceLoader.<T>getService(serviceName);
32 }
33
34
35 public static final String MAIL_SERVICE = "mailService";
36
37 public static final MailService getMailService() {
38 return (MailService) getService(MAIL_SERVICE);
39 }
40
41 public static final String POST_PROCESSOR_SERVICE = "postProcessorService";
42
43 public static PostProcessorService getPostProcessorService() {
44 return (PostProcessorService) getService(POST_PROCESSOR_SERVICE);
45 }
46
47 public static final String NAMESPACE_SERVICE = "namespaceService";
48
49 public static NamespaceService getNamespaceService() {
50 return (NamespaceService) getService(NAMESPACE_SERVICE);
51 }
52
53 public static final String OJB_COLLECTION_HELPER = "ojbCollectionHelper";
54
55 public static OjbCollectionHelper getOjbCollectionHelper() {
56 return (OjbCollectionHelper) getService(OJB_COLLECTION_HELPER);
57 }
58
59 public static final String TRANSACTION_MANAGER = "transactionManager";
60
61 public static PlatformTransactionManager getTransactionManager() {
62 return (PlatformTransactionManager) getService(TRANSACTION_MANAGER);
63 }
64
65 public static final String TRANSACTION_TEMPLATE = "transactionTemplate";
66
67 public static TransactionTemplate getTransactionTemplate() {
68 return (TransactionTemplate) getService(TRANSACTION_TEMPLATE);
69 }
70
71 public static final String INACTIVATION_BLOCKING_DISPLAY_SERVICE = "inactivationBlockingDisplayService";
72
73 public static InactivationBlockingDisplayService getInactivationBlockingDisplayService() {
74 return (InactivationBlockingDisplayService) getService(INACTIVATION_BLOCKING_DISPLAY_SERVICE);
75 }
76
77
78 public static final String DOCUMENT_DAO = "documentDao";
79
80 public static DocumentDao getDocumentDao() {
81 return (DocumentDao) getService(DOCUMENT_DAO);
82 }
83
84 public static final String BUSINESS_OBJECT_DAO = "businessObjectDao";
85
86 public static BusinessObjectDao getBusinessObjectDao() {
87 return (BusinessObjectDao) getService(BUSINESS_OBJECT_DAO);
88 }
89
90
91 public static final String DB_PLATFORM = "dbPlatform";
92
93 public static DatabasePlatform getDatabasePlatform() {
94 return (DatabasePlatform) getService(DB_PLATFORM);
95 }
96
97 public static final String MAINTENANCE_DOCUMENT_AUTHORIZATION_SERVICE = "maintenanceDocumentAuthorizationService";
98
99 public static BusinessObjectAuthorizationService getMaintenanceDocumentAuthorizationService() {
100 return (BusinessObjectAuthorizationService) getService(MAINTENANCE_DOCUMENT_AUTHORIZATION_SERVICE);
101 }
102
103 public static final String RICE_APPLICATION_CONFIGURATION_SERVICE = "riceApplicationConfigurationService";
104
105 public static RiceApplicationConfigurationService getRiceApplicationConfigurationService() {
106 return (RiceApplicationConfigurationService) getService(RICE_APPLICATION_CONFIGURATION_SERVICE);
107 }
108
109 public static final String WORKFLOW_ATTRIBUTE_PROPERTY_RESOLUTION_SERVICE = "workflowAttributesPropertyResolutionService";
110
111 public static WorkflowAttributePropertyResolutionService getWorkflowAttributePropertyResolutionService() {
112 return (WorkflowAttributePropertyResolutionService) getService(WORKFLOW_ATTRIBUTE_PROPERTY_RESOLUTION_SERVICE);
113 }
114
115 public static final String INACTIVATEABLE_FROM_TO_SERVICE = "inactivateableFromToService";
116
117 public static InactivateableFromToService getInactivateableFromToService() {
118 return (InactivateableFromToService) getService(INACTIVATEABLE_FROM_TO_SERVICE);
119 }
120
121 }