01: /*
02: * Copyright (c) 2002-2003 by OpenSymphony
03: * All rights reserved.
04: */
05: package com.opensymphony.workflow.spi.hibernate;
06:
07: import com.opensymphony.workflow.FactoryException;
08: import com.opensymphony.workflow.loader.XMLWorkflowFactory;
09:
10: import java.util.Properties;
11:
12: /**
13: * DOCUMENT ME!
14: */
15: public class SpringWorkflowFactory extends XMLWorkflowFactory {
16: //~ Instance fields ////////////////////////////////////////////////////////
17:
18: private String resource;
19:
20: //~ Constructors ///////////////////////////////////////////////////////////
21:
22: public SpringWorkflowFactory() {
23: super ();
24: }
25:
26: //~ Methods ////////////////////////////////////////////////////////////////
27:
28: public void setReload(String reload) {
29: this .reload = Boolean.valueOf(reload).booleanValue();
30: }
31:
32: public void setResource(String resource) {
33: this .resource = resource;
34: }
35:
36: public void init() {
37: try {
38: Properties props = new Properties();
39: props.setProperty("reload", getReload());
40: props.setProperty("resource", getResource());
41:
42: super .init(props);
43: initDone();
44: } catch (FactoryException e) {
45: throw new RuntimeException(e);
46: }
47: }
48:
49: private String getReload() {
50: return String.valueOf(reload);
51: }
52:
53: private String getResource() {
54: return resource;
55: }
56: }
|