2 * Copyright (C) 2022 Free Software Foundation
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.addressbook.beans.business.basicdata.list;
19 import java.io.Serializable;
20 import org.mxchange.jcontactsbusiness.exceptions.basicdata.BasicDataNotFoundException;
21 import org.mxchange.jcontactsbusiness.model.basicdata.BasicData;
24 * An interface of basic data list backing beans
26 * @author Roland Häder<roland@mxchange.org>
28 public interface AddressbookBasicDataListWebViewController extends Serializable {
31 * Checks whether given company's road number is already used.
33 * @param companyRoadNumber Company's road number
35 * @return Whether it is already in use
37 boolean isCompanyRoadNumberUsed (final String companyRoadNumber);
40 * Retrieves a single business data entity for given id number or throws a
41 * proper exception if not found.
43 * @param basicDataId Company basic data id to lookup
45 * @return Business contact instance
47 * @throws BasicDataNotFoundException If the id number could not be looked
48 * up and solved into an entity
50 BasicData findBasicDataById (final Long basicDataId) throws BasicDataNotFoundException;
53 * Checks if given email address is already registered by other basic
56 * @param emailAddress Email address
58 * @return Whether the email address has been already registered
60 Boolean isEmailAddressRegistered (final String emailAddress);
63 * Checks whether given company name already exists
65 * @param companyName Company name to check
67 * @return Whether the company name exists
69 Boolean isCompanyNameUsed (final String companyName);
72 * Checks whether given company short name already exists
74 * @param companyShortName Company short name to check
76 * @return Whether the company short name exists
78 Boolean isCompanyShortNameUsed (final String companyShortName);