]> git.mxchange.org Git - jjobs-war.git/blob - src/java/org/mxchange/jjobs/beans/business/headquarter/JobsHeadquarterWebRequestController.java
ae7afd7d8b2f487a21ae45820e896a211407c692
[jjobs-war.git] / src / java / org / mxchange / jjobs / beans / business / headquarter / JobsHeadquarterWebRequestController.java
1 /*
2  * Copyright (C) 2017, 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.business.headquarter;
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 JobsHeadquarterWebRequestController 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> allHeadquarter ();
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 }