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