Changeset 4066 in josm
- Timestamp:
- 2011-05-02T02:48:28+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/User.java
r4037 r4066 68 68 userMap.put(user.getId(), user); 69 69 } 70 user.addName(name);70 if (name != null) user.addName(name); 71 71 return user; 72 72 } … … 175 175 /** the user id */ 176 176 private final long uid; 177 178 public static final int STATUS_UNKNOWN = 0; 177 private int relicensingStatus = STATUS_UNKNOWN; 178 179 public static final int STATUS_UNKNOWN = -1; 180 public static final int STATUS_UNDECIDED = 0; 179 181 public static final int STATUS_AGREED = 1; 180 182 public static final int STATUS_NOT_AGREED = 2; 181 183 public static final int STATUS_AUTO_AGREED = 3; 184 public static final int STATUS_ANONYMOUS = 4; 182 185 183 186 /** 187 * Finds out this user's relicensing status and saves it for quicker 188 * access. 184 189 */ 185 190 public int getRelicensingStatus() { 186 if (uid >= 286582) return STATUS_AUTO_AGREED; 191 if (relicensingStatus != STATUS_UNKNOWN) return relicensingStatus; 192 if (uid >= 286582) return (relicensingStatus = STATUS_AUTO_AGREED); 187 193 if (relicensingUsers == null) return STATUS_UNKNOWN; 188 194 Long id = new Long(uid); 189 if (relicensingUsers.contains(id)) return STATUS_AGREED;195 if (relicensingUsers.contains(id)) return (relicensingStatus = STATUS_AGREED); 190 196 if (nonRelicensingUsers == null) return STATUS_UNKNOWN; 191 if (nonRelicensingUsers.contains(id)) return STATUS_NOT_AGREED;197 if (nonRelicensingUsers.contains(id)) return (relicensingStatus = STATUS_NOT_AGREED); 192 198 return STATUS_UNKNOWN; 199 } 200 201 /** 202 * Sets this user's relicensing status. This can be used if relicensing 203 * information is available from another source so that directly looking 204 * at the users_agreed/users_not_agreed files it not required. 205 */ 206 public void setRelicensingStatus(int status) { 207 relicensingStatus = status; 193 208 } 194 209
Note:
See TracChangeset
for help on using the changeset viewer.