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: AddressManager.java,v 1.1 2006-09-11 12:27:25 sinisa Exp $
18: */
19:
20: package com.lutris.airsent.business.address;
21:
22: import com.lutris.airsent.business.AirSentBusinessException;
23: import com.lutris.airsent.spec.address.Address;
24: import com.lutris.airsent.data.person.AddressDO;
25:
26: /**
27: * Address Factory
28: *
29: *
30: * @author joseph shoop
31: * @version %I%, %G%
32: */
33: public class AddressManager {
34:
35: /**
36: * Creates an Address object.
37: * @return CustomerFac
38: * @exception AirSentBusinessException
39: */
40: public AddressImpl create() throws AirSentBusinessException {
41: try {
42: return new AddressImpl();
43: } catch (Exception ex) {
44: throw new AirSentBusinessException(
45: "Error creating Messenger");
46: }
47: }
48:
49: /**
50: * Creates an Address object from a data object
51: * @return CustomerFac
52: * @exception AirSentBusinessException
53: */
54: public AddressImpl create(AddressDO address)
55: throws AirSentBusinessException {
56: try {
57: return new AddressImpl(address);
58: } catch (Exception ex) {
59: throw new AirSentBusinessException(
60: "Error creating Messenger");
61: }
62: }
63:
64: }
|