]> git.mxchange.org Git - jfinancials-war.git/blob
12545fdb3a0c41d0ecce4fbe35b3cb5434a00c5d
[jfinancials-war.git] /
1 /*
2  * Copyright (C) 2017 RRoland Häder
3  *
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.
8  *
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.
13  *
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/>.
16  */
17 package org.mxchange.jfinancials.beans.business.employee;
18
19 import javax.ejb.EJB;
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;
35
36 /**
37  * A request-scoped bean for administrative purposes for company employees.
38  * <p>
39  * @author Roland Häder<roland@mxchange.org>
40  */
41 @Named ("adminEmployeeController")
42 @RequestScoped
43 public class FinancialsAdminEmployeeWebRequestBean extends BaseFinancialsBean implements FinancialsAdminEmployeeWebRequestController {
44
45         /**
46          * Serial number
47          */
48         private static final long serialVersionUID = 12_886_968_547_360L;
49
50         /**
51          * An event being fired when an employee has been added
52          */
53         @Inject
54         @Any
55         private Event<ObservableEmployeeAddedEvent> addedEmployeeEvent;
56
57         /**
58          * EJB for administrative company employee purposes
59          */
60         @EJB (lookup = "java:global/jfinancials-ejb/adminCompanyEmployee!org.mxchange.jcontactsbusiness.model.employee.AdminCompanyEmployeeSessionBeanRemote")
61         private AdminCompanyEmployeeSessionBeanRemote adminCompanyEmployeeBean;
62
63         /**
64          * Assigned branch office
65          */
66         private BranchOffice employeeBranchOffice;
67
68         /**
69          * Assigned basic data instance
70          */
71         private BusinessBasicData employeeCompany;
72
73         /**
74          * Department where employee works (alternative to headquarters)
75          */
76         private Department employeeDepartment;
77
78         /**
79          * Employee's business email address
80          */
81         private String employeeEmailAddress;
82
83         /**
84          * Employee's Headquarters data, if he is working there
85          */
86         private HeadquartersData employeeHeadquarters;
87
88         /**
89          * Assigned personal data of the employee
90          */
91         private Contact employeePersonalContact;
92
93         /**
94          * Employee's phone extension (on top of a "main number")
95          */
96         private Long employeePhoneExtension;
97
98         /**
99          * Employee's staff number
100          */
101         private Long employeeStaffNumber;
102
103         /**
104          * Assigned user account
105          */
106         private User employeeUserOwner;
107
108         /**
109          * Mobile number for employee's business mobile
110          */
111         private Long mobileNumber;
112
113         /**
114          * Mobile provider instance for employee's business mobile
115          */
116         private MobileProvider mobileProvider;
117
118         /**
119          * Default constructor
120          */
121         public FinancialsAdminEmployeeWebRequestBean () {
122                 // Call super constructor
123                 super();
124         }
125
126         /**
127          * Getter for employee's assigned branch office
128          * <p>
129          * @return Employee's assigned branch office
130          */
131         public BranchOffice getEmployeeBranchOffice () {
132                 return this.employeeBranchOffice;
133         }
134
135         /**
136          * Setter for employee's assigned branch office
137          * <p>
138          * @param employeeBranchOffice Employee's assigned branch office
139          */
140         public void setEmployeeBranchOffice (final BranchOffice employeeBranchOffice) {
141                 this.employeeBranchOffice = employeeBranchOffice;
142         }
143
144         /**
145          * Getter for employee's assigned basic company data
146          * <p>
147          * @return Employee's assigned basic company data
148          */
149         public BusinessBasicData getEmployeeCompany () {
150                 return this.employeeCompany;
151         }
152
153         /**
154          * Setter for employee's assigned basic company data
155          * <p>
156          * @param employeeCompany Employee's assigned basic company data
157          */
158         public void setEmployeeCompany (final BusinessBasicData employeeCompany) {
159                 this.employeeCompany = employeeCompany;
160         }
161
162         /**
163          * Getter for employee's assigned department
164          * <p>
165          * @return Employee's assigned department
166          */
167         public Department getEmployeeDepartment () {
168                 return this.employeeDepartment;
169         }
170
171         /**
172          * Setter for employee's assigned department
173          * <p>
174          * @param employeeDepartment Employee's assigned department
175          */
176         public void setEmployeeDepartment (final Department employeeDepartment) {
177                 this.employeeDepartment = employeeDepartment;
178         }
179
180         /**
181          * Getter for employee's business email address
182          * <p>
183          * @return Employee's business email address
184          */
185         public String getEmployeeEmailAddress () {
186                 return this.employeeEmailAddress;
187         }
188
189         /**
190          * Setter for employee's business email address
191          * <p>
192          * @param employeeEmailAddress Employee's business email address
193          */
194         public void setEmployeeEmailAddress (final String employeeEmailAddress) {
195                 this.employeeEmailAddress = employeeEmailAddress;
196         }
197
198         /**
199          * Getter for employee's assigned headquarters (if no branch office)
200          * <p>
201          * @return Employee's assigned headquarters
202          */
203         public HeadquartersData getEmployeeHeadquarters () {
204                 return this.employeeHeadquarters;
205         }
206
207         /**
208          * Setter for employee's assigned headquarters (if no branch office)
209          * <p>
210          * @param employeeHeadquarters Employee's assigned headquarters
211          */
212         public void setEmployeeHeadquarters (final HeadquartersData employeeHeadquarters) {
213                 this.employeeHeadquarters = employeeHeadquarters;
214         }
215
216         /**
217          * Getter for employee's personal contact data
218          * <p>
219          * @return Employee's personal contact data
220          */
221         public Contact getEmployeePersonalContact () {
222                 return this.employeePersonalContact;
223         }
224
225         /**
226          * Setter for employee's personal contact data
227          * <p>
228          * @param employeePersonalContact Employee's personal contact data
229          */
230         public void setEmployeePersonalContact (final Contact employeePersonalContact) {
231                 this.employeePersonalContact = employeePersonalContact;
232         }
233
234         /**
235          * Getter for employee's phone extension
236          * <p>
237          * @return Employee's phone extension
238          */
239         public Long getEmployeePhoneExtension () {
240                 return this.employeePhoneExtension;
241         }
242
243         /**
244          * Getter for employee's phone extension
245          * <p>
246          * @param employeePhoneExtension Employee's phone extension
247          */
248         public void setEmployeePhoneExtension (final Long employeePhoneExtension) {
249                 this.employeePhoneExtension = employeePhoneExtension;
250         }
251
252         /**
253          * Getter for employee's staff number
254          * <p>
255          * @return Employee's staff number
256          */
257         public Long getEmployeeStaffNumber () {
258                 return this.employeeStaffNumber;
259         }
260
261         /**
262          * Setter for employee's staff number
263          * <p>
264          * @param employeeStaffNumber Employee's staff number
265          */
266         public void setEmployeeStaffNumber (final Long employeeStaffNumber) {
267                 this.employeeStaffNumber = employeeStaffNumber;
268         }
269
270         /**
271          * Getter for employee's user "owner"
272          * <p>
273          * @return Employee's user "owner"
274          */
275         public User getEmployeeUserOwner () {
276                 return this.employeeUserOwner;
277         }
278
279         /**
280          * Setter for employee's user "owner"
281          * <p>
282          * @param employeeUserOwner Employee's user "owner"
283          */
284         public void setEmployeeUserOwner (final User employeeUserOwner) {
285                 this.employeeUserOwner = employeeUserOwner;
286         }
287
288         /**
289          * Getter for mobile number
290          * <p>
291          * @return Mobile number
292          */
293         public Long getMobileNumber () {
294                 return this.mobileNumber;
295         }
296
297         /**
298          * Setter for mobile number
299          * <p>
300          * @param mobileNumber Mobile number
301          */
302         public void setMobileNumber (final Long mobileNumber) {
303                 this.mobileNumber = mobileNumber;
304         }
305
306         /**
307          * Getter for mobile provider instance
308          * <p>
309          * @return Mobile provider instance
310          */
311         public MobileProvider getMobileProvider () {
312                 return this.mobileProvider;
313         }
314
315         /**
316          * Setter for mobile provider instance
317          * <p>
318          * @param mobileProvider Mobile provider instance
319          */
320         public void setMobileProvider (final MobileProvider mobileProvider) {
321                 this.mobileProvider = mobileProvider;
322         }
323
324 }