]> git.mxchange.org Git - addressbook-swing.git/blob - Addressbook/src/org/mxchange/addressbook/manager/contact/ManageableAddressbookContact.java
651173090fd804d33dd5d49c3c574f156af8f0c2
[addressbook-swing.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 org.mxchange.addressbook.exceptions.ContactAlreadyAddedException;
20 import org.mxchange.jcore.contact.Contact;
21 import org.mxchange.jcore.contact.Gender;
22 import org.mxchange.jcore.manager.database.ManageableDatabase;
23
24 /**
25  *
26  * @author Roland Haeder
27  */
28 public interface ManageableAddressbookContact extends ManageableDatabase {
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          * List all contacts
122          */
123         public void doListContacts ();
124
125         /**
126          * Adds given contact to address book
127          *
128          * @param contact Contact being added
129          * @todo Add check for book size
130          */
131         public void registerContact (final Contact contact);
132
133         /**
134          * Adds given Contact instance to list
135          *
136          * @param contact Contact instance to add
137          * @throws org.mxchange.addressbook.exceptions.ContactAlreadyAddedException If the contact is already added
138          */
139         public void addContact (final Contact contact) throws ContactAlreadyAddedException;
140
141         /**
142          * Let the user add a new other address
143          */
144         public void doAddOtherAddress ();
145
146         /**
147          * The user can change address data, like street, ZIP code, city and country
148          * of given Contact instance.
149          *
150          * @param contact Instance to change data
151          */
152         public void doChangeAddressData (final Contact contact);
153
154         /**
155          * The user can change name data, like gender, surname, family name and
156          * company name (if business contact).
157          *
158          * @param contact Instance to change data
159          */
160         public void doChangeNameData (final Contact contact);
161
162         /**
163          * Let the user change other address
164          */
165         public void doChangeOtherAddress ();
166
167         /**
168          * The user can change other data, like phone numbers or comments.
169          *
170          * @param contact Instance to change data
171          */
172         public void doChangeOtherData (final Contact contact);
173
174         /**
175          * Let the user change own data
176          */
177         public void doChangeOwnData ();
178
179         /**
180          * Let the user delete other address
181          */
182         public void doDeleteOtherAddress ();
183
184         /**
185          * Asks user for own data
186          * @throws org.mxchange.addressbook.exceptions.ContactAlreadyAddedException If own contact is already added
187          */
188         public void doEnterOwnData () throws ContactAlreadyAddedException;
189
190         /**
191          * Searches address book for a contact
192          */
193         public void doSearchContacts ();
194
195         /**
196          * Checks whether own contact is already added by checking all entries for
197          * isOwnContact flag
198          *
199          * @return Whether own contact is already added
200          */
201         public boolean isOwnContactAdded ();
202 }