1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kim.config;
17
18 import java.util.ArrayList;
19 import java.util.List;
20
21 import org.kuali.rice.core.config.ModuleConfigurer;
22 import org.kuali.rice.core.config.event.RiceConfigEvent;
23 import org.kuali.rice.core.config.event.RiceConfigEventListener;
24
25
26
27
28
29
30
31 public class KIMConfigurer extends ModuleConfigurer {
32 private static final String KIM_INTERFACE_SPRING_BEANS_PATH = "classpath:org/kuali/rice/kim/config/KIMInterfaceSpringBeans.xml";
33 private static final String KIM_IMPL_SPRING_BEANS_PATH = "classpath:org/kuali/rice/kim/config/KIMImplementationSpringBeans.xml";
34 private static final String KIM_KSB_SPRING_BEANS_PATH = "classpath:org/kuali/rice/kim/config/KIMServiceBusSpringBeans.xml";
35 private static final String KIM_KSB_SOAP_DEFAULT_SPRING_BEANS_PATH = "classpath:org/kuali/rice/kim/config/KIMServiceBusSOAPDefaultSpringBeans.xml";
36 private static final String KIM_UI_SPRING_BEANS_PATH = "classpath:org/kuali/rice/kim/config/KIMUserInterfaceSpringBeans.xml";
37
38 private List<RiceConfigEventListener> configEventListeners = new ArrayList<RiceConfigEventListener>();
39
40
41
42
43 public KIMConfigurer() {
44 super();
45 setModuleName( "KIM" );
46 setHasWebInterface( true );
47 VALID_RUN_MODES.remove( THIN_RUN_MODE );
48 }
49
50 @Override
51 public String getSpringFileLocations() {
52 StringBuffer springFileLocations = new StringBuffer( KIM_INTERFACE_SPRING_BEANS_PATH );
53 if ( getRunMode().equals( LOCAL_RUN_MODE ) || getRunMode().equals( EMBEDDED_RUN_MODE ) ) {
54 springFileLocations.append(',').append(KIM_IMPL_SPRING_BEANS_PATH);
55 }
56 if ( exposeServicesOnBus ) {
57 if (setSOAPServicesAsDefault) {
58 springFileLocations.append(',').append(KIM_KSB_SOAP_DEFAULT_SPRING_BEANS_PATH);
59 } else {
60 springFileLocations.append(',').append(KIM_KSB_SPRING_BEANS_PATH);
61 }
62 }
63 if ( includeUserInterfaceComponents ) {
64 springFileLocations.append(',').append(KIM_UI_SPRING_BEANS_PATH);
65 }
66 return springFileLocations.toString();
67 }
68
69 public void registerConfigEventListener(RiceConfigEventListener listener) {
70 configEventListeners.add(listener);
71 }
72
73
74
75
76
77
78 @Override
79 public void onEvent(RiceConfigEvent event) throws Exception {
80 super.onEvent(event);
81 for (RiceConfigEventListener listener : configEventListeners) {
82 listener.onEvent(event);
83 }
84 }
85
86 }