001: /**
002: * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, version 2.1, dated February 1999.
003: *
004: * This program is free software; you can redistribute it and/or modify
005: * it under the terms of the latest version of the GNU Lesser General
006: * Public License as published by the Free Software Foundation;
007: *
008: * This program is distributed in the hope that it will be useful,
009: * but WITHOUT ANY WARRANTY; without even the implied warranty of
010: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
011: * GNU Lesser General Public License for more details.
012: *
013: * You should have received a copy of the GNU Lesser General Public License
014: * along with this program (LICENSE.txt); if not, write to the Free Software
015: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
016: */package org.jamwiki.model;
017:
018: import java.sql.Timestamp;
019: import org.jamwiki.utils.WikiLogger;
020:
021: /**
022: * Provides an object representing Wiki-specific information about a user of
023: * the Wiki.
024: */
025: public class WikiUser {
026:
027: private static final WikiLogger logger = WikiLogger
028: .getLogger(WikiUser.class.getName());
029: private Timestamp createDate = new Timestamp(System
030: .currentTimeMillis());
031: private String createIpAddress = "0.0.0.0";
032: private String defaultLocale = null;
033: private String displayName = null;
034: private Timestamp lastLoginDate = new Timestamp(System
035: .currentTimeMillis());
036: private String lastLoginIpAddress = "0.0.0.0";
037: private String username = null;
038: private int userId = -1;
039: private String password = null;
040:
041: /**
042: *
043: */
044: protected WikiUser() {
045: }
046:
047: /**
048: *
049: */
050: public WikiUser(String username) {
051: this .username = username;
052: }
053:
054: /**
055: *
056: */
057: public Timestamp getCreateDate() {
058: return this .createDate;
059: }
060:
061: /**
062: *
063: */
064: public void setCreateDate(Timestamp createDate) {
065: this .createDate = createDate;
066: }
067:
068: /**
069: *
070: */
071: public String getCreateIpAddress() {
072: return this .createIpAddress;
073: }
074:
075: /**
076: *
077: */
078: public void setCreateIpAddress(String createIpAddress) {
079: this .createIpAddress = createIpAddress;
080: }
081:
082: /**
083: *
084: */
085: public String getDefaultLocale() {
086: return this .defaultLocale;
087: }
088:
089: /**
090: *
091: */
092: public void setDefaultLocale(String defaultLocale) {
093: this .defaultLocale = defaultLocale;
094: }
095:
096: /**
097: *
098: */
099: public String getDisplayName() {
100: return this .displayName;
101: }
102:
103: /**
104: *
105: */
106: public void setDisplayName(String displayName) {
107: this .displayName = displayName;
108: }
109:
110: /**
111: *
112: */
113: public Timestamp getLastLoginDate() {
114: return this .lastLoginDate;
115: }
116:
117: /**
118: *
119: */
120: public void setLastLoginDate(Timestamp lastLoginDate) {
121: this .lastLoginDate = lastLoginDate;
122: }
123:
124: /**
125: *
126: */
127: public String getLastLoginIpAddress() {
128: return this .lastLoginIpAddress;
129: }
130:
131: /**
132: *
133: */
134: public void setLastLoginIpAddress(String lastLoginIpAddress) {
135: this .lastLoginIpAddress = lastLoginIpAddress;
136: }
137:
138: /**
139: *
140: */
141: public int getUserId() {
142: return this .userId;
143: }
144:
145: /**
146: *
147: */
148: public void setUserId(int userId) {
149: this .userId = userId;
150: }
151:
152: /**
153: *
154: */
155: public String getPassword() {
156: return password;
157: }
158:
159: /**
160: *
161: */
162: public void setPassword(String password) {
163: this .password = password;
164: }
165:
166: /**
167: *
168: */
169: public String getUsername() {
170: return username;
171: }
172: }
|