]> git.mxchange.org Git - addressbook-lib.git/blob - Addressbook/src/org/mxchange/addressbook/manager/contact/ManageableAddressbookContact.java
77d39d35fca1cf335f2a07e7d1d53073eeb2f917
[addressbook-lib.git] / Addressbook / src / org / mxchange / addressbook / manager / contact / ManageableAddressbookContact.java
1 /*
2  * Copyright (C) 2015 Roland Haeder
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (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 General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17 package org.mxchange.addressbook.manager.contact;
18
19 import java.io.IOException;
20 import org.mxchange.addressbook.exceptions.ContactAlreadyAddedException;
21 import org.mxchange.jcore.contact.Contact;
22 import org.mxchange.jcore.contact.Gender;
23 import org.mxchange.jcore.exceptions.BadTokenException;
24 import org.mxchange.jcore.manager.database.ManageableDatabase;
25
26 /**
27  *
28  * @author Roland Haeder
29  */
30 public interface ManageableAddressbookContact extends ManageableDatabase {
31         /**
32          * Allows the user to enter own cellphone number.
33          *
34          * @return Cellphone number
35          */
36         public String enterOwnCellNumber ();
37
38         /**
39          * Allows the user to enter own city name.
40          *
41          * @return City name
42          */
43         public String enterOwnCity ();
44
45         /**
46          * Allows the user to enter comment for own entry.
47          *
48          * @return Comment
49          */
50         public String enterOwnComment ();
51
52         /**
53          * Allows the user to enter own company name.
54          *
55          * @return Company name
56          */
57         public String enterOwnCompanyName ();
58
59         /**
60          * Allows the user to enter own country code.
61          *
62          * @return Country code
63          */
64         public String enterOwnCountryCode ();
65
66         /**
67          * Allows the user to enter own email address.
68          *
69          * @return Email address
70          */
71         public String enterOwnEmailAddress ();
72
73         /**
74          * Allows the user to enter own family name.
75          *
76          * @return Family name
77          */
78         public String enterOwnFamilyName ();
79
80         /**
81          * Allows the user to enter own fax number.
82          *
83          * @return Fax number
84          */
85         public String enterOwnFaxNumber ();
86
87         /**
88          * Allows the user to enter own gender.
89          *
90          * @return Gender
91          */
92         public Gender enterOwnGender ();
93
94         /**
95          * Allows the user to enter own phone number.
96          *
97          * @return Phone number
98          */
99         public String enterOwnPhoneNumber ();
100
101         /**
102          * Allows the user to enter own street and house number.
103          *
104          * @return Street and house number
105          */
106         public String enterOwnStreet ();
107
108         /**
109          * Allows the user to enter own surname.
110          *
111          * @return Surname
112          */
113         public String enterOwnSurname ();
114
115         /**
116          * Allows the user to enter own ZIP code.
117          *
118          * @return ZIP code
119          */
120         public int enterOwnZipCode ();
121
122         /**
123          * List all contacts
124          */
125         public void doListContacts ();
126
127         /**
128          * Adds given contact to address book
129          *
130          * @param contact Contact being added
131          * @todo Add check for book size
132          */
133         public void registerContact (final Contact contact);
134
135         /**
136          * Adds given Contact instance to list
137          *
138          * @param contact Contact instance to add
139          * @throws org.mxchange.addressbook.exceptions.ContactAlreadyAddedException If the contact is already added
140          */
141         public void addContact (final Contact contact) throws ContactAlreadyAddedException;
142
143         /**
144          * Let the user add a new other address
145          */
146         public void doAddOtherAddress ();
147
148         /**
149          * The user can change address data, like street, ZIP code, city and country
150          * of given Contact instance.
151          *
152          * @param contact Instance to change data
153          */
154         public void doChangeAddressData (final Contact contact);
155
156         /**
157          * The user can change name data, like gender, surname, family name and
158          * company name (if business contact).
159          *
160          * @param contact Instance to change data
161          */
162         public void doChangeNameData (final Contact contact);
163
164         /**
165          * Let the user change other address
166          */
167         public void doChangeOtherAddress ();
168
169         /**
170          * The user can change other data, like phone numbers or comments.
171          *
172          * @param contact Instance to change data
173          */
174         public void doChangeOtherData (final Contact contact);
175
176         /**
177          * Let the user change own data
178          * @throws java.io.IOException If an IO error was found
179          * @throws org.mxchange.jcore.exceptions.BadTokenException If a bad token was found
180          */
181         public void doChangeOwnData () throws IOException , BadTokenException;
182
183         /**
184          * Let the user delete other address
185          */
186         public void doDeleteOtherAddress ();
187
188         /**
189          * Asks user for own data
190          * @throws org.mxchange.addressbook.exceptions.ContactAlreadyAddedException If own contact is already added
191          * @throws java.io.IOException If an IO error was found
192          * @throws org.mxchange.jcore.exceptions.BadTokenException If a bad token was found
193          */
194         public void doEnterOwnData () throws ContactAlreadyAddedException, IOException , BadTokenException;
195
196         /**
197          * Searches address book for a contact
198          */
199         public void doSearchContacts ();
200
201         /**
202          * Checks whether own contact is already added by checking all entries for
203          * isOwnContact flag
204          *
205          * @return Whether own contact is already added
206          * @throws java.io.IOException If an IO error occurs
207          * @throws org.mxchange.jcore.exceptions.BadTokenException If a bad token was found
208          */
209         public boolean isOwnContactAdded () throws IOException, BadTokenException;
210 }