1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.kuali.ole.module.purap.businessobject;
21
22 import org.apache.commons.lang.builder.ToStringBuilder;
23
24 import java.util.ArrayList;
25 import java.util.HashMap;
26 import java.util.List;
27 import java.util.Map;
28
29 public class ElectronicInvoiceContact {
30
31 private String role;
32 private String addressID;
33 private String name;
34 private List postalAddresses = new ArrayList();
35 private Map<String, String> emailAddresses = new HashMap<String, String>();
36 private Map<String, String> phoneNumbers = new HashMap<String, String>();
37 private Map<String, String> faxNumbers = new HashMap<String, String>();
38 private List<String> webAddresses = new ArrayList<String>();
39
40
41
42
43 public ElectronicInvoiceContact() {
44 super();
45 }
46
47 public void addPostalAddress(ElectronicInvoicePostalAddress cpa) {
48 this.postalAddresses.add(cpa);
49 }
50
51 public void addEmailAddress(String name, String address) {
52 this.emailAddresses.put(name, address);
53 }
54
55 public void addPhoneNumber(String name,
56 String countryCode,
57 String cityOrAreaCode,
58 String number) {
59 this.phoneNumbers.put(name, countryCode + cityOrAreaCode + number);
60 }
61
62 public void addFaxNumber(String name,
63 String countryCode,
64 String cityOrAreaCode,
65 String number) {
66 this.faxNumbers.put(name, countryCode + cityOrAreaCode + number);
67 }
68
69 public void addFaxNumber(String name, String number) {
70 this.faxNumbers.put(name, number);
71 }
72
73 public void addWebAddress(String address) {
74 this.webAddresses.add(address);
75 }
76
77
78
79
80 public String getAddressID() {
81 return addressID;
82 }
83
84
85
86
87 public void setAddressID(String addressID) {
88 this.addressID = addressID;
89 }
90
91
92
93
94 public Map<String, String> getEmailAddresses() {
95 return emailAddresses;
96 }
97
98
99
100
101 public void setEmailAddresses(Map emailAddresses) {
102 this.emailAddresses = emailAddresses;
103 }
104
105
106
107
108 public Map<String, String> getFaxNumbers() {
109 return faxNumbers;
110 }
111
112
113
114
115 public void setFaxNumbers(Map faxNumbers) {
116 this.faxNumbers = faxNumbers;
117 }
118
119
120
121
122 public String getName() {
123 return name;
124 }
125
126
127
128
129 public void setName(String name) {
130 this.name = name;
131 }
132
133
134
135
136 public Map<String, String> getPhoneNumbers() {
137 return phoneNumbers;
138 }
139
140
141
142
143 public void setPhoneNumbers(Map phoneNumbers) {
144 this.phoneNumbers = phoneNumbers;
145 }
146
147
148
149
150 public List<ElectronicInvoicePostalAddress> getPostalAddresses() {
151 return postalAddresses;
152 }
153
154
155
156
157 public void setPostalAddresses(List<ElectronicInvoicePostalAddress> postalAddresses) {
158 this.postalAddresses = postalAddresses;
159 }
160
161
162
163
164 public String getRole() {
165 return role;
166 }
167
168
169
170
171 public void setRole(String role) {
172 this.role = role;
173 }
174
175
176
177
178 public List<String> getWebAddresses() {
179 return webAddresses;
180 }
181
182
183
184
185 public void setWebAddresses(List webAddresses) {
186 this.webAddresses = webAddresses;
187 }
188
189 public String toString() {
190
191 ToStringBuilder toString = new ToStringBuilder(this);
192 toString.append("Role", getRole());
193 toString.append("Name", getName());
194 toString.append("AddressId", getAddressID());
195 toString.append("PostalAddress", getPostalAddresses());
196 toString.append("EmailAddresses", getEmailAddresses());
197 toString.append("phoneNumbers", getPhoneNumbers());
198 toString.append("FaxNumbers", getFaxNumbers());
199 toString.append("URLs", getWebAddresses());
200
201
202 return toString.toString();
203 }
204 }
205
206