]> git.mxchange.org Git - jfinancials-war.git/blob
f2d0e057518f07e116044f3973d109bbed88093a
[jfinancials-war.git] /
1 /*
2  * Copyright (C) 2017 - 2020 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.jfinancials.beans.business.headquarter.list;
18
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;
23
24 /**
25  * An interface for general Headquarter controller
26  * <p>
27  * @author Roland Häder<roland@mxchange.org>
28  */
29 public interface FinancialsHeadquarterListWebViewController extends Serializable {
30
31         /**
32          * Checks whether given company name already exists
33          * <p>
34          * @param companyName Company name to check
35          * <p>
36          * @return Whether the company name exists
37          */
38         Boolean isCompanyNameUsed (final String companyName);
39
40         /**
41          * Checks if given email address is already registered by an other
42          * headquarter
43          * <p>
44          * @param emailAddress Email address
45          * <p>
46          * @return Whether the email address has been already registered
47          */
48         Boolean isEmailAddressRegistered (final String emailAddress);
49
50         /**
51          * Returns a list of all headquarter
52          * <p>
53          * @return A list of all headquarter
54          */
55         List<Headquarter> getAllHeadquarters ();
56
57         /**
58          * Tries to find a headquarter with given id number
59          * <p>
60          * @param headquarterId Headquarter id
61          * <p>
62          * @return A headquarter instance
63          * <p>
64          * @throws HeadquarterNotFoundException If the headquarter was not found
65          */
66         Headquarter findHeadquarterById (final Long headquarterId) throws HeadquarterNotFoundException;
67
68         /**
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.
72          * <p>
73          * @param headquarter Headquarter to check it's address
74          * <p>
75          * @return Whether the address has been found
76          */
77         boolean isHeadquarterCreatedByRequiredData (final Headquarter headquarter);
78
79 }