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