]> git.mxchange.org Git - addressbook-swing.git/blob - Addressbook/src/org/mxchange/addressbook/manager/contact/ManageableContact.java
Added a lot more generic methods for columnName lookup (a field must be there) +...
[addressbook-swing.git] / Addressbook / src / org / mxchange / addressbook / manager / contact / ManageableContact.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 org.mxchange.addressbook.contact.Contact;
20 import org.mxchange.addressbook.contact.Gender;
21 import org.mxchange.addressbook.exceptions.ContactAlreadyAddedException;
22 import org.mxchange.addressbook.manager.Manageable;
23
24 /**
25  *
26  * @author Roland Haeder
27  */
28 public interface ManageableContact extends Manageable {
29
30         /**
31          * Shuts down this contact manager
32          */
33         public void doShutdown ();
34
35         /**
36          * Allows the user to enter own cellphone number.
37          *
38          * @return Cellphone number
39          */
40         public String enterOwnCellNumber ();
41
42         /**
43          * Allows the user to enter own city name.
44          *
45          * @return City name
46          */
47         public String enterOwnCity ();
48
49         /**
50          * Allows the user to enter comment for own entry.
51          *
52          * @return Comment
53          */
54         public String enterOwnComment ();
55
56         /**
57          * Allows the user to enter own company name.
58          *
59          * @return Company name
60          */
61         public String enterOwnCompanyName ();
62
63         /**
64          * Allows the user to enter own country code.
65          *
66          * @return Country code
67          */
68         public String enterOwnCountryCode ();
69
70         /**
71          * Allows the user to enter own email address.
72          *
73          * @return Email address
74          */
75         public String enterOwnEmailAddress ();
76
77         /**
78          * Allows the user to enter own family name.
79          *
80          * @return Family name
81          */
82         public String enterOwnFamilyName ();
83
84         /**
85          * Allows the user to enter own fax number.
86          *
87          * @return Fax number
88          */
89         public String enterOwnFaxNumber ();
90
91         /**
92          * Allows the user to enter own gender.
93          *
94          * @return Gender
95          */
96         public Gender enterOwnGender ();
97
98         /**
99          * Allows the user to enter own phone number.
100          *
101          * @return Phone number
102          */
103         public String enterOwnPhoneNumber ();
104
105         /**
106          * Allows the user to enter own street and house number.
107          *
108          * @return Street and house number
109          */
110         public String enterOwnStreet ();
111
112         /**
113          * Allows the user to enter own surname.
114          *
115          * @return Surname
116          */
117         public String enterOwnSurname ();
118
119         /**
120          * Allows the user to enter own ZIP code.
121          *
122          * @return ZIP code
123          */
124         public int enterOwnZipCode ();
125
126         /**
127          * Getter for column count
128          *
129          * @return Column count
130          */
131         public int getColumnCount ();
132
133         /**
134          * List all contacts
135          */
136         public void doListContacts ();
137
138         /**
139          * Getter for column name at given index.
140          *
141          * @param columnIndex Column index
142          * @return Database column name
143          */
144         public String getColumnName (final int columnIndex);
145
146         /**
147          * Getter for translated column name at given index.
148          *
149          * @param columnIndex Column index
150          * @return Human-readable column name
151          */
152         public String getTranslatedColumnName (int columnIndex);
153
154         /**
155          * Somewhat "getter" for value from given row and column index
156          *
157          * @param rowIndex Row index
158          * @param columnIndex Column index
159          * @return Value from given row/column
160          */
161         public Object getValueFromRowColumn (final int rowIndex, final int columnIndex);
162
163         /**
164          * Adds given contact to address book
165          *
166          * @param contact Contact being added
167          * @todo Add check for book size
168          */
169         public void registerContact (final Contact contact);
170
171         /**
172          * Adds given Contact instance to list
173          *
174          * @param contact Contact instance to add
175          * @throws org.mxchange.addressbook.exceptions.ContactAlreadyAddedException If the contact is already added
176          */
177         public void addContact (final Contact contact) throws ContactAlreadyAddedException;
178
179         /**
180          * Let the user add a new other address
181          */
182         public void doAddOtherAddress ();
183
184         /**
185          * The user can change address data, like street, ZIP code, city and country
186          * of given Contact instance.
187          *
188          * @param contact Instance to change data
189          */
190         public void doChangeAddressData (final Contact contact);
191
192         /**
193          * The user can change name data, like gender, surname, family name and
194          * company name (if business contact).
195          *
196          * @param contact Instance to change data
197          */
198         public void doChangeNameData (final Contact contact);
199
200         /**
201          * Let the user change other address
202          */
203         public void doChangeOtherAddress ();
204
205         /**
206          * The user can change other data, like phone numbers or comments.
207          *
208          * @param contact Instance to change data
209          */
210         public void doChangeOtherData (final Contact contact);
211
212         /**
213          * Let the user change own data
214          */
215         public void doChangeOwnData ();
216
217         /**
218          * Let the user delete other address
219          */
220         public void doDeleteOtherAddress ();
221
222         /**
223          * Asks user for own data
224          * @throws org.mxchange.addressbook.exceptions.ContactAlreadyAddedException If own contact is already added
225          */
226         public void doEnterOwnData () throws ContactAlreadyAddedException;
227
228         /**
229          * Searches address book for a contact
230          */
231         public void doSearchContacts ();
232
233         /**
234          * Checks whether own contact is already added by checking all entries for
235          * isOwnContact flag
236          *
237          * @return Whether own contact is already added
238          */
239         public boolean isOwnContactAdded ();
240
241         /**
242          * Getter for size
243          *
244          * @return size of contact "book"
245          */
246         public int size ();
247 }