01: /*
02: * Copyright (c) 1999-2001 Lutris Technologies, Inc. All Rights
03: * Reserved.
04: *
05: * This source code file is distributed by Lutris Technologies, Inc. for
06: * use only by licensed users of product(s) that include this source
07: * file. Use of this source file or the software that uses it is covered
08: * by the terms and conditions of the Lutris Enhydra Development License
09: * Agreement included with this product.
10: *
11: * This Software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
12: * ANY KIND, either express or implied. See the License for the specific terms
13: * governing rights and limitations under the License.
14: *
15: * Contributor(s):
16: *
17: * $Id: EmailManagerFactory.java,v 1.1 2004/05/19 18:15:19
18: */
19: package com.lutris.airsent.spec.email;
20:
21: public class EmailManagerFactory {
22:
23: /**
24: * Constructor can't be used.
25: */
26: private EmailManagerFactory() {
27: }
28:
29: /**
30: * Create a DeliveryManager as state object/value object/data transfer object
31: */
32: public static EmailManager getEmailManager(String fullClassName) {
33:
34: EmailManager result = null;
35:
36: Class objectClass = null;
37:
38: try {
39: // Create the value object
40:
41: objectClass = Class.forName(fullClassName);
42:
43: result = (EmailManager) objectClass.newInstance();
44:
45: } catch (Exception ex) {
46: System.out.println("Error on creating the object" + ex);
47: }
48:
49: return result;
50: }
51:
52: }
|