1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kew.framework; |
17 | |
|
18 | |
import org.kuali.rice.core.api.resourceloader.GlobalResourceLoader; |
19 | |
import org.kuali.rice.kew.api.KewApiConstants; |
20 | |
import org.kuali.rice.kew.framework.docsearch.DocumentSearchCustomizationService; |
21 | |
import org.kuali.rice.ksb.api.KsbApiServiceLocator; |
22 | |
|
23 | |
import javax.xml.namespace.QName; |
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | 0 | public class KewFrameworkServiceLocator { |
29 | |
|
30 | |
public static final String DOCUMENT_SEARCH_CUSTOMIZATION_SERVICE = "documentSearchCustomizationServiceSoap"; |
31 | |
|
32 | |
static <T> T getService(String serviceName) { |
33 | 0 | return GlobalResourceLoader.<T>getService(serviceName); |
34 | |
} |
35 | |
|
36 | |
static <T> T getServiceOnBus(String serviceName, String applicationId) { |
37 | 0 | return (T)KsbApiServiceLocator.getServiceBus().getService(new QName(KewApiConstants.Namespaces.KEW_NAMESPACE_2_0, serviceName), applicationId); |
38 | |
} |
39 | |
|
40 | |
public static DocumentSearchCustomizationService getDocumentSearchCustomizationService() { |
41 | 0 | return getDocumentSearchCustomizationService(null); |
42 | |
} |
43 | |
|
44 | |
public static DocumentSearchCustomizationService getDocumentSearchCustomizationService(String applicationId) { |
45 | 0 | return getServiceOnBus(DOCUMENT_SEARCH_CUSTOMIZATION_SERVICE, applicationId); |
46 | |
} |
47 | |
|
48 | |
} |