]> git.mxchange.org Git - jjobs-war.git/blob - src/java/org/mxchange/jjobs/beans/phone/JobsPhoneWebRequestController.java
Please cherry-pick:
[jjobs-war.git] / src / java / org / mxchange / jjobs / beans / phone / JobsPhoneWebRequestController.java
1 /*
2  * Copyright (C) 2016 - 2018 Free Software Foundation
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.jjobs.beans.phone;
18
19 import java.io.Serializable;
20 import java.util.List;
21 import org.mxchange.jphone.exceptions.phone.PhoneEntityNotFoundException;
22 import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
23 import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
24 import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
25
26 /**
27  * An interface for a request web controller (bean) for administrative phone
28  * number purposes.
29  * <p>
30  * @author Roland Häder<roland@mxchange.org>
31  */
32 public interface JobsPhoneWebRequestController extends Serializable {
33
34         /**
35          * Returns a list of all mobile numbers. For performance reasons, the
36          * controller (bean) should be application-scoped as from user to user
37          * nothing changes. And the controller's post-construct method should load
38          * all numbers and cache it in the controller.
39          * <p>
40          * @return List of all mobile numbers
41          */
42         List<DialableMobileNumber> allMobileNumbers ();
43
44         /**
45          * Returns a list of all fax numbers. For performance reasons, the
46          * controller (bean) should be application-scoped as from user to user
47          * nothing changes. And the controller's post-construct method should load
48          * all numbers and cache it in the controller.
49          * <p>
50          * @return List of all fax numbers
51          */
52         List<DialableFaxNumber> allFaxNumbers ();
53
54         /**
55          * Returns a list of all land-line numbers. For performance reasons, the
56          * controller (bean) should be application-scoped as from user to user
57          * nothing changes. And the controller's post-construct method should load
58          * all numbers and cache it in the controller.
59          * <p>
60          * @return List of all land-line numbers
61          */
62         List<DialableLandLineNumber> allLandLineNumbers ();
63
64         /**
65          * Finds a fax entry by given id number
66          * <p>
67          * @param faxNumberId Fax entry id number
68          * <p>
69          * @return A valid fax instance
70          * <p>
71          * @throws PhoneEntityNotFoundException If the entity was not found
72          */
73         DialableFaxNumber findFaxNumberById (final Long faxNumberId) throws PhoneEntityNotFoundException;
74
75         /**
76          * Finds a land-line entry by given id number
77          * <p>
78          * @param landLineNumberId Land-line entry id number
79          * <p>
80          * @return A valid land-line instance
81          * <p>
82          * @throws PhoneEntityNotFoundException If the entity was not found
83          */
84         DialableLandLineNumber findLandLineNumberById (final Long landLineNumberId) throws PhoneEntityNotFoundException;
85
86         /**
87          * Finds a mobile entry by given id number
88          * <p>
89          * @param mobileNumberId Mobile entry id number
90          * <p>
91          * @return A valid mobile instance
92          * <p>
93          * @throws PhoneEntityNotFoundException If the entity was not found
94          */
95         DialableMobileNumber findMobileNumberById (Long mobileNumberId) throws PhoneEntityNotFoundException;
96
97 }