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: CustomerManagerFactory.java,v 1.1 2006-09-11 12:29:26 sinisa Exp $
18: */
19: package com.lutris.airsent.spec.customer;
20:
21: public class CustomerManagerFactory {
22:
23: /**
24: * Constructor can't be used.
25: */
26: private CustomerManagerFactory() {
27: }
28:
29: /**
30: * Create a CustomerManager as state object/value object/data transfer object
31: */
32: public static CustomerManager getCustomerManager(
33: String fullClassName) {
34:
35: CustomerManager result = null;
36:
37: Class objectClass = null;
38:
39: try {
40: // Create the value object
41:
42: objectClass = Class.forName(fullClassName);
43:
44: result = (CustomerManager) objectClass.newInstance();
45:
46: } catch (Exception ex) {
47: System.out.println("Error on creating the object" + ex);
48: }
49:
50: return result;
51: }
52: }
|