2 * Copyright (C) 2017 - 2020 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.jfinancials.beans.business.headquarter.list;
19 import java.io.Serializable;
20 import java.util.List;
21 import org.mxchange.jcontactsbusiness.exceptions.headquarter.HeadquarterNotFoundException;
22 import org.mxchange.jcontactsbusiness.model.headquarter.Headquarter;
25 * An interface for general Headquarter controller
27 * @author Roland Häder<roland@mxchange.org>
29 public interface FinancialsHeadquarterListWebViewController extends Serializable {
32 * Checks whether given company name already exists
34 * @param companyName Company name to check
36 * @return Whether the company name exists
38 Boolean isCompanyNameUsed (final String companyName);
41 * Checks if given email address is already registered by an other
44 * @param emailAddress Email address
46 * @return Whether the email address has been already registered
48 Boolean isEmailAddressRegistered (final String emailAddress);
51 * Returns a list of all headquarter
53 * @return A list of all headquarter
55 List<Headquarter> getAllHeadquarters ();
58 * Tries to find a headquarter with given id number
60 * @param headquarterId Headquarter id
62 * @return A headquarter instance
64 * @throws HeadquarterNotFoundException If the headquarter was not found
66 Headquarter findHeadquarterById (final Long headquarterId) throws HeadquarterNotFoundException;
69 * Checks whether the given headquarter' address is already found in local
70 * cache. Please note that this method fully relies on the cache, so you
71 * must always fire proper events that add/update/delete entries in cache.
73 * @param headquarter Headquarter to check it's address
75 * @return Whether the address has been found
77 boolean isHeadquarterCreatedByRequiredData (final Headquarter headquarter);