]> git.mxchange.org Git - juser-login-core.git/blob - src/org/mxchange/jusercore/model/user/User.java
added user-specific locale. this allows the user to have hin/her language back once...
[juser-login-core.git] / src / org / mxchange / jusercore / model / user / User.java
1 /*
2  * Copyright (C) 2016 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.jusercore.model.user;
18
19 import java.io.Serializable;
20 import java.util.Calendar;
21 import java.util.Locale;
22 import org.mxchange.jcontacts.contact.Contact;
23 import org.mxchange.jusercore.model.user.profilemodes.ProfileMode;
24 import org.mxchange.jusercore.model.user.status.UserAccountStatus;
25
26 /**
27  * A user POPJI
28  * <p>
29  * @author Roland Haeder<roland@mxchange.org>
30  */
31 public interface User extends Serializable {
32
33         /**
34          * Copies all attributes from other user object to this
35          * <p>
36          * @param userSource Source instance
37          */
38         void copyAll (final User userSource);
39
40         /**
41          * Getter for account status
42          * <p>
43          * @return Account status
44          */
45         UserAccountStatus getUserAccountStatus ();
46
47         /**
48          * Setter for account status
49          * <p>
50          * @param userStatus Account status
51          */
52         void setUserAccountStatus (final UserAccountStatus userStatus);
53
54         /**
55          * Getter for confirmation key
56          * <p>
57          * @return Confirmation key
58          */
59         String getUserConfirmKey ();
60
61         /**
62          * Setter for confirmation key
63          * <p>
64          * @param userConfirmKey Confirmation key
65          */
66         void setUserConfirmKey (final String userConfirmKey);
67
68         /**
69          * Getter for contact instance
70          * <p>
71          * @return Contact id number
72          */
73         Contact getUserContact ();
74
75         /**
76          * Setter for contact instance
77          * <p>
78          * @param contact Contact instance
79          */
80         void setUserContact (final Contact contact);
81
82         /**
83          * Getter for "created" timestamp
84          * <p>
85          * @return "created" timestamp
86          */
87         Calendar getUserCreated ();
88
89         /**
90          * Setter for "created" timestamp
91          * <p>
92          * @param userCreated "created" timestamp
93          */
94         void setUserCreated (final Calendar userCreated);
95
96         /**
97          * Getter for encrypted password
98          * <p>
99          * @return Encrypted password
100          */
101         String getUserEncryptedPassword ();
102
103         /**
104          * Setter for password hash
105          * <p>
106          * @param userEncryptedPassword Encrypted password
107          */
108         void setUserEncryptedPassword (final String userEncryptedPassword);
109
110         /**
111          * Getter for customer id number
112          * <p>
113          * @return User id number
114          */
115         Long getUserId ();
116
117         /**
118          * Settte for customer id number
119          * <p>
120          * @param customerId User id number
121          */
122         void setUserId (final Long customerId);
123
124         /**
125          * Getter for "locked" timestamp
126          * <p>
127          * @return "locked" timestamp
128          */
129         Calendar getUserLastLocked ();
130
131         /**
132          * Getter for "locked" timestamp
133          * <p>
134          * @param userLocked "locked" timestamp
135          */
136         void setUserLastLocked (final Calendar userLocked);
137
138         /**
139          * Getter for reason of last locked
140          * <p>
141          * @return Reason of last locked
142          */
143         String getUserLastLockedReason ();
144
145         /**
146          * Setter for reason of last locked
147          * <p>
148          * @param lastLockedReason Reason of last locked
149          */
150         void setUserLastLockedReason (final String lastLockedReason);
151
152         /**
153          * Getter for user name
154          * <p>
155          * @return User name
156          */
157         String getUserName ();
158
159         /**
160          * Setter for user name
161          * <p>
162          * @param userName User name
163          */
164         void setUserName (final String userName);
165
166         /**
167          * Getter for public user profile flag
168          * <p>
169          * @return Whether the user has a public profile
170          */
171         ProfileMode getUserProfileMode ();
172
173         /**
174          * Setter for public user profile flag
175          * <p>
176          * @param userPublicProfile Whether the user has a public profile
177          */
178         void setUserProfileMode (final ProfileMode userPublicProfile);
179
180         /**
181          * Getter for updated timestamp
182          * <p>
183          * @return Updated timestamp
184          */
185         Calendar getUserUpdated ();
186
187         /**
188          * Setter for updated timestamp
189          * <p>
190          * @param userUpdated Updated timestamp
191          */
192         void setUserUpdated (final Calendar userUpdated);
193
194         /**
195          * Getter for user's locale
196          * <p>
197          * @return User's locale
198          */
199         Locale getUserLocale ();
200
201         /**
202          * Setteror user's locale
203          * <p>
204          * @param userLocale User's locale
205          */
206         void setUserLocale (final Locale userLocale);
207
208         @Override
209         boolean equals (final Object object);
210
211         @Override
212         int hashCode ();
213
214 }