01: /*
02: *
03: */
04: package org.enhydra.snapperAdmin.spec;
05:
06: import org.enhydra.snapperAdmin.spec.SiteList;
07:
08: public class SiteListFactory {
09:
10: /**
11: * Constructor can't be used.
12: */
13: private SiteListFactory() {
14: }
15:
16: /**
17: * Create a Site as state object/value object/data transfer object
18: */
19: public static SiteList getSiteList(String fullClassName)
20: throws Exception {
21:
22: SiteList result = null;
23:
24: Class objectClass = null;
25:
26: try {
27: // Create the value object
28:
29: objectClass = Class.forName(fullClassName);
30:
31: result = (SiteList) objectClass.newInstance();
32:
33: } catch (Exception ex) {
34: System.out.println("Error on creating the object: " + ex);
35: }
36:
37: return result;
38: }
39:
40: }
|