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.BasicData;
28 import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
29 import org.mxchange.jcontactsbusiness.model.department.Department;
30 import org.mxchange.jcontactsbusiness.model.employee.AdminEmployeeSessionBeanRemote;
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 administrative employee
40 * @author Roland Häder<roland@mxchange.org>
42 @Named ("adminEmployeeController")
44 public class FinancialsAdminEmployeeWebRequestBean extends BaseFinancialsBean implements FinancialsAdminEmployeeWebRequestController {
49 private static final long serialVersionUID = 12_886_968_547_360L;
52 * An event being fired when an employee has been added
56 private Event<ObservableEmployeeAddedEvent> addedEmployeeEvent;
59 * EJB for administrative company employee purposes
61 @EJB (lookup = "java:global/jfinancials-ejb/adminEmployee!org.mxchange.jcontactsbusiness.model.employee.AdminEmployeeSessionBeanRemote")
62 private AdminEmployeeSessionBeanRemote adminEmployeeBean;
65 * Assigned basic data instance
67 private BasicData employeeBasicData;
70 * Assigned branch office
72 private BranchOffice employeeBranchOffice;
75 * Department where employee works (alternative to headquarters)
77 private Department employeeDepartment;
80 * Employee's business email address
82 private String employeeEmailAddress;
85 * Employee's Headquarters data, if he is working there
87 private HeadquartersData employeeHeadquarters;
90 * Assigned personal data of the employee
92 private Contact employeePersonalContact;
95 * Employee's phone extension (on top of a "main number")
97 private Long employeePhoneExtension;
100 * Employee's staff number
102 private Long employeeStaffNumber;
105 * Assigned user account
107 private User employeeUserOwner;
110 * Mobile number for employee's business mobile
112 private Long mobileNumber;
115 * Mobile provider instance for employee's business mobile
117 private MobileProvider mobileProvider;
120 * Default constructor
122 public FinancialsAdminEmployeeWebRequestBean () {
123 // Call super constructor
128 * Getter for employee's assigned branch office
130 * @return Employee's assigned branch office
132 public BranchOffice getEmployeeBranchOffice () {
133 return this.employeeBranchOffice;
137 * Setter for employee's assigned branch office
139 * @param employeeBranchOffice Employee's assigned branch office
141 public void setEmployeeBranchOffice (final BranchOffice employeeBranchOffice) {
142 this.employeeBranchOffice = employeeBranchOffice;
146 * Getter for employee's assigned basic company data
148 * @return Employee's assigned basic company data
150 public BasicData getEmployeeCompany () {
151 return this.employeeBasicData;
155 * Setter for employee's assigned basic company data
157 * @param employeeBasicData Employee's assigned basic company data
159 public void setEmployeeCompany (final BasicData employeeBasicData) {
160 this.employeeBasicData = employeeBasicData;
164 * Getter for employee's assigned department
166 * @return Employee's assigned department
168 public Department getEmployeeDepartment () {
169 return this.employeeDepartment;
173 * Setter for employee's assigned department
175 * @param employeeDepartment Employee's assigned department
177 public void setEmployeeDepartment (final Department employeeDepartment) {
178 this.employeeDepartment = employeeDepartment;
182 * Getter for employee's business email address
184 * @return Employee's business email address
186 public String getEmployeeEmailAddress () {
187 return this.employeeEmailAddress;
191 * Setter for employee's business email address
193 * @param employeeEmailAddress Employee's business email address
195 public void setEmployeeEmailAddress (final String employeeEmailAddress) {
196 this.employeeEmailAddress = employeeEmailAddress;
200 * Getter for employee's assigned headquarters (if no branch office)
202 * @return Employee's assigned headquarters
204 public HeadquartersData getEmployeeHeadquarters () {
205 return this.employeeHeadquarters;
209 * Setter for employee's assigned headquarters (if no branch office)
211 * @param employeeHeadquarters Employee's assigned headquarters
213 public void setEmployeeHeadquarters (final HeadquartersData employeeHeadquarters) {
214 this.employeeHeadquarters = employeeHeadquarters;
218 * Getter for employee's personal contact data
220 * @return Employee's personal contact data
222 public Contact getEmployeePersonalContact () {
223 return this.employeePersonalContact;
227 * Setter for employee's personal contact data
229 * @param employeePersonalContact Employee's personal contact data
231 public void setEmployeePersonalContact (final Contact employeePersonalContact) {
232 this.employeePersonalContact = employeePersonalContact;
236 * Getter for employee's phone extension
238 * @return Employee's phone extension
240 public Long getEmployeePhoneExtension () {
241 return this.employeePhoneExtension;
245 * Getter for employee's phone extension
247 * @param employeePhoneExtension Employee's phone extension
249 public void setEmployeePhoneExtension (final Long employeePhoneExtension) {
250 this.employeePhoneExtension = employeePhoneExtension;
254 * Getter for employee's staff number
256 * @return Employee's staff number
258 public Long getEmployeeStaffNumber () {
259 return this.employeeStaffNumber;
263 * Setter for employee's staff number
265 * @param employeeStaffNumber Employee's staff number
267 public void setEmployeeStaffNumber (final Long employeeStaffNumber) {
268 this.employeeStaffNumber = employeeStaffNumber;
272 * Getter for employee's user "owner"
274 * @return Employee's user "owner"
276 public User getEmployeeUserOwner () {
277 return this.employeeUserOwner;
281 * Setter for employee's user "owner"
283 * @param employeeUserOwner Employee's user "owner"
285 public void setEmployeeUserOwner (final User employeeUserOwner) {
286 this.employeeUserOwner = employeeUserOwner;
290 * Getter for mobile number
292 * @return Mobile number
294 public Long getMobileNumber () {
295 return this.mobileNumber;
299 * Setter for mobile number
301 * @param mobileNumber Mobile number
303 public void setMobileNumber (final Long mobileNumber) {
304 this.mobileNumber = mobileNumber;
308 * Getter for mobile provider instance
310 * @return Mobile provider instance
312 public MobileProvider getMobileProvider () {
313 return this.mobileProvider;
317 * Setter for mobile provider instance
319 * @param mobileProvider Mobile provider instance
321 public void setMobileProvider (final MobileProvider mobileProvider) {
322 this.mobileProvider = mobileProvider;