001// License: GPL. For details, see LICENSE file.
002package org.openstreetmap.josm.data.osm;
003
004import java.util.Date;
005import java.util.List;
006
007import org.openstreetmap.josm.data.coor.LatLon;
008
009public class UserInfo {
010    /** the user id */
011    private int id;
012    /** the display name */
013    private String displayName;
014    /** the date this user was created */
015    private Date accountCreated;
016    /** the home location */
017    private LatLon home;
018    /** the zoom level for the home location */
019    private int homeZoom;
020    /** the profile description */
021    private String description;
022    /** the list of preferred languages */
023    private List<String> languages;
024    /** the number of unread messages */
025    private int unreadMessages;
026
027    /**
028     * Constructs a new {@code UserInfo}.
029     */
030    public UserInfo() {
031        id = 0;
032    }
033
034    public int getId() {
035        return id;
036    }
037
038    public void setId(int id) {
039        this.id = id;
040    }
041
042    public String getDisplayName() {
043        return displayName;
044    }
045
046    public void setDisplayName(String displayName) {
047        this.displayName = displayName;
048    }
049
050    public Date getAccountCreated() {
051        return accountCreated;
052    }
053
054    public void setAccountCreated(Date accountCreated) {
055        this.accountCreated = accountCreated;
056    }
057
058    public LatLon getHome() {
059        return home;
060    }
061
062    public void setHome(LatLon home) {
063        this.home = home;
064    }
065
066    public String getDescription() {
067        return description;
068    }
069
070    public void setDescription(String description) {
071        this.description = description;
072    }
073
074    public List<String> getLanguages() {
075        return languages;
076    }
077
078    public void setLanguages(List<String> languages) {
079        this.languages = languages;
080    }
081
082    public int getHomeZoom() {
083        return homeZoom;
084    }
085
086    public void setHomeZoom(int homeZoom) {
087        this.homeZoom = homeZoom;
088    }
089
090    /**
091     * Replies the number of unread messages
092     * @return the number of unread messages
093     * @since 6349
094     */
095    public final int getUnreadMessages() {
096        return unreadMessages;
097    }
098
099    /**
100     * Sets the number of unread messages
101     * @param unreadMessages the number of unread messages
102     * @since 6349
103     */
104    public final void setUnreadMessages(int unreadMessages) {
105        this.unreadMessages = unreadMessages;
106    }
107}