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