}
}
public void setProperty(String username, String property, String value) throws RemoteException {
try {
User user = userbase.getUser(username);
// setting will happen VERY rarely, so the speed of this isn't particularly important.
if ("lastlog".equals(property)) {
user.setLastlog(Long.parseLong(value));
} else if ("primarygroup".equals(property)) {
user.setPrimaryGroup(value);
} else if ("addip".equals(property)) {
user.addIp(value);
} else if ("delip".equals(property)) {
user.delIp(value);
} else if ("addgadminforgroup".equals(property)) {
user.addGadminForGroup(value);
} else if ("removegadminforgroup".equals(property)) {
user.removeGadminForGroup(value);
} else if ("hidden".equals(property)) {
user.setHidden(Boolean.parseBoolean(value));
} else if ("password".equals(property)) {
user.passwd(value);
} else if ("tagline".equals(property)) {
user.setTagline(value);
} else if ("logins".equals(property)) {
user.setLogins(Integer.parseInt(value));
} else if ("suspended".equals(property)) {
user.setSuspended(Boolean.parseBoolean(value));
} else if ("addpermission".equals(property)) {
user.addPermission(Integer.parseInt(value));
} else if ("delpermission".equals(property)) {
user.delPermission(Integer.parseInt(value));
} else if ("autg".equals(property)) {
// we check that the group exists in the site-command
user.addGroup(value);
} else if ("rufg".equals(property)) {
user.removeGroup(value);
} else {
throw new IllegalArgumentException("Tried to find property that does not exist: [" + username + ':' + property + ':' + value + ']');
}
// NOTE: we can be guaranteed to not get any NumberFormatExceptions here, since the caller of this method does a conversion FROM the appropriate formate before sending it over the wire
} catch (NoSuchUserException e) {