2 * Copyright (C) 2016, 2017 Roland Häder
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Affero General Public License as
6 * published by the Free Software Foundation, either version 3 of the
7 * License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Affero General Public License for more details.
14 * You should have received a copy of the GNU Affero General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 package org.mxchange.jfinancials.beans.businesscontact;
19 import javax.annotation.PostConstruct;
20 import javax.enterprise.context.SessionScoped;
21 import javax.faces.view.facelets.FaceletException;
22 import javax.inject.Named;
23 import javax.naming.Context;
24 import javax.naming.InitialContext;
25 import javax.naming.NamingException;
26 import org.mxchange.jcontactsbusiness.BusinessDataAdminSessionBeanRemote;
27 import org.mxchange.jcountry.data.Country;
28 import org.mxchange.jfinancials.beans.BaseFinancialsController;
31 * An administrative business contact bean (controller)
33 * @author Roland Häder<roland@mxchange.org>
35 @Named ("adminBusinessDataController")
37 public class FinancialsAdminBusinessContactWebRequestBean extends BaseFinancialsController implements FinancialsAdminBusinessContactWebRequestController {
42 private static final long serialVersionUID = 56_189_028_928_374L;
47 private BusinessDataAdminSessionBeanRemote adminBusinessDataBean;
50 * Comments for this company
52 private String companyComments;
55 * Companies (main) email address (example: info@company.example)
57 private String companyEmailAddress;
60 * Company legal status (example: Incorporated, GmbH)
62 private String companyLegalStatus;
67 private String companyName;
70 * Area code for fax number
72 private Integer faxAreaCode;
75 * Country for fax number
77 private Country faxCountry;
80 * Dial number for fax number
82 private Long faxNumber;
85 * Area code for land-line number
87 private Integer landLineAreaCode;
90 * Country for land-line number
92 private Country landLineCountry;
95 * Dial number for land-line number
97 private Long landLineNumber;
102 public FinancialsAdminBusinessContactWebRequestBean () {
103 // Call super constructor
108 * Getter for comments
112 public String getCompanyComments () {
113 return this.companyComments;
117 * Setter for comments
119 * @param companyComments Comments
121 public void setCompanyComments (final String companyComments) {
122 this.companyComments = companyComments;
126 * Getter for company's (main) email address
128 * @return Company's (main) email address
130 public String getCompanyEmailAddress () {
131 return this.companyEmailAddress;
135 * Setter for company's (main) email address
137 * @param companyEmailAddress Company's (main) email address
139 public void setCompanyEmailAddress (final String companyEmailAddress) {
140 this.companyEmailAddress = companyEmailAddress;
144 * Getter for company's legal status
146 * @return Company's legal status
148 public String getCompanyLegalStatus () {
149 return this.companyLegalStatus;
153 * Setter for company's legal status
155 * @param companyLegalStatus Company's legal status
157 public void setCompanyLegalStatus (final String companyLegalStatus) {
158 this.companyLegalStatus = companyLegalStatus;
162 * Getter for company name
164 * @return Company name
166 public String getCompanyName () {
167 return this.companyName;
171 * Setter for company name
173 * @param companyName Company name
175 public void setCompanyName (final String companyName) {
176 this.companyName = companyName;
180 * Getter for fax number's area code
182 * @return Fax number's area code
184 public Integer getFaxAreaCode () {
185 return this.faxAreaCode;
189 * Setter for fax number's area code
191 * @param faxAreaCode Fax number's area code
193 public void setFaxAreaCode (final Integer faxAreaCode) {
194 this.faxAreaCode = faxAreaCode;
198 * Getter for fax's country instance
200 * @return Fax' country instance
202 public Country getFaxCountry () {
203 return this.faxCountry;
207 * Setter for fax's country instance
209 * @param faxCountry Fax' country instance
211 public void setFaxCountry (final Country faxCountry) {
212 this.faxCountry = faxCountry;
216 * Getter for fax number
220 public Long getFaxNumber () {
221 return this.faxNumber;
225 * Setter for fax number
227 * @param faxNumber Fax number
229 public void setFaxNumber (final Long faxNumber) {
230 this.faxNumber = faxNumber;
234 * Getter for land-line number's area code
236 * @return Land-line number's area code
238 public Integer getLandLineAreaCode () {
239 return this.landLineAreaCode;
243 * Setter for land-line number's area code
245 * @param landLineAreaCode Land-line number's area code
247 public void setLandLineAreaCode (final Integer landLineAreaCode) {
248 this.landLineAreaCode = landLineAreaCode;
252 * Getter for land-line number's country instance
254 * @return Land-line number's country instance
256 public Country getLandLineCountry () {
257 return this.landLineCountry;
261 * Setter for land-line number's country instance
263 * @param landLineCountry Land-line number's country instance
265 public void setLandLineCountry (final Country landLineCountry) {
266 this.landLineCountry = landLineCountry;
270 * Getter for land-line number
272 * @return Land-line number
274 public Long getLandLineNumber () {
275 return this.landLineNumber;
279 * Setter for land-line number
281 * @param landLineNumber Land-line number
283 public void setLandLineNumber (final Long landLineNumber) {
284 this.landLineNumber = landLineNumber;
288 * Post-initialization of this class
291 public void init () {
294 // Get initial context
295 Context context = new InitialContext();
298 this.adminBusinessDataBean = (BusinessDataAdminSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/adminBusinessData!org.mxchange.jcontactsbusiness.BusinessDataAdminSessionBeanRemote"); //NOI18N
299 } catch (final NamingException e) {
301 throw new FaceletException(e);