2 * Copyright (C) 2017 RRoland 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.business.employee;
20 import javax.enterprise.context.RequestScoped;
21 import javax.enterprise.event.Event;
22 import javax.enterprise.inject.Any;
23 import javax.inject.Inject;
24 import javax.inject.Named;
25 import org.mxchange.jcontacts.model.contact.Contact;
26 import org.mxchange.jcontactsbusiness.events.employee.added.ObservableEmployeeAddedEvent;
27 import org.mxchange.jcontactsbusiness.model.basicdata.BusinessBasicData;
28 import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
29 import org.mxchange.jcontactsbusiness.model.department.Department;
30 import org.mxchange.jcontactsbusiness.model.employee.AdminCompanyEmployeeSessionBeanRemote;
31 import org.mxchange.jcontactsbusiness.model.headquarters.HeadquartersData;
32 import org.mxchange.jfinancials.beans.BaseFinancialsBean;
33 import org.mxchange.jphone.model.phonenumbers.mobileprovider.MobileProvider;
34 import org.mxchange.jusercore.model.user.User;
37 * A request-scoped bean for administrative purposes for company employees.
39 * @author Roland Häder<roland@mxchange.org>
41 @Named ("adminEmployeeController")
43 public class FinancialsAdminEmployeeWebRequestBean extends BaseFinancialsBean implements FinancialsAdminEmployeeWebRequestController {
48 private static final long serialVersionUID = 12_886_968_547_360L;
51 * An event being fired when an employee has been added
55 private Event<ObservableEmployeeAddedEvent> addedEmployeeEvent;
58 * EJB for administrative company employee purposes
60 @EJB (lookup = "java:global/jfinancials-ejb/adminCompanyEmployee!org.mxchange.jcontactsbusiness.model.employee.AdminCompanyEmployeeSessionBeanRemote")
61 private AdminCompanyEmployeeSessionBeanRemote adminCompanyEmployeeBean;
64 * Assigned branch office
66 private BranchOffice employeeBranchOffice;
69 * Assigned basic data instance
71 private BusinessBasicData employeeCompany;
74 * Department where employee works (alternative to headquarters)
76 private Department employeeDepartment;
79 * Employee's business email address
81 private String employeeEmailAddress;
84 * Employee's Headquarters data, if he is working there
86 private HeadquartersData employeeHeadquarters;
89 * Assigned personal data of the employee
91 private Contact employeePersonalContact;
94 * Employee's phone extension (on top of a "main number")
96 private Long employeePhoneExtension;
99 * Employee's staff number
101 private Long employeeStaffNumber;
104 * Assigned user account
106 private User employeeUserOwner;
109 * Mobile number for employee's business mobile
111 private Long mobileNumber;
114 * Mobile provider instance for employee's business mobile
116 private MobileProvider mobileProvider;
119 * Default constructor
121 public FinancialsAdminEmployeeWebRequestBean () {
122 // Call super constructor
127 * Getter for employee's assigned branch office
129 * @return Employee's assigned branch office
131 public BranchOffice getEmployeeBranchOffice () {
132 return this.employeeBranchOffice;
136 * Setter for employee's assigned branch office
138 * @param employeeBranchOffice Employee's assigned branch office
140 public void setEmployeeBranchOffice (final BranchOffice employeeBranchOffice) {
141 this.employeeBranchOffice = employeeBranchOffice;
145 * Getter for employee's assigned basic company data
147 * @return Employee's assigned basic company data
149 public BusinessBasicData getEmployeeCompany () {
150 return this.employeeCompany;
154 * Setter for employee's assigned basic company data
156 * @param employeeCompany Employee's assigned basic company data
158 public void setEmployeeCompany (final BusinessBasicData employeeCompany) {
159 this.employeeCompany = employeeCompany;
163 * Getter for employee's assigned department
165 * @return Employee's assigned department
167 public Department getEmployeeDepartment () {
168 return this.employeeDepartment;
172 * Setter for employee's assigned department
174 * @param employeeDepartment Employee's assigned department
176 public void setEmployeeDepartment (final Department employeeDepartment) {
177 this.employeeDepartment = employeeDepartment;
181 * Getter for employee's business email address
183 * @return Employee's business email address
185 public String getEmployeeEmailAddress () {
186 return this.employeeEmailAddress;
190 * Setter for employee's business email address
192 * @param employeeEmailAddress Employee's business email address
194 public void setEmployeeEmailAddress (final String employeeEmailAddress) {
195 this.employeeEmailAddress = employeeEmailAddress;
199 * Getter for employee's assigned headquarters (if no branch office)
201 * @return Employee's assigned headquarters
203 public HeadquartersData getEmployeeHeadquarters () {
204 return this.employeeHeadquarters;
208 * Setter for employee's assigned headquarters (if no branch office)
210 * @param employeeHeadquarters Employee's assigned headquarters
212 public void setEmployeeHeadquarters (final HeadquartersData employeeHeadquarters) {
213 this.employeeHeadquarters = employeeHeadquarters;
217 * Getter for employee's personal contact data
219 * @return Employee's personal contact data
221 public Contact getEmployeePersonalContact () {
222 return this.employeePersonalContact;
226 * Setter for employee's personal contact data
228 * @param employeePersonalContact Employee's personal contact data
230 public void setEmployeePersonalContact (final Contact employeePersonalContact) {
231 this.employeePersonalContact = employeePersonalContact;
235 * Getter for employee's phone extension
237 * @return Employee's phone extension
239 public Long getEmployeePhoneExtension () {
240 return this.employeePhoneExtension;
244 * Getter for employee's phone extension
246 * @param employeePhoneExtension Employee's phone extension
248 public void setEmployeePhoneExtension (final Long employeePhoneExtension) {
249 this.employeePhoneExtension = employeePhoneExtension;
253 * Getter for employee's staff number
255 * @return Employee's staff number
257 public Long getEmployeeStaffNumber () {
258 return this.employeeStaffNumber;
262 * Setter for employee's staff number
264 * @param employeeStaffNumber Employee's staff number
266 public void setEmployeeStaffNumber (final Long employeeStaffNumber) {
267 this.employeeStaffNumber = employeeStaffNumber;
271 * Getter for employee's user "owner"
273 * @return Employee's user "owner"
275 public User getEmployeeUserOwner () {
276 return this.employeeUserOwner;
280 * Setter for employee's user "owner"
282 * @param employeeUserOwner Employee's user "owner"
284 public void setEmployeeUserOwner (final User employeeUserOwner) {
285 this.employeeUserOwner = employeeUserOwner;
289 * Getter for mobile number
291 * @return Mobile number
293 public Long getMobileNumber () {
294 return this.mobileNumber;
298 * Setter for mobile number
300 * @param mobileNumber Mobile number
302 public void setMobileNumber (final Long mobileNumber) {
303 this.mobileNumber = mobileNumber;
307 * Getter for mobile provider instance
309 * @return Mobile provider instance
311 public MobileProvider getMobileProvider () {
312 return this.mobileProvider;
316 * Setter for mobile provider instance
318 * @param mobileProvider Mobile provider instance
320 public void setMobileProvider (final MobileProvider mobileProvider) {
321 this.mobileProvider = mobileProvider;