]> git.mxchange.org Git - addressbook-war.git/blob - src/java/org/mxchange/addressbook/beans/business/basicdata/list/AddressbookBasicDataListWebViewController.java
Don't cherry-pick:
[addressbook-war.git] / src / java / org / mxchange / addressbook / beans / business / basicdata / list / AddressbookBasicDataListWebViewController.java
1 /*
2  * Copyright (C) 2022 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.addressbook.beans.business.basicdata.list;
18
19 import java.io.Serializable;
20 import org.mxchange.jcontactsbusiness.exceptions.basicdata.BasicDataNotFoundException;
21 import org.mxchange.jcontactsbusiness.model.basicdata.BasicData;
22
23 /**
24  * An interface of basic data list backing beans
25  * <p>
26  * @author Roland Häder<roland@mxchange.org>
27  */
28 public interface AddressbookBasicDataListWebViewController extends Serializable {
29
30         /**
31          * Checks whether given company's road number is already used.
32          * <p>
33          * @param companyRoadNumber Company's road number
34          * <p>
35          * @return Whether it is already in use
36          */
37         boolean isCompanyRoadNumberUsed (final String companyRoadNumber);
38
39         /**
40          * Retrieves a single business data entity for given id number or throws a
41          * proper exception if not found.
42          * <p>
43          * @param basicDataId Company basic data id to lookup
44          * <p>
45          * @return Business contact instance
46          * <p>
47          * @throws BasicDataNotFoundException If the id number could not be looked
48          * up and solved into an entity
49          */
50         BasicData findBasicDataById (final Long basicDataId) throws BasicDataNotFoundException;
51
52         /**
53          * Checks if given email address is already registered by other basic
54          * company data
55          * <p>
56          * @param emailAddress Email address
57          * <p>
58          * @return Whether the email address has been already registered
59          */
60         Boolean isEmailAddressRegistered (final String emailAddress);
61
62         /**
63          * Checks whether given company name already exists
64          * <p>
65          * @param companyName Company name to check
66          * <p>
67          * @return Whether the company name exists
68          */
69         Boolean isCompanyNameUsed (final String companyName);
70
71         /**
72          * Checks whether given company short name already exists
73          * <p>
74          * @param companyShortName Company short name to check
75          * <p>
76          * @return Whether the company short name exists
77          */
78         Boolean isCompanyShortNameUsed (final String companyShortName);
79
80 }