1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krms.config;
17
18 import org.kuali.rice.core.api.config.module.RunMode;
19 import org.kuali.rice.core.framework.config.module.ModuleConfigurer;
20 import org.kuali.rice.krms.api.KrmsConstants;
21
22 import java.util.ArrayList;
23 import java.util.Arrays;
24 import java.util.List;
25
26
27
28
29
30
31
32 public class KRMSConfigurer extends ModuleConfigurer {
33
34 private static final String KRMS_SPRING_LOCAL_BEANS_PATH = "classpath:org/kuali/rice/krms/config/KRMSLocalSpringBeans.xml";
35 private static final String KRMS_SPRING_REMOTE_BEANS_PATH = "classpath:org/kuali/rice/krms/config/KRMSRemoteSpringBeans.xml";
36
37 public KRMSConfigurer() {
38 super(KrmsConstants.Namespaces.MODULE_NAME);
39 setValidRunModes(Arrays.asList(RunMode.REMOTE, RunMode.LOCAL));
40 }
41
42 @Override
43 public List<String> getPrimarySpringFiles() {
44 List<String> springFileLocations = new ArrayList<String>();
45 if (RunMode.REMOTE == getRunMode()) {
46 springFileLocations.add(KRMS_SPRING_REMOTE_BEANS_PATH);
47 } else if (RunMode.LOCAL == getRunMode()) {
48 springFileLocations.add(KRMS_SPRING_LOCAL_BEANS_PATH);
49 }
50 return springFileLocations;
51 }
52 }