01: /*
02: * Copyright 2005-2007 The Kuali Foundation.
03: *
04: *
05: * Licensed under the Educational Community License, Version 1.0 (the "License");
06: * you may not use this file except in compliance with the License.
07: * You may obtain a copy of the License at
08: *
09: * http://www.opensource.org/licenses/ecl1.php
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package edu.iu.uis.eden.core;
18:
19: import java.util.LinkedList;
20: import java.util.List;
21:
22: import org.kuali.rice.core.Core;
23: import org.kuali.rice.lifecycle.BaseCompositeLifecycle;
24: import org.kuali.rice.lifecycle.Lifecycle;
25:
26: import edu.iu.uis.eden.core.dependencylifecycles.SpringLifeCycle;
27: import edu.iu.uis.eden.core.dependencylifecycles.XmlPipelineLifeCycle;
28: import edu.iu.uis.eden.mail.EmailReminderLifecycle;
29:
30: /**
31: * A temporary lifecycle that lives in embedded space. Will be removed when the embedded plugin is factored out.
32: * @author ewestfal
33: */
34: public class TempEmbeddedLifeCycle extends BaseCompositeLifecycle {
35:
36: /* (non-Javadoc)
37: * @see org.kuali.rice.lifecycle.BaseCompositeLifecycle#loadLifecycles()
38: */
39: @Override
40: protected List<Lifecycle> loadLifecycles() throws Exception {
41: List<Lifecycle> lifecycles = new LinkedList<Lifecycle>();
42: String springLocation = Core.getCurrentContextConfig()
43: .getAlternateSpringFile();
44: if (springLocation == null) {
45: springLocation = "org/kuali/workflow/resources/KewSpringBeans.xml";
46: }
47: lifecycles.add(new SpringLifeCycle(springLocation));
48: lifecycles.add(new WebApplicationGlobalResourceLifecycle());
49: if (Core.getCurrentContextConfig()
50: .getRunningEmbeddedServerMode()) {
51: lifecycles.add(new XmlPipelineLifeCycle());
52: lifecycles.add(new EmailReminderLifecycle());
53: }
54: return lifecycles;
55: }
56:
57: }
|